OSDN Git Service

Only copy PBB_DOMAIN when it is initialized.
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * graphite-sese-to-poly.c (new_pbb_from_pbb): Only copy PBB_DOMAIN
4         when it is initialized.
5
6         * gfortran.dg/graphite/id-23.f: New.
7
8 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
9
10         * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Update
11         call to graphite_find_data_references_in_stmt.
12         * graphite-sese-to-poly.c (outermost_loop_in_sese_1): New.
13         (try_generate_gimple_bb): Call outermost_loop_in_sese_1.  Update
14         call to graphite_find_data_references_in_stmt.
15         (analyze_drs_in_stmts): Same.
16         * tree-data-ref.c (dr_analyze_indices): Pass in parameter the loop
17         in which the scalar analysis of indices is performed.
18         (create_data_ref): Same.  Update call to dr_analyze_indices.
19         (find_data_references_in_stmt): Update call to create_data_ref.
20         (graphite_find_data_references_in_stmt): Same.
21         * tree-data-ref.h (graphite_find_data_references_in_stmt): Update
22         declaration.
23         (create_data_ref): Same.
24         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Update
25         call to create_data_ref.
26
27 2011-01-19  Sebastian Pop  <sebastian.pop@amd.com>
28
29         * graphite-sese-to-poly.c (build_poly_scop): Move
30         rewrite_commutative_reductions_out_of_ssa before
31         find_scop_parameters.
32
33 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
34
35         PR tree-optimization/46970
36         * gcc.dg/graphite/pr46970.c: New.
37
38 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
39
40         PR tree-optimization/46215
41         * gcc.dg/graphite/pr46215.c: New.
42
43 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
44
45         PR tree-optimization/46168
46         * gcc.dg/graphite/pr46168.c: New.
47
48 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
49
50         PR tree-optimization/43657
51         * gcc.dg/graphite/pr43657.c: New.
52
53 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
54
55         PR tree-optimization/29832
56         * gfortran.dg/graphite/pr29832.f90: New.
57
58 2011-01-18  Sebastian Pop  <sebastian.pop@amd.com>
59
60         PR tree-optimization/43567
61         * gcc.dg/graphite/pr43567.c: New.
62
63 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
64
65         * Makefile.in (LAMBDA_H): Removed.
66         (TREE_DATA_REF_H): Remove dependence on LAMBDA_H.
67         (OBJS-common): Remove dependence on lambda-code.o, lambda-mat.o,
68         lambda-trans.o, and tree-loop-linear.o.
69         (lto-symtab.o): Remove dependence on LAMBDA_H.
70         (tree-loop-linear.o): Remove rule.
71         (lambda-mat.o): Same.
72         (lambda-trans.o): Same.
73         (lambda-code.o): Same.
74         (tree-vect-loop.o): Add missing dependence on TREE_DATA_REF_H.
75         (tree-vect-slp.o): Same.
76         * hwint.h (gcd): Moved here.
77         (least_common_multiple): Same.
78         * lambda-code.c: Removed.
79         * lambda-mat.c: Removed.
80         * lambda-trans.c: Removed.
81         * lambda.h: Removed.
82         * tree-loop-linear.c: Removed.
83         * lto-symtab.c: Do not include lambda.h.
84         * omega.c (gcd): Removed.
85         * passes.c (init_optimization_passes): Remove pass_linear_transform.
86         * tree-data-ref.c (print_lambda_vector): Moved here.
87         (lambda_vector_copy): Same.
88         (lambda_matrix_copy): Same.
89         (lambda_matrix_id): Same.
90         (lambda_vector_first_nz): Same.
91         (lambda_matrix_row_add): Same.
92         (lambda_matrix_row_exchange): Same.
93         (lambda_vector_mult_const): Same.
94         (lambda_vector_negate): Same.
95         (lambda_matrix_row_negate): Same.
96         (lambda_vector_equal): Same.
97         (lambda_matrix_right_hermite): Same.
98         * tree-data-ref.h: Do not include lambda.h.
99         (lambda_vector): Moved here.
100         (lambda_matrix): Same.
101         (dependence_level): Same.
102         (lambda_transform_legal_p): Removed declaration.
103         (lambda_collect_parameters): Same.
104         (lambda_compute_access_matrices): Same.
105         (lambda_vector_gcd): Same.
106         (lambda_vector_new): Same.
107         (lambda_vector_clear): Same.
108         (lambda_vector_lexico_pos): Same.
109         (lambda_vector_zerop): Same.
110         (lambda_matrix_new): Same.
111         * tree-flow.h (least_common_multiple): Removed declaration.
112         * tree-parloops.c (lambda_trans_matrix): Moved here.
113         (LTM_MATRIX): Same.
114         (LTM_ROWSIZE): Same.
115         (LTM_COLSIZE): Same.
116         (LTM_DENOMINATOR): Same.
117         (lambda_trans_matrix_new): Same.
118         (lambda_matrix_vector_mult): Same.
119         (lambda_transform_legal_p): Same.
120         * tree-pass.h (pass_linear_transform): Removed declaration.
121         * tree-ssa-loop.c (tree_linear_transform): Removed.
122         (gate_tree_linear_transform): Removed.
123         (pass_linear_transform): Removed.
124         (gate_graphite_transforms): Make flag_tree_loop_linear an alias of
125         flag_loop_interchange.
126
127         * gfortran.dg/graphite/interchange-4.f: New.
128         * gfortran.dg/graphite/interchange-5.f: New.
129
130         * gcc.dg/tree-ssa/ltrans-1.c: Removed.
131         * gcc.dg/tree-ssa/ltrans-2.c: Removed.
132         * gcc.dg/tree-ssa/ltrans-3.c: Removed.
133         * gcc.dg/tree-ssa/ltrans-4.c: Removed.
134         * gcc.dg/tree-ssa/ltrans-5.c: Removed.
135         * gcc.dg/tree-ssa/ltrans-6.c: Removed.
136         * gcc.dg/tree-ssa/ltrans-8.c: Removed.
137         * gfortran.dg/ltrans-7.f90: Removed.
138         * gcc.dg/tree-ssa/data-dep-1.c: Removed.
139
140         * gcc.dg/pr18792.c: -> gcc.dg/graphite/pr18792.c
141         * gcc.dg/pr19910.c: -> gcc.dg/graphite/pr19910.c
142         * gcc.dg/tree-ssa/20041110-1.c: -> gcc.dg/graphite/pr20041110-1.c
143         * gcc.dg/tree-ssa/pr20256.c: -> gcc.dg/graphite/pr20256.c
144         * gcc.dg/pr23625.c: -> gcc.dg/graphite/pr23625.c
145         * gcc.dg/tree-ssa/pr23820.c: -> gcc.dg/graphite/pr23820.c
146         * gcc.dg/tree-ssa/pr24309.c: -> gcc.dg/graphite/pr24309.c
147         * gcc.dg/tree-ssa/pr26435.c: -> gcc.dg/graphite/pr26435.c
148         * gcc.dg/pr29330.c: -> gcc.dg/graphite/pr29330.c
149         * gcc.dg/pr29581-1.c: -> gcc.dg/graphite/pr29581-1.c
150         * gcc.dg/pr29581-2.c: -> gcc.dg/graphite/pr29581-2.c
151         * gcc.dg/pr29581-3.c: -> gcc.dg/graphite/pr29581-3.c
152         * gcc.dg/pr29581-4.c: -> gcc.dg/graphite/pr29581-4.c
153         * gcc.dg/tree-ssa/loop-27.c: -> gcc.dg/graphite/pr30565.c
154         * gcc.dg/tree-ssa/pr31183.c: -> gcc.dg/graphite/pr31183.c
155         * gcc.dg/tree-ssa/pr33576.c: -> gcc.dg/graphite/pr33576.c
156         * gcc.dg/tree-ssa/pr33766.c: -> gcc.dg/graphite/pr33766.c
157         * gcc.dg/pr34016.c: -> gcc.dg/graphite/pr34016.c
158         * gcc.dg/tree-ssa/pr34017.c: -> gcc.dg/graphite/pr34017.c
159         * gcc.dg/tree-ssa/pr34123.c: -> gcc.dg/graphite/pr34123.c
160         * gcc.dg/tree-ssa/pr36287.c: -> gcc.dg/graphite/pr36287.c
161         * gcc.dg/tree-ssa/pr37686.c: -> gcc.dg/graphite/pr37686.c
162         * gcc.dg/pr42917.c: -> gcc.dg/graphite/pr42917.c
163         * gcc.dg/tree-ssa/data-dep-1.c
164         * gfortran.dg/loop_nest_1.f90: -> gfortran.dg/graphite/pr29290.f90
165         * gfortran.dg/pr29581.f90: -> gfortran.dg/graphite/pr29581.f90
166         * gfortran.dg/pr36286.f90: -> gfortran.dg/graphite/pr36286.f90
167         * gfortran.dg/pr36922.f: -> gfortran.dg/graphite/pr36922.f
168         * gfortran.dg/pr39516.f: -> gfortran.dg/graphite/pr39516.f
169
170 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
171
172         * graphite-sese-to-poly.c (close_phi_written_to_memory): Also allow
173         VAR_DECL, PARM_DECL, and RESULT_DECL.
174
175         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
176
177 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
178
179         * graphite-dependences.c (reduction_dr_1): Allow several reductions
180         in a reduction PBB.
181         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split PBBs
182         that have already been marked as PBB_IS_REDUCTION.
183
184 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
185
186         * graphite-scop-detection.c (same_close_phi_node): New.
187         (remove_duplicate_close_phi): New.
188         (make_close_phi_nodes_unique): New.
189         (canonicalize_loop_closed_ssa): Call make_close_phi_nodes_unique.
190
191 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
192
193         * graphite-dependences.c (new_poly_ddr): Call same_pdr_p.
194         * graphite-poly.h (same_pdr_p): Do not expect that the PDR_TYPE
195         of both data references to be the same.
196
197 2011-01-17  Sebastian Pop  <sebastian.pop@amd.com>
198
199         * graphite-dependences.c (build_lexicographical_constraint): Remove the
200         gdim parameter.
201         (build_lexicographical_constraint): Adjust call to ppl_powerset_is_empty.
202         (dependence_polyhedron): Same.
203         (graphite_legal_transform_dr): Same.
204         (graphite_carried_dependence_level_k): Same.
205         * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params parameter.
206         * graphite-ppl.h (ppl_powerset_is_empty): Adjust declaration.
207
208 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
209
210         * graphite-sese-to-poly.c
211         (translate_scalar_reduction_to_array_for_stmt): Call unshare_expr.
212         (close_phi_written_to_memory): New.
213         (translate_scalar_reduction_to_array): Call close_phi_written_to_memory
214         and unshare_expr.
215
216         * gcc.dg/graphite/block-0.c: Un-XFAILed.
217         * gcc.dg/graphite/block-1.c: Un-XFAILed.
218         * gcc.dg/graphite/block-7.c: Un-XFAILed.
219         * gcc.dg/graphite/block-8.c: Un-XFAILed.
220         * gcc.dg/graphite/interchange-12.c: Un-XFAILed.
221         * gcc.dg/graphite/interchange-14.c: Un-XFAILed.
222         * gcc.dg/graphite/interchange-15.c: Un-XFAILed.
223         * gcc.dg/graphite/interchange-8.c: Un-XFAILed.
224         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
225
226 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
227
228         * doc/install.texi: Update the expected version number of PPL to 0.11.
229         * graphite-ppl.c (ppl_powerset_is_empty): Remove now dead code under
230         #if PPL_VERSION_MINOR < 11.
231
232 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
233
234         * graphite-dependences.c (new_poly_ddr): Inlined into
235         dependence_polyhedron.
236         (free_poly_ddr): Moved close by new_poly_ddr.
237         (dependence_polyhedron_1): Renamed dependence_polyhedron.
238         Early return NULL when ppl_powerset_is_empty returns true.
239         (dependence_polyhedron): Renamed new_poly_ddr.  Call only once
240         poly_drs_may_alias_p.  Avoid one call to ppl_powerset_is_empty.
241         (graphite_legal_transform_dr): Call new_poly_ddr.
242         (graphite_carried_dependence_level_k): Same.
243         (dot_original_deps_stmt_1): Renamed dot_deps_stmt_2.  Use new_poly_ddr.
244         (dot_transformed_deps_stmt_1): Removed.
245         (dot_deps_stmt_1): Call dot_deps_stmt_2.
246         (dot_original_deps): Renamed dot_deps_2.  Call new_poly_ddr.
247         (dot_deps_1): Call dot_deps_2.
248
249 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
250
251         * graphite-dependences.c (new_poly_dr): Call ppl_powerset_is_empty.
252         (build_lexicographical_constraint): Same.
253         (dependence_polyhedron_1): Same.
254         (graphite_legal_transform_dr): Same.
255         (graphite_carried_dependence_level_k): Same.
256         * graphite-ppl.c (ppl_powerset_is_empty): New.
257         * graphite-ppl.h (ppl_powerset_is_empty): Declared.
258         * tree-data-ref.c (dump_data_reference): Print the basic block index.
259
260         * gcc.dg/graphite/block-0.c: Add documentation.
261         * gcc.dg/graphite/block-4.c: Same.
262         * gcc.dg/graphite/block-7.c: Same.
263         * gcc.dg/graphite/block-8.c: New.
264         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
265         * gcc.dg/graphite/interchange-11.c: Un-XFAILed.
266         * gcc.dg/graphite/interchange-12.c: Add documentation.
267         * gcc.dg/graphite/interchange-13.c: New.
268         * gcc.dg/graphite/interchange-14.c: New.
269         * gcc.dg/graphite/interchange-15.c: New.
270         * gcc.dg/graphite/interchange-8.c: Add documentation.
271         * gcc.dg/graphite/interchange-mvt.c: Same.
272
273 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
274
275         * graphite-dependences.c (build_pairwise_scheduling): Correctly compute
276         the "a followed by b" relation and document it.
277
278 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
279
280         * graphite-dependences.c (build_lexicographical_constraint): Stop the
281         iteration when the bag of constraints is empty.
282
283 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
284
285         * graphite-poly.c (pbb_remove_duplicate_pdrs): Make it work.
286
287 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
288
289         * graphite-interchange.c (lst_interchange_profitable_p): Takes a loop
290         nest and two loop depths as parameters.
291         (lst_try_interchange_loops): Call lst_interchange_profitable_p after
292         lst_perfect_nestify.
293
294 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
295
296         * graphite-dependences.c (print_pddr): Call
297         ppl_io_fprint_Pointset_Powerset_C_Polyhedron.
298
299 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
300
301         * graphite-ppl.c (debug_gmp_value): New.
302         * graphite-ppl.h (debug_gmp_value): Declared.
303
304 2011-01-13  Tobias Grosser  <grosser@fim.uni-passau.de>
305
306         * doc/install.texi: Document availability of cloog-0.16
307
308 2011-01-05  Vladimir Kargov  <kargov@gmail.com>
309
310         * graphite-scop-detection.c (is_valid_stmt_p): Pass the entry basic
311         block instead of region start to the instantiation.
312         (is_valid_bb_p): Add support for basic blocks with conditional
313         statements.
314         (find_scops_new): Recalculate dominance info before SCOP
315         detection.
316
317 2011-01-05  Vladimir Kargov  <kargov@gmail.com>
318
319         * graphite-scop-detection.c (get_outermost_loop_in_region): New.
320         (is_valid_loop_p): Correct loop passed to stmt_has_simple_data_refs_p
321
322 2011-01-05  Vladimir Kargov  <kargov@gmail.com>
323
324         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Free
325         invalid postdominance info
326
327 2010-12-29  Sebastian Pop  <sebastian.pop@amd.com>
328
329         * Makefile.in (graphite-opencl-codegen.o): Update dependences.
330         (graphite-opencl-meta-clast.o): Same.
331         (graphite-opencl.o): Same.
332         (refined-regions.o): Same.
333         * graphite-opencl-codegen.c: Do not include unnecessary .h files.
334         * graphite-opencl-meta-clast.c: Same.
335         * graphite-opencl.c: Same.
336         * refined-regions.c: Same.
337
338 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
339
340         * graphite-opencl-codegen.c: Use FOR_EACH_VEC_ELT.
341         * graphite-opencl-meta-clast.c: Same.
342         * graphite-opencl.c: Same.
343
344 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
345
346         * graphite-opencl-codegen.c: Do not include sys/time.h.
347         * graphite-opencl.c: Same.
348
349 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
350
351         * graphite-opencl.c (h_context, h_cmd_queue, h_program): Moved
352         out of ifdef HAVE_cloog section.
353
354 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
355
356         * Makefile.in (graphite-opencl.o): Depends on
357         graphite-opencl-functions.def.
358         * graphite-opencl-functions.def: New.
359         * graphite-opencl.c (enum OPENCL_FUNCTIONS): Read data from
360         graphite-opencl-functions.def.
361         (opencl_function_names): Same.
362         (opencl_create_function_decl): Use the enum OPENCL_FUNCTIONS
363         as indices of opencl_function_names.
364
365 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
366
367         * graphite-opencl-codegen.c: Fix formatting.
368         * graphite-opencl-meta-clast.c: Same.
369         * graphite-opencl.c: Same.
370
371 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
372
373         * graphite-opencl-codegen.c: Fix formating problems.
374         * graphite-opencl-meta-clast.c: Same.
375         * graphite-opencl.c: Same.
376         * graphite-opencl.h: Same.
377
378 2010-12-27  Sebastian Pop  <sebastian.pop@amd.com>
379
380         * graphite-opencl-codegen.c: Sort topologically static functions.
381         * graphite-opencl.c: Same.
382
383 2010-12-25  Sebastian Pop  <sebastian.pop@amd.com>
384
385         * graphite-cloog-compat.h (cloog_names_nb_scattering): New.
386         (cloog_names_scattering): New.
387         * graphite-opencl-codegen.c (opencl_constant_expression_p): Use
388         clast_expr_* instead of expr_*.  Call clast_name_to_str.
389         (opencl_clast_name_to_tree): Now takes a clast_name_p in parameter.
390         (opencl_get_scat_real_name): Same.  Call clast_name_to_str.
391         (opencl_add_scat_as_arg): Same.
392         (opencl_print_local_vars): Call cloog_names_scattering and
393         cloog_names_nb_scattering.
394         (opencl_print_for): Do not call value_*.
395         (opencl_print_term): Same.
396         (opencl_print_expr): Use clast_expr_* instead of expr_*.
397         (opencl_print_sum): Same.
398         (opencl_print_binary): Same.
399
400 2010-12-25  Alexey Kravets  <kayrick@ispras.ru>
401
402         * Makefile.in (OBJS-common): Add graphite-opencl-codegen.o,
403         graphite-opencl-meta-clast.o and graphite-opencl.o.
404         (graphite-opencl-codegen.o): New.
405         (graphite-opencl-meta-clast.o): New.
406         (graphite-opencl.o): New.
407         (GTFILES): Add graphite-opencl.c.
408         * common.opt (fgraphite-opencl): New.
409         (fgraphite-opencl-cpu): New.
410         (fgraphite-opencl-ignore-depth-heuristic): New.
411         (fgraphite-opencl-ignore-mem-heuristic): New.
412         (fgraphite-opencl-ignore-dep): New.
413         (fgraphite-opencl-ignore-types): New.
414         (fgraphite-opencl-depth-base): New.
415         (fgraphite-opencl-debug): New.
416         * graphite-opencl-codegen.c: New file.
417         * graphite-opencl-meta-clast.c: New file.
418         * graphite-opencl.c: New file.
419         * graphite-opencl.h: New file.
420         * graphite.c (graphite_transform_loops): Call graphite_opencl_init and
421         graphite_opencl_finalize.
422         * tree-ssa-loop.c (gate_graphite_transforms): Handle
423         flag_graphite_opencl.
424         * graphite-clast-to-gimple.c (gloog): Call opencl_transform_clast.
425         * dbgcnt.def (opencl_scop_cnt): New counter.
426
427 2010-12-25  Alexander Monakov  <amonakov@ispras.ru>
428
429         * graphite-dependences.c (graphite_outer_subscript_bound): New.
430         (graphite_carried_dependence_level_k): Export.
431         * graphite-dependences.h (graphite_outer_subscript_bound): Declare.
432         (graphite_carried_dependence_level_k): Ditto.
433
434 2010-12-25  Alexey Kravets  <kayrick@ispras.ru>
435
436         * graphite-clast-to-gimple.c (struct clast_name_index): Move
437         definition to graphite-clast-to-gimple.h.
438         (clast_name_to_index): Ditto.
439         (clast_name_index_elt_info): Ditto.
440         (eq_clast_name_indexes): Ditto.
441         (save_clast_name_index): Export.
442         (clast_name_to_gcc): Ditto.
443         (clast_to_gcc_expression): Ditto.
444         (gcc_type_for_clast_expr): Ditto.
445         (graphite_create_new_guard): Ditto.
446         (gcc_type_for_iv_of_clast_loop): Ditto.
447         (graphite_create_new_loop): Ditto.
448         (build_iv_mapping): Ditto.
449         (graphite_create_new_loop_guard): Ditto.
450         (debug_clast_name_index): New.
451         (debug_clast_name_indices): New debug function.
452
453 2010-12-21  Sebastian Pop  <sebastian.pop@amd.com>
454
455         PR tree-optimization/47021
456         * graphite-sese-to-poly.c (scan_tree_for_params): Handle ADDR_EXPR.
457
458 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
459
460         * graphite-sese-to-poly.c (analyze_drs_in_stmts): Fix set but
461         unused warning.
462         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
463
464 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
465
466         * graphite-sese-to-poly.c (analyze_drs): Removed.
467         (build_scop_drs): Do not call analyze_drs.
468         (analyze_drs_in_stmts): New.
469         (insert_stmts): New.
470         (insert_out_of_ssa_copy): Call analyze_drs_in_stmts.
471         (insert_out_of_ssa_copy_on_edge): Same.
472         (rewrite_close_phi_out_of_ssa): Call insert_stmts.
473         (rewrite_phi_out_of_ssa): Same.
474         (rewrite_cross_bb_scalar_dependence): Same.
475         (split_reduction_stmt): Move data references in the new basic blocks.
476         (translate_scalar_reduction_to_array_for_stmt): Call insert_stmts.
477
478 2010-11-26  Sebastian Pop  <sebastian.pop@amd.com>
479
480         * sese.c (rename_uses): Do not handle ADDR_EXPR in LHS of assignments.
481
482 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
483
484         PR middle-end/45297
485         * graphite-poly.c (new_poly_bb): Returns a poly_bb_p.  Do not take
486         the reduction bool in parameter.  Clear PBB_IS_REDUCTION.  Set GBB_PBB.
487         * graphite-poly.h (new_poly_bb): Update declaration.
488         (gbb_from_bb): Moved here...
489         (pbb_from_bb): New.
490         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node):
491         Removed.
492         (graphite_stmt_p): Removed.
493         (try_generate_gimple_bb): Returns a gimple_bb_p.  Do not pass in
494         sbitmap reductions.  Always build a gimple_bb_p.  Do not call
495         new_poly_bb.
496         (build_scop_bbs_1): Do not pass in sbitmap reductions.
497         (build_scop_bbs): Same.
498         (gbb_from_bb): ... from here.
499         (add_conditions_to_constraints): Moved up.
500         (analyze_drs): New.
501         (build_scop_drs): Call analyze_drs.  Remove all the PBBs that do
502         not contain data references.
503         (new_pbb_from_pbb): New.
504         (insert_out_of_ssa_copy_on_edge): Call new_pbb_from_pbb after a
505         block is split.
506         (rewrite_close_phi_out_of_ssa): Update call to
507         insert_out_of_ssa_copy_on_edge.
508         (rewrite_reductions_out_of_ssa): Now static.
509         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
510         (split_pbb): New.
511         (split_reduction_stmt): Call split_pbb.
512         (translate_scalar_reduction_to_array): Pass in the scop, do not
513         pass in the sbitmap reductions.
514         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
515         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
516         (rewrite_commutative_reductions_out_of_ssa): Same.
517         (build_poly_scop): Call build_scop_bbs,
518         rewrite_commutative_reductions_out_of_ssa,
519         rewrite_reductions_out_of_ssa, and
520         rewrite_cross_bb_scalar_deps_out_of_ssa.  Move build_scop_drs
521         before scop_to_lst.
522         * graphite-sese-to-poly.h (rewrite_commutative_reductions_out_of_ssa):
523         Removed declaration.
524         (rewrite_reductions_out_of_ssa): Same.
525         (rewrite_cross_bb_scalar_deps_out_of_ssa): Same.
526         (build_scop_bbs): Same.
527         * graphite.c (graphite_transform_loops): Do not initialize reductions.
528         Do not call build_scop_bbs,
529         rewrite_commutative_reductions_out_of_ssa,
530         rewrite_reductions_out_of_ssa, and
531         rewrite_cross_bb_scalar_deps_out_of_ssa.
532         * sese.h (struct gimple_bb): Add field pbb.
533         (GBB_PBB): New.
534
535         * gcc.dg/graphite/pr45297.c: New.
536
537 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
538
539         * graphite-sese-to-poly.c (handle_scalar_deps_crossing_scop_limits):
540         New.
541         (rewrite_cross_bb_scalar_deps): Pass in the scop.  Call
542         handle_scalar_deps_crossing_scop_limits.
543         (rewrite_cross_bb_scalar_deps_out_of_ssa): Create an empty BB
544         after the scop.  Update call to rewrite_cross_bb_scalar_deps.
545
546 2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
547
548         * sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
549         when replacing a constant in an ADDR_EXPR.
550
551 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
552
553         * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
554         for the stride.
555         (lst_do_strip_mine): Same.
556         (scop_do_strip_mine): Same.
557         * graphite-poly.c (apply_poly_transforms): Update call to
558         scop_do_strip_mine.
559         * graphite-poly.h (scop_do_strip_mine): Update declaration.
560
561 2010-09-24  Sebastian Pop  <sebastian.pop@amd.com>
562
563         PR middle-end/45758
564         * graphite.c (graphite_initialize): Call scev_reset.
565
566 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
567
568         * sese.h (scev_analyzable_p): Return false for real or floating
569         point.  Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
570
571 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
572
573         PR middle-end/45758
574         * gfortran.dg/graphite/pr45758.f90: New.
575
576 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
577
578         * graphite-scop-detection.c (is_scop_p): Free bblist.
579
580 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
581
582         * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
583         and ps.
584         * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
585         domain.
586         * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
587         Do not allocate ub_expr, it is passed in initialized.
588
589 2010-09-21  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
590
591         * common.opt (fgraphite-dump-cloog): New flag.
592         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
593         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
594         (build_cloog_prog): Dump CLooG input file when
595         flag_graphite_dump_cloog is set.
596         * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
597
598 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
599
600         Revert previous patch "New flag: -fgraphite-dump-cloog."
601
602 2010-09-20  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
603
604         * common.opt (fgraphite-dump-cloog): New flag.
605         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
606         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
607         (build_cloog_prog): Dump CLooG input file when
608         flag_graphite_dump_cloog is set.
609
610 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
611
612         * graphite-clast-to-gimple.c (graphite_verify): Remove call to
613         verify_dominators for CDI_POST_DOMINATORS.
614         * sese.h: Remove comment about CDI_POST_DOMINATORS.
615         (recompute_all_dominators): Remove call to free_dominance_info
616         for CDI_POST_DOMINATORS.  Remove call to calculate_dominance_info
617         for CDI_POST_DOMINATORS.
618
619 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
620
621         * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
622         over pbb_dim_iter_domain.
623
624 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
625
626         * graphite-flattening.c: Fix comments.
627
628 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
629
630         * Makefile.in (OBJS-common): Add graphite-flattening.o.
631         (graphite-flattening.o): New rule.
632         * common.opt (floop-flatten): New flag.
633         * doc/invoke.texi (-floop-flatten): Documented.
634         * graphite-flattening.c: New.
635         * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
636         * graphite-poly.h (flatten_all_loops): Declared.
637         (lst_remove_loop_and_inline_stmts_in_loop_father): New.
638         * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
639         is set, also set flag_graphite.
640
641 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
642
643         * graphite-poly.c (cloog_checksum): New.
644         * graphite-poly.h (cloog_checksum): Declared.
645
646 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
647
648         * graphite-poly.c (pbb_number_of_iterations): Removed.
649         (pbb_number_of_iterations_at_time): Correctly compute the number
650         of iterations in the transformed loop.
651         * graphite-poly.h (pbb_number_of_iterations): Removed.
652
653 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
654
655         * graphite-poly.h (lst_update_scattering_seq): Removed.
656         (lst_update_scattering): Correctly handle outermost loop dewey
657         renumbering.
658
659 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
660
661         * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
662         lst_strip_mine_profitable_p.  Call lst_niter_for_loop.
663         * graphite-poly.h (lst_niter_for_loop): New.
664
665 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
666
667         * graphite-poly.c (apply_poly_transforms): Do not abort when the
668         transform read from disk is not legal.  Call fatal_error instead.
669
670 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
671
672         * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
673         (print_scop_header): Removed.  Inlined in the only call place...
674         (print_scop): ... here.
675
676 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
677
678         * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
679
680 2010-09-02  Vladimir Kargov  <kargov@gmail.com>
681
682         * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
683         (is_valid_stmt_p): Add data reference and operation-specific checks.
684         (is_valid_bb_p): Change structure, add loop validity check.
685         (is_scop_p): Move the TODO list
686         (find_scops_new): New.
687         (build_scops_new): Move part of functionality to find_scops_new and
688         build_scops.  Add necessary steps for successful SCoP construction.
689         (build_scops): Compute SCoP sets for both detection algorithms, choose
690         the resulting one depending on static condition.
691
692 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
693
694         * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
695
696 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
697
698         * graphite-dependences.c (dot_deps): Avoid set but not used warning.
699         (dot_deps_stmt): Same.
700         * graphite-poly.c (dot_lst): Same.
701
702 2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>
703
704         * graphite-blocking.c (scop_do_strip_mine): Do not call
705         graphite_legal_transform.
706         (scop_do_block): Same.
707
708 2010-08-20  Vladimir Kargov  <kargov@gmail.com>
709
710         * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
711         description.
712
713 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
714
715         PR middle-end/45230
716         * gcc.dg/graphite/id-pr45230.c: New.
717
718 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
719
720         * tree-scalar-evolution.c (instantiate_array_ref): New.
721         (instantiate_scev_r): Also handle ARRAY_REFs.
722
723 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
724
725         * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
726         Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
727         RESULT_DECL, and FIELD_DECL.  Return false for an
728         SSA_NAME_IS_DEFAULT_DEF.
729         (compute_scalar_evolution_in_loop): Do not further analyze the
730         scalar evolution when no_evolution_in_loop_p returns true.
731
732 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
733
734         * tree-chrec.h (evolution_function_is_affine_p): Do not check
735         whether CHREC_LEFT is invariant.  A function is affine when
736         CHREC_RIGHT is invariant.
737
738 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
739
740         * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
741         is_gimple_reg.
742         (rewrite_degenerate_phi): Same.
743         (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
744
745 2010-08-18  Vladimir Kargov  <kargov@gmail.com>
746
747         * graphite-scop-detection.c (graphite_can_represent_scev,
748         graphite_can_represent_expr, stmt_has_simple_data_refs_p,
749         graphite_can_represent_loop): Remove outermost_loop.
750
751 2010-08-17  Sebastian Pop  <sebastian.pop@amd.com>
752
753         PR middle-end/45229
754         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
755         handle GIMPLE_CALLs with no LHS.
756
757 2010-08-17  Riyadh Baghdadi  <baghdadi.mr@gmail.com>
758             Sebastian Pop  <sebastian.pop@amd.com>
759
760         * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
761         Call remove-build-file to clean up the generated *.graphite files.
762
763 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
764
765         * doc/invoke.texi (debugging options): Update documentation.
766         (-floop-interchange): Same.
767         (-flopp-strip-mine): Same.
768         (-floop-block): Same.
769         (-fgraphite-read): Add documentation.
770         (-fgraphite-write): Same.
771
772 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
773
774         * toplev.c (process_options): Disable graphite loop optimization
775         options when -fgraphite-read flag is used.
776
777 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
778
779         * graphite-poly.c (init_graphite_out_file): New.
780         (init_graphite_in_file): New.
781         (apply_poly_transforms): Updated to enable reading and writing of
782         multiple scop files.
783         * toplev.c (init_asm_output): Remove graphite in/out file initialization.
784
785 2010-08-17  Tobias Grosser  <grosser@fim.uni-passau.de>
786
787         * graphite-scop-detection.c (graphite_can_represent_scev): Remove
788         redundant checks.
789
790 2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
791
792         * graphite-clast-to-gimple.c (precision_for_value): Adjust
793         computation of precision by 1.
794
795 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
796
797         * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
798         (openscop_read_polyhedron_matrix): New.
799         * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
800         (openscop_read_N_int): Same.
801         * graphite-poly.c (openscop_read_N_int): New.
802         (openscop_read_one_int): New.
803         (openscop_read_N_string): New.
804         (openscop_read_one_string): New.
805         (openscop_read_powerset_matrix): New.
806         (graphite_read_transforms): Remove.
807         (graphite_read_scatt): New.
808         (graphite_read_scop_file): New.
809         (apply_poly_transforms): Updated to call graphite_read_scop_file.
810
811 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
812
813         * graphite-poly.c: Change include order.
814
815 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
816
817         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
818         (cloog_matrix_nrows): New.
819
820 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
821
822         * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
823         from matrix lines.
824         * graphite-poly.c (openscop_print_scattering_function_1): Same.
825         (print_scattering_function_1): Same.
826         (openscop_print_pbb_domain): Same.
827         (openscop_print_scop_context): Same.
828         (print_scop_context): Same.
829
830 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
831
832         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
833         (openscop_print_pdr_polyhedron): Print pph.
834
835 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
836
837         * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
838         * gfortran.dg/graphite/graphite.exp: Same.
839         * gcc.dg/graphite/vect-pr43423.c: New.
840
841 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
842
843         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
844         priority signed types.
845
846 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
847
848         * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
849         to lang_hooks.types.type_for_size.  Call build_nonstandard_integer_type.
850
851 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
852
853         * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
854         (openscop_print_polyhedron_matrix): New.
855         * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
856         * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
857         (openscop_print_pdr_powerset): New.
858         (openscop_print_powerset_matrix): New.
859         (openscop_print_scattering_function_1): New.
860         (print_scattering_function): Add support for scattering names and
861         OpenScop format.
862         (graphite_write_transforms): Remove.
863         (apply_poly_transforms): Updated to call print_scop.
864         (print_pdr_access_layout): Updated to support OpenScop format.
865         (print_pdr): Same.
866         (openscop_print_pbb_domain): New.
867         (print_pbb_body): Added a parameter to allow indicating that pbb_body is
868         not provided.
869         (print_pbb): Updated to call the new print_pbb_body.
870         (openscop_print_scop_context): New.
871         (print_scop_header): New.
872         (print_scop): Updated to call print_scop_header.
873         * graphite-poly.h: Document OpenScop format.
874
875 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
876
877         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
878         the case removed in the previous patch, when the only phi argument
879         is defined in the same loop as the phi node itself.  Handle it
880         separately from the invariant case by both propagating it outside
881         the region and replacing the phi node with an assign.
882
883 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
884
885         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
886         constant phi nodes with one argument are is_gimple_min_invariant
887         and SSA_NAME_IS_DEFAULT_DEF.
888
889         * gfortran.dg/graphite/id-22.f: New.
890
891 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
892
893         * graphite.c (graphite_initialize): Do not initialize
894         CLooG and initialize the Parma Polyhedra Library
895         manually when using CLOOG_ORG.
896         (graphite_finalize): Do not finalize CLooG and finalize
897         the Parma Polyhedra Library manually when using CLOOG_ORG.
898         * graphite-cloog-compat.h (cloog_initialize): Hide function
899         when using CLOOG_ORG.
900         (cloog_finalize): Same.
901
902 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
903
904         * graphite-clast-to-gimple.c (free_scattering): Change
905         CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
906         (CLOOG_ORG).
907         (build_cloog_prog): Same.
908         * graphite-cloog-compat.h (cloog_domain): Removed.
909         (cloog_scattering): New.
910         (cloog_set_domain): Removed.
911         (cloog_set_scattering): New.
912         (cloog_next_domain): Removed.
913         (cloog_next_scattering): New.
914         (cloog_set_next_domain): Removed.
915         (cloog_set_next_scattering): New.
916         (CloogScatteringList): New.
917         (CloogScattering): New.
918         (cloog_scattering_free): New.
919         (new_Cloog_Scattering_from_ppl_Polyhedron): New.
920         * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
921         New.
922
923 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
924
925         * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
926         CloogState.
927         (set_cloog_options): Same.
928         (print_clast_stmt): Same.
929         (scop_to_clast): Same.
930         (print_generated_program): Same.
931         (gloog): Same.
932         * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
933         (scop_to_clast): Extend with CloogState.
934         * graphite-cloog-util.c: Include graphite-cloog-compat.h
935         (new_Cloog_Domain_from_ppl_Polyhedron):
936         Extend with CloogState.  Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
937         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
938         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
939         * graphite-cloog-util.h (build_cloog_prog): Same.
940         * graphite-cloog-copat.h (build_cloog_prog): New.
941         (CloogState): New.
942         (cloog_state_malloc): New.
943         (cloog_state_free): New.
944         (cloog_loop_malloc): New.
945         (cloog_options_malloc): New.
946         (cloog_statement_alloc): New.
947         (cloog_domain_from_cloog_matrix): New.
948         (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
949         (new_Cloog_Domain_from_ppl_Polyhedron): New.
950
951 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
952
953         * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
954         type of NAME now depends on used CLooG version.
955         (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
956         (gcc_type_for_clast_expr): Same.
957         (print_clast_stmt): Replace pprint with clast_pprint.
958         * graphite-cloog-compat.h: Provide compatibility macros for
959         CLooG Legacy.
960         (clast_name_p): New.
961         (clast_expr_term): New.
962         (clast_expr_red): New.
963         (clast_expr_bin): New.
964         (clast_pprint): New.
965
966 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
967
968         * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
969         compatible to newer CLooG releases (CLOOG_ORG).
970         (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
971         (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
972         * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
973         (build_cloog_prog) : New.
974         (cloog_program_extract_scalars): New.
975         (cloog_program_scatter): New.
976
977 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
978
979         * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
980         conditionally (CLOOG_ORG).
981         * graphite-cloog-compat.h: New.  Include graphite-cloog-compat.h.
982         (cloog_statement_usr): New.
983         (cloog_domain): Same.
984         (cloog_set_domain): Same.
985         (cloog_next_domain): Same.
986         (cloog_set_next_domain): Same.
987         (cloog_program_nb_scattdims): Same.
988         (cloog_program_set_nb_scattdims): Same.
989         (cloog_program_names): Same.
990         (cloog_program_set_names): Same.
991         (cloog_program_set_context): Same.
992         (cloog_program_set_loop): Same.
993         (cloog_program_blocklist): Same.
994         (cloog_program_set_blocklist): Same.
995         (cloog_program_scaldims): Same.
996         (cloog_program_set_scaldims): Same.
997         (cloog_names_nb_parameters): Same.
998         (cloog_names_set_nb_parameters): Same.
999         (cloog_names_parameters): Same.
1000         (cloog_names_set_parameters): Same.
1001         (cloog_names_set_nb_iterators): Same.
1002         (cloog_names_set_iterators): Same.
1003         (cloog_names_set_nb_scattering): Same.
1004         (cloog_names_set_scattering): Same.
1005         (cloog_statement_set_usr): Same.
1006         (cloog_loop_set_next): Same.
1007         (cloog_loop_set_domain): Same.
1008         (cloog_loop_set_block): Same.
1009         (cloog_block_list_next): Same.
1010         (cloog_block_list_set_next):
1011         (cloog_block_list_set_block): Same.
1012
1013 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
1014
1015         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
1016         a bool.
1017         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
1018         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
1019         (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
1020         when something has been changed.
1021         (rewrite_commutative_reductions_out_of_ssa): Same.
1022
1023         * gcc.dg/graphite/id-26.c: New.
1024
1025 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
1026
1027         * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
1028         handle the case when def is in the sese region.
1029         (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
1030         for invariant expressions.
1031         (rewrite_cross_bb_phi_deps): Removed.
1032         (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
1033         (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
1034         rewrite_cross_bb_phi_deps.
1035
1036 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
1037
1038         * graphite-sese-to-poly.c
1039         (rewrite_commutative_reductions_out_of_ssa_loop): Call
1040         scev_analyzable_p only on is_gimple_reg
1041
1042         * gcc.dg/graphite/id-25.c: New.
1043
1044 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
1045
1046         * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
1047         (rewrite_close_phi_out_of_ssa): Propagate constant values or
1048         parametric expressions outside the scop region.
1049         (rewrite_cross_bb_scalar_deps): Same.
1050         * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
1051
1052         * gcc.dg/graphite/run-id-5.c: New.
1053         * gcc.dg/graphite/run-id-6.c: New.
1054         * gfortran.dg/graphite/id-21.f: New.
1055
1056 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
1057
1058         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
1059         SSA_NAME_DEF_STMT only on SSA_NAMEs.
1060
1061         * gcc.dg/graphite/id-24.c: New.
1062
1063 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
1064
1065         * tree-scalar-evolution.c (instantiate_scev_name): Do not
1066         instantiate default definitions.
1067
1068 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
1069
1070         * graphite-scop-detection.c (is_valid_stmt_p): New.
1071         (is_valid_bb_p): New.
1072
1073 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
1074             Sebastian Pop  <sebastian.pop@amd.com>
1075
1076         * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
1077         (loop_exits_from_bb_p): New.
1078         * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
1079         (loop_exits_from_bb_p): Declared.
1080         * graphite-scop-detection.c (scopdet_basic_block_info): Call
1081         loop_exits_to_bb_p.
1082
1083 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
1084
1085         * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
1086         tree-data-ref.h.
1087         (dot_regions_1): New.
1088         (dot_regions): New.
1089         * refined-regions.h (dot_regions): Declared.
1090         * Makefile.in (refined-regions.o): Update dependences.
1091
1092 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
1093
1094         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
1095         extra parameter for the region.  Call scev_analyzable_p.
1096         (rewrite_reductions_out_of_ssa): Update call to
1097         rewrite_close_phi_out_of_ssa.
1098         (rewrite_cross_bb_phi_deps): Same.
1099         (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
1100         parameter for the region.  Call scev_analyzable_p.
1101         (rewrite_commutative_reductions_out_of_ssa): Update call to
1102         rewrite_commutative_reductions_out_of_ssa_loop.
1103
1104 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
1105
1106         * gcc.dg/tree-ssa/pr20742.c: New.
1107
1108 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1109
1110         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
1111
1112         * gcc.dg/graphite/id-23.c: New.
1113
1114 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1115
1116         * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
1117         SSA scalar phi nodes that can be scev_analyzable_p.
1118
1119         * gfortran.dg/graphite/id-20.f: Adjust testcase.
1120
1121 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1122
1123         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
1124         handle SSA_NAME_IS_DEFAULT_DEF.
1125
1126 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1127
1128         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
1129
1130         * gcc.dg/graphite/pr42729.c: New.
1131
1132 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1133
1134         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
1135         case non close-phi nodes with one argument.
1136
1137 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1138
1139         * sese.h (scev_analyzable_p): Scevs could be expressions without
1140         chrecs and still be scev_analyzable_p.
1141
1142 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1143
1144         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
1145
1146 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1147
1148         * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
1149         * cfgloop.h (struct loop): Remove single_iv field.
1150         * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
1151         (scop_canonicalize_loops): Removed.
1152         (scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
1153         over all the loop phi nodes in loop->header.
1154         (build_poly_scop): Remove use of scop_canonicalize_loops.
1155
1156 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1157
1158         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
1159         handle GIMPLE_CALL.
1160
1161 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1162
1163         * tree-chrec.c (chrec_apply): Should only apply to the specified
1164         variable.  Also handle multivariate chains of recurrences that
1165         satisfy evolution_function_is_affine_p.  Also handle CASE_CONVERT.
1166
1167 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1168
1169         * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
1170         (debug_clast_name_indexes_1): Removed.
1171         (debug_clast_name_indexes): Removed.
1172         (pbb_to_depth_to_oldiv): Removed.
1173         (build_iv_mapping): Replace the use of rename_map with iv_map.
1174         (translate_clast_user): Remove uses of rename_map.  Allocate and
1175         free iv_map.
1176         (translate_clast_for_loop): Remove uses of rename_map.
1177         (translate_clast_for): Same.
1178         (translate_clast_guard): Same.
1179         (translate_clast): Same.
1180         (gloog): Same.
1181         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
1182         * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
1183         * sese.c (set_rename): Now static.
1184         (rename_variables_in_stmt): Removed.
1185         (rename_uses): New.
1186         (is_parameter): Removed.
1187         (is_iv): Removed.
1188         (expand_scalar_variables_call): Removed.
1189         (expand_scalar_variables_ssa_name): Removed.
1190         (expand_scalar_variables_expr): Removed.
1191         (expand_scalar_variables_stmt): Removed.
1192         (expand_scalar_variables): Removed.
1193         (rename_variables): Removed.
1194         (remove_condition): Removed.
1195         (get_true_edge_from_guard_bb): Removed.
1196         (get_false_edge_from_guard_bb): Removed.
1197         (struct igp): Removed.
1198         (default_before_guard): Removed.
1199         (convert_for_phi_arg): Removed.
1200         (add_guard_exit_phis): Removed.
1201         (insert_guard_phis): Removed.
1202         (graphite_copy_stmts_from_block): Now also uses iv_map and a
1203         region.  Do not copy conditions.  Do not copy induction variables.
1204         Call rename_uses.
1205         (copy_bb_and_scalar_dependences): Allocate a local rename_map for
1206         the translated statement.  Use the iv_map for the induction
1207         variable renaming.
1208         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
1209         (set_rename): Removed declaration.
1210         (scev_analyzable_p): ...here.
1211         * tree-chrec.c (chrec_apply_map): New.
1212         * tree-chrec.h (chrec_apply_map): Declared.
1213
1214 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
1215
1216         * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
1217         insert_loop_close_phis.
1218         * sese.c (name_defined_in_loop_p): Removed.
1219         (expr_defined_in_loop_p): Removed.
1220         (alive_after_loop): Removed.
1221         (close_phi_not_yet_inserted_p): Removed.
1222         (struct alep): Removed.
1223         (add_loop_exit_phis): Removed.
1224         (insert_loop_close_phis): Removed.
1225
1226 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1227
1228         * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
1229         condition.
1230         * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
1231
1232 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1233
1234         * gfortran.dg/graphite/id-20.f: New.
1235
1236 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1237
1238         * graphite-cloog-util.h: Added cloog.h.
1239         * graphite-blocking.c: Removed cloog.h.
1240         * graphite-dependences.c: Same.
1241         * graphite-interchange.c: Same.
1242         * graphite-poly.c: Same.
1243         * graphite-ppl.c: Same.
1244         * graphite-scop-detection.c: Same.
1245         * graphite-sese-to-poly.c:
1246         Removed cloog.h.
1247         Removed graphite-clast-to-gimple.h.
1248         (check_poly_representation): Removed (unused).
1249         * graphite-sese-to-poly.h
1250         (check_poly_representation): Removed (unused).
1251
1252 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1253
1254         * Makefile.in
1255         (OBJS-common): Added graphite-cloog-util.o.
1256         (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
1257         (graphite-cloog-util.o): New.
1258         (graphite-ppl.o): Added graphite-cloog-util.h.
1259         * graphite-clast-to-gimple.c:
1260         Added graphite-cloog-util.h to include statements.
1261         * graphite-cloog-util.c: New.
1262         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
1263         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1264         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1265         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1266         (ppl_Constrain_System_number_of_constraints): Same.
1267         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1268         (oppose_constraint): Same.
1269         (cloog_matrix_to_ppl_constraint): Same.
1270         (new_Constraint_System_from_Cloog_Matrix): Same.
1271         (insert_constraint_into_matrix): Same. Declared static.
1272         * graphite-cloog-util.h: New.
1273         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
1274         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1275         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1276         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1277         (insert_constraint_into_matrix): Same.
1278         * graphite-ppl.c:
1279         Added graphite-cloog-util.h to include statements.
1280         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
1281         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1282         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1283         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1284         (insert_constraint_into_matrix): Same.
1285         (ppl_Constrain_System_number_of_constraints): Same.
1286         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
1287         (oppose_constraint): Same.
1288         (cloog_matrix_to_ppl_constraint): Same.
1289         (new_Constraint_System_from_Cloog_Matrix): Same.
1290         * graphite-ppl.h:
1291         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
1292         graphite-cloog-util.h.
1293         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
1294         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1295         (new_C_Polyhedron_from_Cloog_Matrix): Same.
1296         (insert_constraint_into_matrix): Removed.
1297
1298 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1299
1300         * graphite-clast-to-gimple.c
1301         (precision_for_value): Resolve value_* calls to matching mpz_* calls.
1302         (precision_for_interval): Same.
1303         (gcc_type_for_interval): Same.
1304         (compute_type_for_level): Same.
1305         * graphite-interchange.c
1306         (lst_interchange_profitable_p): Same.
1307         * graphite-poly.c
1308         (psct_scattering_dim_for_loop_depth): Same.
1309         * graphite-ppl.c
1310         (ppl_max_for_le_pointset): Same.
1311         (ppl_min_for_le_pointset): Same.
1312
1313 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
1314
1315         * refined-regions.c (bb_index_compare): New.
1316         (get_bbs_in_region): New.
1317         (print_bbs_in_region): New.
1318         (print_refined_region): Add an argument that allows to print
1319         all basic blocks contained in regions.
1320         (debug_refined_region): Update call to print_refined_region.
1321         * refined-regions.h (print_refined_region): Update declaration.
1322         (get_bbs_in_region): Declared.
1323         * graphite-scop-detection.c (build_scops_new): Print the refined
1324         region tree into the Grahite dump file.
1325
1326 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1327
1328         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
1329         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
1330
1331 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1332
1333         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
1334         rewrite_close_phi_out_of_ssa.
1335
1336         * gcc.dg/graphite/id-22.c: New.
1337
1338 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1339
1340         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
1341
1342 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1343
1344         * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
1345         rename_map.
1346         * sese.c (debug_rename_map): Same.
1347         (get_rename): Same.
1348         (set_rename): Same.
1349         (rename_variables_in_stmt): Same.
1350         (expand_scalar_variables_call): Same.
1351         (expand_scalar_variables_ssa_name): Same.
1352         (expand_scalar_variables_expr): Same.
1353         (expand_scalar_variables_stmt): Same.
1354         (expand_scalar_variables): Same.
1355         (rename_variables): Same.
1356         (graphite_copy_stmts_from_block): Same.
1357         (copy_bb_and_scalar_dependences): Same.
1358
1359 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1360
1361         * graphite-clast-to-gimple.c (copy_renames): Removed.
1362         (translate_clast_for): Do not call copy_renames.
1363         (translate_clast_guard): Same.
1364
1365 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1366
1367         * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
1368         (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
1369         (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
1370         before rewrite_cross_bb_scalar_deps.
1371
1372 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1373
1374         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
1375         Early return in when flag_associative_math is not set.
1376
1377 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1378
1379         * gcc.dg/graphite/run-id-2.c: Call abort.
1380
1381 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1382
1383         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
1384         of SSA copies on edges except for loop->latch.
1385
1386 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1387
1388         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
1389         Split out of rewrite_reductions_out_of_ssa.
1390         * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
1391         Declared.
1392         * graphite.c (graphite_transform_loops): Call it.
1393
1394 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1395
1396         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
1397
1398 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
1399
1400         * passes.c (init_optimization_passes): Add pass_graphite.
1401         Schedule a pass_copy_prop before pass_graphite_transforms.
1402         * timevar.def (TV_GRAPHITE): Declared.
1403         * tree-pass.h (pass_graphite): Declared.
1404         * tree-ssa-loop.c (pass_graphite): New.
1405
1406         * gcc.dg/graphite/id-20.c: New.
1407
1408 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1409
1410         * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
1411         Remove calls to rename_nb_iterations and rename_sese_parameters.
1412         * graphite-clast-to-gimple.h (gloog): Update declaration.
1413         * graphite.c (graphite_transform_loops): Update call to gloog.
1414         * sese.c (rename_variables_in_expr): Removed.
1415         (rename_nb_iterations): Removed.
1416         (rename_sese_parameters): Removed.
1417         * sese.h (rename_nb_iterations): Removed.
1418         (rename_sese_parameters): Removed.
1419
1420 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1421
1422         * graphite-clast-to-gimple.c (gloog): Remove call to
1423         sese_adjust_liveout_phis.
1424         * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
1425         SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
1426         (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
1427         rewrite_phi_out_of_ssa.
1428         * sese.c (get_vdef_before_sese): Removed.
1429         (sese_adjust_vphi): Removed.
1430         (sese_adjust_liveout_phis): Removed.
1431         * sese.h (sese_adjust_liveout_phis): Removed.
1432
1433 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1434
1435         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
1436         argument for the place after which to insert the out of SSA copy.
1437         (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
1438         (rewrite_phi_out_of_ssa): Same.
1439         (rewrite_cross_bb_scalar_deps): Same.
1440         (insert_copyout): Removed.
1441         (insert_copyin): Removed.
1442         (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
1443         insert_out_of_ssa_copy_on_edge instead of insert_copyout and
1444         insert_copyin.
1445
1446 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1447
1448         * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
1449         (rewrite_reductions_out_of_ssa): Same.
1450         (rewrite_commutative_reductions_out_of_ssa): Same.
1451         (build_poly_scop): Do not call these functions.
1452         * graphite-sese-to-poly.h (build_poly_scop): Declared.
1453         (rewrite_reductions_out_of_ssa): Declared.
1454         (rewrite_commutative_reductions_out_of_ssa): Declared.
1455         * graphite.c (graphite_transform_loops): Call on every scop
1456         rewrite_commutative_reductions_out_of_ssa before calling
1457         rewrite_reductions_out_of_ssa and build_scop_bbs.
1458
1459 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
1460
1461         * graphite-dependences.c (dot_deps): Make system call to dotty run
1462         in background.
1463         (dot_deps_stmt): Same.
1464         * graphite-poly.c (dot_lst): Same.
1465
1466 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
1467
1468         * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
1469         old_type in parameter.
1470         (gcc_type_for_value): Update call to gcc_type_for_interval.
1471         (compute_type_for_level_1): Renamed compute_type_for_level.
1472         Update call to gcc_type_for_interval.
1473
1474 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1475
1476         * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
1477         the scev analysis when the variable is not used outside the loop
1478         in a close phi node: call compute_overall_effect_of_inner_loop.
1479
1480 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1481
1482         * graphite-sese-to-poly.c (single_pred_cond): Renamed
1483         single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
1484         (build_sese_conditions_before): Renamed call to single_pred_cond.
1485         (build_sese_conditions_after): Same.
1486
1487 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
1488
1489         * graphite-poly.h: Fix comments and indentation.
1490         * graphite-sese-to-poly.c: Same.
1491         (build_sese_conditions_before): Compute stmt and gbb only when needed.
1492         * tree-chrec.c: Fix comments and indentation.
1493         (tree-ssa-loop-niter.c): Same.
1494
1495 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1496
1497         * refined-regions.c (create_region): Only initialize the region.
1498         (find_regions_with_entry): Initialize parent relation and bbmap
1499         correctly.
1500         (build_regions_tree): Set outermost_region to region instead of
1501         topmost_region.
1502         (calculate_region_tree): Remove unneeded parameters.
1503
1504 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
1505
1506         * graphite-scop-detection.c (is_scop_p): New.
1507         (build_scops_new): New. A skeleton for the new scop detection.
1508         (build_scops_old): Renamed from build_scops.
1509         (build_scops): New version. Call the new and the old scop
1510         detection.
1511
1512 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1513             Antoniu Pop  <antoniu.pop@gmail.com>
1514
1515         * Makefile.in (OBJS-common): Add refined-regions.o.
1516         (refined-regions.o): New.
1517         (graphite-scop-detection.o): Use refined-regions.h.
1518         * graphite-scop-detection.c: Include refined-regions.h
1519         (build_scops): Also build the refined region tree.
1520         * refined-regions.c: New. Adds an algorithm to detect refined
1521         regions.
1522         (print_refined_region): New.
1523         (debug_refined_region): New.
1524         (refined_region_contains_bb_p): New.
1525         (refined_region_contains_region_p): New.
1526         (is_common_df): New.
1527         (struct find_regions_global_data): New.
1528         (is_region): New.
1529         (typedef struct bb_bb_def): New.
1530         (new_bb_bb_def): New.
1531         (bb_bb_map_hash): New.
1532         (eq_bb_bb_map): New.
1533         (find_new_bb): New.
1534         (bb_reg_def): New.
1535         (new_bb_reg_def): New.
1536         (bb_reg_map_hash): New.
1537         (eq_bb_reg_map): New.
1538         (find_new_region): New.
1539         (insert_new_reg): New.
1540         (insert_new_bb): New.
1541         (insert_shortcut): New.
1542         (get_next_postdom): New.
1543         (create_region): New.
1544         (find_regions_with_entry): New.
1545         (find_regions_adc): New.
1546         (find_regions): New.
1547         (get_topmost_parent): New.
1548         (build_regions_tree): New.
1549         (calculate_region_tree): New.
1550         (free_region_tree): New.
1551         * refined-regions.h: New.
1552         (struct refined_region): New.
1553         (calculate_region_tree): New.
1554         (free_region_tree): New.
1555         (refined_region_contains_bb_p): New.
1556         (refined_region_contains_region_p): New.
1557         (print_refined_region): New.
1558         (debug_refined_region): New.
1559
1560 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
1561
1562         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1563         size_one_node.
1564
1565 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1566
1567         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1568         type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1569
1570 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1571
1572         * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1573         phi_arg_in_outermost_loop.
1574         (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1575         (remove_invariant_phi): Same.
1576
1577 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1578
1579         * graphite-blocking.c
1580         (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1581         * graphite-clast-to-gimple.c
1582         (clast_to_gcc_expression): Same.
1583         (precision_for_value): Same.
1584         (precision_for_interval): Same.
1585         (gcc_type_for_interval): Same.
1586         (graphite_create_new_guard): Same.
1587         (compute_bounds_for_level): Same.
1588         (graphite_create_new_loop_guard): Same.
1589         * graphite-interchange.c
1590         (build_linearized_memory_access): Same.
1591         (pdr_stride_in_loop): Same.
1592         (memory_strides_in_loop_1): Same.
1593         (memory_strides_in_loop): Same.
1594         (extend_scattering): Same.
1595         (psct_scattering_dim_for_loop_depth): Same.
1596         (pbb_number_of_iterations): Same.
1597         * graphite-poly.h
1598         (debug_iteration_domains): Same.
1599         * graphite-ppl.c
1600         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1601         (ppl_set_inhomogeneous_gmp): Same.
1602         (ppl_strip_loop): Same.
1603         (ppl_lexico_compare_linear_expressions): Same.
1604         (ppl_read_polyhedron_matrix): Same.
1605         (ppl_max_for_le_pointset): Same.
1606         * graphite-ppl.h
1607         (ppl_read_polyhedron_matrix): Same.
1608         (tree_int_to_gmp): Same.
1609         (gmp_cst_to_tree): Same.
1610         (ppl_set_inhomogeneous): Same.
1611         (ppl_set_inhomogeneous_tree): Same.
1612         (ppl_set_coef): Same.
1613         (ppl_set_coef_tree): Same.
1614         * graphite-sese-to-poly.c
1615         (build_pbb_scattering_polyhedrons): Same.
1616         (build_scop_scattering): Same.
1617         (scan_tree_for_params_right_scev): Same.
1618         (scan_tree_for_params): Same.
1619         (find_params_in_bb): Same.
1620         (find_scop_parameters): Same.
1621         (add_upper_bounds_from_estimated_nit): Same.
1622         (build_loop_iteration_domains): Same.
1623         (add_condition_to_domain): Same.
1624         (pdr_add_memory_accesses): Same.
1625
1626 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1627
1628         * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1629         CLooG's value_* macros to their respective mpz_* counterparts.
1630         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1631         (graphite_create_new_loop_guard): Same.
1632         * graphite-interchange.c (build_linearized_memory_access): Same.
1633         (pdr_stride_in_loop): Same.
1634         (memory_strides_in_loop_1): Same.
1635         (1st_interchange_profitable_p): Same.
1636         * graphite-poly.c (extend_scattering): Same.
1637         (psct_scattering_dim_for_loop_depth): Same.
1638         (pbb_number_of_iterations): Same.
1639         (pbb_number_of_iterations_at_time): Same.
1640         * graphite-poly.h (new_1st_loop): Same.
1641         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1642         (oppose_constraint): Same.
1643         (insert_constraint_into_matrix): Same.
1644         (ppl_set_inhomogeneous_gmp): Same.
1645         (ppl_set_coef_gmp): Same.
1646         (ppl_strip_loop): Same.
1647         (ppl_lexico_compare_linear_expressions): Same.
1648         (ppl_max_for_le_pointset): Same.
1649         (ppl_min_for_le_pointset): Same.
1650         (ppl_build_realtion): Same.
1651         * graphite-ppl.h (gmp_cst_to_tree): Same.
1652         (ppl_set_inhomogeneous): Same.
1653         (ppl_set_inhomogeneous_tree): Same.
1654         (ppl_set_coef): Same.
1655         (ppl_set_coef_tree): Same.
1656         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1657         (build_scop_scattering): Same.
1658         (add_value_to_dim): Same.
1659         (scan_tree_for_params_right_scev): Same.
1660         (scan_tree_for_params_int): Same.
1661         (scan_tree_for_params): Same.
1662         (find_params_in_bb): Same.
1663         (find_scop_parameters): Same.
1664         (add_upper_bounds_from_estimated_nit): Same.
1665         (build_loop_iteration_domains): Same.
1666         (create_linear_expr_from_tree): Same.
1667         (add_condition_to_domain): Same.
1668         (pdr_add_memory_accesses): Same.
1669
1670 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1671
1672         PR middle-end/43519
1673         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1674         lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1675         When converting an unsigned type to signed, double its precision.
1676         (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1677         (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1678         (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1679
1680 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1681
1682         PR middle-end/43519
1683         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1684         build_nonstandard_integer_type.
1685         (gcc_type_for_interval): Same.
1686
1687 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1688
1689         PR middle-end/43519
1690         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1691         POINTER_PLUS_EXPR for pointer types.
1692
1693         * gcc.dg/graphite/id-19.c: New.
1694
1695 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
1696
1697         PR middle-end/43519
1698         * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1699         * graphite-clast-to-gimple.c: Include langhooks.h.
1700         (max_signed_precision_type): New.
1701         (max_precision_type): Takes two types as arguments.
1702         (precision_for_value): New.
1703         (precision_for_interval): New.
1704         (gcc_type_for_interval): New.
1705         (gcc_type_for_value): New.
1706         (gcc_type_for_clast_term): New.
1707         (gcc_type_for_clast_red): New.
1708         (gcc_type_for_clast_bin): New.
1709         (gcc_type_for_clast_expr): Split up into several functions.
1710         (gcc_type_for_clast_eq): Rewritten.
1711         (compute_bounds_for_level): New.
1712         (compute_type_for_level_1): New.
1713         (compute_type_for_level): New.
1714         (gcc_type_for_cloog_iv): Removed.
1715         (gcc_type_for_iv_of_clast_loop): Rewritten.
1716         (graphite_create_new_loop): Compute the lower and upper bound types
1717         with gcc_type_for_clast_expr.
1718         (graphite_create_new_loop_guard): Same.
1719         (find_cloog_iv_in_expr): Removed.
1720         (compute_cloog_iv_types_1): Removed.
1721         (compute_cloog_iv_types): Removed.
1722         (gloog): Do not call compute_cloog_iv_types.
1723         * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1724         GBB_CLOOG_IV_TYPES.
1725         (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1726         * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1727         (GBB_CLOOG_IV_TYPES): Removed.
1728
1729         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1730
1731 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
1732
1733         Reverted this commit: as at this point the loop closed SSA form
1734         is under a canonical form respecting the single argument condition.
1735         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1736         close phi nodes may have more than one argument.
1737
1738 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
1739
1740         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1741         gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1742         (detect_commutative_reduction): Same.
1743
1744 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
1745
1746         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1747         close phi nodes may have more than one argument.
1748
1749 2010-03-30  Richard Guenther  <rguenther@suse.de>
1750             Zdenek Dvorak  <ook@ucw.cz>
1751             Sebastian Pop  <sebastian.pop@amd.com>
1752
1753         PR middle-end/43464
1754         * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1755         with multiple arguments.
1756         (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1757
1758 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1759
1760         * graphite-dependences.c (print_pddr): Call print_pdr with an
1761         extra argument.
1762         * graphite-poly.c (debug_pdr): Add an extra argument for the
1763         verbosity level.
1764         (print_pdr): Same.
1765         (print_pbb_domain): Same.
1766         (print_pbb): Same.
1767         (print_scop_context): Same.
1768         (print_scop): Same.
1769         (print_cloog): Same.
1770         (debug_pbb_domain): Same.
1771         (debug_pbb): Same.
1772         (print_pdrs): Same.
1773         (debug_pdrs): Same.
1774         (debug_scop_context): Same.
1775         (debug_scop): Same.
1776         (debug_cloog): Same.
1777         (print_scop_params): Same.
1778         (debug_scop_params): Same.
1779         (print_iteration_domain): Same.
1780         (print_iteration_domains): Same.
1781         (debug_iteration_domain): Same.
1782         (debug_iteration_domains): Same.
1783         (print_scattering_function): Same.
1784         (print_scattering_functions): Same.
1785         (debug_scattering_function): Same.
1786         (debug_scattering_functions): Same.
1787         * graphite-poly.h (debug_pdr): Update declaration.
1788         (print_pdr): Same.
1789         (print_pbb_domain): Same.
1790         (print_pbb): Same.
1791         (print_scop_context): Same.
1792         (print_scop): Same.
1793         (print_cloog): Same.
1794         (debug_pbb_domain): Same.
1795         (debug_pbb): Same.
1796         (print_pdrs): Same.
1797         (debug_pdrs): Same.
1798         (debug_scop_context): Same.
1799         (debug_scop): Same.
1800         (debug_cloog): Same.
1801         (print_scop_params): Same.
1802         (debug_scop_params): Same.
1803         (print_iteration_domain): Same.
1804         (print_iteration_domains): Same.
1805         (debug_iteration_domain): Same.
1806         (debug_iteration_domains): Same.
1807         (print_scattering_function): Same.
1808         (print_scattering_functions): Same.
1809         (debug_scattering_function): Same.
1810         (debug_scattering_functions): Same.
1811
1812 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1813
1814         * graphite-poly.c (print_scattering_function_1): New.
1815         (print_scattering_function): Call it.
1816         (print_scop_params): Remove spaces at the end of lines.
1817         (print_cloog): New.
1818         (debug_cloog): New.
1819         * graphite-poly.h (print_cloog): Declared.
1820         (debug_cloog): Declared.
1821
1822 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1823
1824         * tree-ssa-copy.c: Revert this previous change:
1825         (init_copy_prop): Loop closed phi nodes cancontain more than one
1826         argument.
1827         (execute_copy_prop): Revert the previous change: do not call
1828         rewrite_into_loop_closed_ssa.
1829
1830 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1831             Richard Guenther  <rguenther@suse.de>
1832
1833         PR middle-end/43464
1834         * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1835         contain more than one argument.
1836         (execute_copy_prop): Revert the previous change: do not call
1837         rewrite_into_loop_closed_ssa.
1838
1839         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1840         * gcc.dg/graphite/id-pr43464-1.c: New.
1841
1842 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1843
1844         PR middle-end/43464
1845         * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1846         and verify_loop_closed_ssa when copy prop is executed in the LNO.
1847
1848         * gcc.dg/graphite/id-pr43464.c: New.
1849
1850 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1851
1852         * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1853         in loop->header.
1854         * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1855         * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1856         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1857         to switch between adding the IV bump in loop->latch or in loop->header.
1858
1859 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1860
1861         * passes.c (init_optimization_passes): Add pass_copy_prop
1862         after Graphite.
1863
1864 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1865
1866         * graphite-poly.c (print_scattering_function): Pretty print following
1867         the scoplib format.
1868         (print_pdr): Same.
1869         (print_pbb_domain): Same.
1870         (dump_gbb_cases): Same.
1871         (dump_gbb_conditions): Same.
1872         (print_pdrs): Same.
1873         (print_pbb): Same.
1874         (print_scop_params): Same.
1875         (print_scop_context): Same.
1876         (print_scop): Same.
1877         (print_pbb_body): New.
1878         (lst_indent_to): New.
1879         (print_lst): Start new lines with a #.
1880         * graphite-poly.h (pbb_bb): New.
1881         (pbb_index): Use pbb_bb.
1882         * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1883         disjuncts.
1884         * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1885
1886 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1887
1888         PR middle-end/43351
1889         * gcc.dg/graphite/id-pr43351.c
1890
1891 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1892
1893         PR middle-end/43354
1894         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1895         call insert_out_of_ssa_copy for default definitions.
1896         * gfortran.dg/graphite/id-pr43354.f: New.
1897
1898 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1899
1900         PR middle-end/43349
1901         * gfortran.dg/graphite/pr43349.f: New.
1902
1903 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1904
1905         * graphite-clast-to-gimple.c (my_long_long): Defined.
1906         (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1907         * graphite-sese-to-poly.c (my_long_long): Defined.
1908         (scop_ivs_can_be_represented): Use it.
1909
1910 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1911
1912         * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1913         graphite-max-bbs-per-function, and loop-block-tile-size.
1914         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1915         with "maximum".
1916         (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1917
1918 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1919
1920         * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1921         forward declaration.
1922         * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1923         (add_upper_bounds_from_estimated_nit): New.
1924         (build_loop_iteration_domains): Use it.
1925
1926 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1927
1928         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1929
1930 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1931
1932         PR middle-end/43306
1933         * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1934         should be an INTEGER_CST.  Also handle CASE_CONVERT.
1935         * gcc.dg/graphite/pr43306.c: New.
1936
1937 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1938
1939         * graphite.c (graphite_initialize): To bound the number of bbs per
1940         function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1941         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1942         * doc/invoke.texi: Document it.
1943
1944 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1945
1946         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1947         * graphite-sese-to-poly.h (build_poly_scop): Same.
1948
1949 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1950
1951         * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1952         the number of parameters in the scop.  Use as an upper bound
1953         PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1954         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1955         * doc/invoke.texi: Document it.
1956
1957 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1958
1959         * graphite-sese-to-poly.c (add_param_constraints): Use
1960         lower_bound_in_type and upper_bound_in_type.
1961
1962 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1963
1964         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1965         instead of unsigned_type_node.
1966
1967 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1968             Reza Yazdani  <reza.yazdani@amd.com>
1969
1970         PR middle-end/43065
1971         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1972         on pointer type parameters.
1973
1974         * gcc.dg/graphite/run-id-4.c: New.
1975
1976 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1977
1978         PR middle-end/43065
1979         * gcc.dg/graphite/run-id-3.c: New.
1980
1981 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1982             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1983
1984         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1985         handle conversions from pointer to integers.
1986         (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1987         induction variable, to be able to work with code generated by CLooG.
1988         * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1989         (build_poly_scop): Bail out if we cannot codegen a loop.
1990
1991 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1992
1993         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1994         code generation with gloog_error.
1995
1996 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1997
1998         * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1999         Call fold_convert on all the returned values.
2000         (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
2001         the type of the resulting expression.
2002
2003 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2004
2005         * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
2006         ppl_min_for_le_pointset.  Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
2007         * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
2008
2009 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2010
2011         * graphite-dependences.c (map_into_dep_poly): Removed.
2012         (dependence_polyhedron_1): Use combine_context_id_scat.
2013
2014 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2015
2016         * graphite-poly.h (struct poly_scattering): Add layout documentation.
2017         (struct poly_bb): Same.
2018         (combine_context_id_scat): New.
2019
2020 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2021
2022         PR middle-end/42326
2023         * sese.c (name_defined_in_loop_p): Return false for default
2024         definitions.
2025
2026         * gcc.dg/graphite/pr42326.c: New.
2027
2028 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2029
2030         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
2031         and clean up the logic.
2032
2033 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2034
2035         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
2036         early return.
2037
2038 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2039
2040         PR middle-end/43083
2041         * graphite-scop-detection.c (create_single_exit_edge): Move
2042         the call to find_single_exit_edge to....
2043         (create_sese_edges): ...here.  Don't handle multiple edges
2044         exiting the function.
2045         (build_graphite_scops): Don't handle multiple edges
2046         exiting the function.
2047
2048         * gcc.dg/graphite/pr43083.c: New.
2049
2050 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2051
2052         PR middle-end/43097
2053         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
2054         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
2055
2056         * gfortran.dg/graphite/pr43097.f: New.
2057
2058 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2059             Manuel López-Ibáñez  <manu@gcc.gnu.org>
2060
2061         PR middle-end/43140
2062         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
2063
2064 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
2065
2066         PR middle-end/43026
2067         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
2068
2069         * g++.dg/graphite/pr43026.C: New.
2070
2071 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2072
2073         * Merge from mainline (154736:156693).
2074
2075 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
2076
2077         PR middle-end/43012
2078         * gcc.dg/graphite/pr43012.c: New.
2079
2080 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2081
2082         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
2083 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2084
2085         * g++.dg/graphite/pr42930.C: New.
2086
2087 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2088
2089         PR middle-end/42930
2090         * graphite-scop-detection.c (graphite_can_represent_scev): Call
2091         graphite_can_represent_init for MULT_EXPR.
2092
2093 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2094
2095         PR middle-end/42914
2096         PR middle-end/42530
2097         * graphite-sese-to-poly.c (remove_phi): New.
2098         (translate_scalar_reduction_to_array): Call remove_phi.
2099
2100         * gcc.dg/graphite/pr42530.c: New.
2101         * gcc.dg/graphite/pr42914.c: New.
2102
2103 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2104
2105         PR middle-end/42771
2106         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
2107         * graphite-clast-to-gimple.h (gloog): Update declaration.
2108         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
2109         * graphite-poly.h (struct poly_bb): Add missing comments.
2110         (struct scop): Add poly_scop_p field.
2111         (POLY_SCOP_P): New.
2112         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
2113         * graphite.c (graphite_transform_loops): Build the polyhedral
2114         representation for each scop before code generation.
2115         * sese.c (rename_variables_in_operand): Removed.
2116         (rename_variables_in_expr): Return the renamed expression.
2117         (rename_sese_parameters): New.
2118         * sese.h (rename_sese_parameters): Declared.
2119
2120         * gcc.dg/graphite/pr42771.c: New.
2121
2122 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2123
2124         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
2125         return 0 from main.
2126         * gcc.dg/graphite/block-1.c: Same.
2127         * gcc.dg/graphite/block-3.c: Same.
2128         * gcc.dg/graphite/block-4.c: Same.
2129         * gcc.dg/graphite/block-5.c: Same.
2130         * gcc.dg/graphite/block-6.c: Same.
2131         * gcc.dg/graphite/block-7.c: Same.
2132         * gcc.dg/graphite/interchange-0.c: Same.
2133         * gcc.dg/graphite/interchange-1.c: Same.
2134         * gcc.dg/graphite/interchange-10.c: Same.
2135         * gcc.dg/graphite/interchange-11.c: Same.
2136         * gcc.dg/graphite/interchange-12.c: Same.
2137         * gcc.dg/graphite/interchange-2.c: Same.
2138         * gcc.dg/graphite/interchange-3.c: Same.
2139         * gcc.dg/graphite/interchange-4.c: Same.
2140         * gcc.dg/graphite/interchange-5.c: Same.
2141         * gcc.dg/graphite/interchange-6.c: Same.
2142         * gcc.dg/graphite/interchange-7.c: Same.
2143         * gcc.dg/graphite/interchange-8.c: Same.
2144         * gcc.dg/graphite/interchange-9.c: Same.
2145         * gcc.dg/graphite/interchange-mvt.c: Same.
2146
2147 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2148
2149         * gfortran.dg/graphite/id-19.f: New.
2150         * gfortran.dg/graphite/pr14741.f90: New.
2151         * gfortran.dg/graphite/pr41924.f90: New.
2152         * gfortran.dg/graphite/run-id-2.f90: New.
2153
2154 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2155
2156         PR middle-end/42988
2157         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
2158         to unknown_dependence.
2159         (graphite_legal_transform_dr): Handle the unknown_dependence.
2160         (graphite_carried_dependence_level_k): Same.
2161
2162 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
2163
2164         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
2165
2166 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
2167             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2168
2169         PR middle-end/42637
2170         * graphite-dependences.c (build_lexicographical_constraint): Return
2171         a union of dependence polyhedra.
2172         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
2173
2174         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
2175         * gcc.dg/graphite/block-4.c: Same.
2176         * gcc.dg/graphite/block-7.c: Same.
2177         * gcc.dg/graphite/interchange-12.c: Same.
2178         * gcc.dg/graphite/interchange-mvt.c: Same.
2179         * gfortran.dg/graphite/interchange-1.f: XFAILed.
2180         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
2181         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
2182
2183 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2184
2185         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
2186         the execution check to FAIL.  This testcase is miscompiled by Graphite
2187         and the check should be re-enabled.
2188         * gcc.dg/graphite/interchange-mvt.c: Same.
2189         * gcc.dg/graphite/block-0.c: Same.
2190         * gcc.dg/graphite/block-4.c: Same.
2191         * gcc.dg/graphite/block-7.c: Same.
2192
2193 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2194
2195         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
2196         * gcc.dg/graphite/scop-0.c: Fix spaces.
2197         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
2198         * gfortran.dg/graphite/block-2.f: Same.
2199         * gfortran.dg/graphite/block-3.f90: Same.
2200         * gfortran.dg/graphite/block-4.f90: Same.
2201         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
2202         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
2203
2204 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2205
2206         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
2207         PDDR_ORIGINAL_SCATTERING_P.
2208         (pddr_is_empty): Rewritten.
2209         (print_dependence_polyhedron_layout): New.
2210         (print_pddr): New.
2211         (debug_pddr): New.
2212         (build_alias_set_powerset): Moved up.
2213         (poly_drs_may_alias_p): Moved up.
2214         (lexicographically_gt_p): Removed.
2215         (build_lexicographically_gt_constraint): Renamed
2216         build_lexicographical_constraint, reimplemented.
2217         (dependence_polyhedron_1): Simplified parameters.
2218         (dependence_polyhedron): Same.  Keep along empty PDDRs
2219         to make efficient use of the cache.
2220         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
2221         (graphite_legal_transform_dr): Rewritten.
2222         (graphite_legal_transform_bb): Pass fewer arguments to
2223         graphite_legal_transform_dr.
2224         (graphite_carried_dependence_level_k): Simplified implementation.
2225         (dot_original_deps_stmt_1): Call dependence_polyhedron.
2226         (dot_transformed_deps_stmt_1): Same.
2227         (dot_original_deps): Same.
2228         (dot_transformed_deps): Same.
2229         * graphite-dependences.h (struct poly_ddr): Added a new field
2230         original_scattering_p.
2231         (PDDR_ORIGINAL_SCATTERING_P): New.
2232         (print_pddr): Declared.
2233         (debug_pddr): Declared.
2234         * graphite-ppl.c: Clarify comment.
2235         * sese.h (print_gimple_bb): Removed unused declaration.
2236         (debug_gbb): Same.
2237
2238 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
2239
2240         * g++.dg/graphite/graphite.exp: Rewritten.
2241         * gcc.dg/graphite/graphite.exp: Rewritten.
2242         * gfortran.dg/graphite/graphite.exp: Rewritten.
2243         * gcc.dg/graphite/block-0.c: Added runtime test.
2244         * gcc.dg/graphite/block-1.c: Same.
2245         * gcc.dg/graphite/block-3.c: Same.
2246         * gcc.dg/graphite/block-4.c: Same.
2247         * gcc.dg/graphite/block-5.c: Same.
2248         * gcc.dg/graphite/block-6.c: Same.
2249         * gcc.dg/graphite/block-7.c: Same.
2250         * gcc.dg/graphite/interchange-0.c: Same.
2251         * gcc.dg/graphite/interchange-1.c: Same.
2252         * gcc.dg/graphite/interchange-10.c: Same.
2253         * gcc.dg/graphite/interchange-11.c: Same.
2254         * gcc.dg/graphite/interchange-12.c: Same.
2255         * gcc.dg/graphite/interchange-2.c: Same.
2256         * gcc.dg/graphite/interchange-3.c: Same.
2257         * gcc.dg/graphite/interchange-4.c: Same.
2258         * gcc.dg/graphite/interchange-5.c: Same.
2259         * gcc.dg/graphite/interchange-6.c: Same.
2260         * gcc.dg/graphite/interchange-7.c: Same.
2261         * gcc.dg/graphite/interchange-8.c: Same.
2262         * gcc.dg/graphite/interchange-9.c: Same.
2263         * gcc.dg/graphite/interchange-mvt.c: Same.
2264         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
2265
2266 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2267
2268         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
2269           background.
2270
2271 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2272
2273         * common.opt: Add -fgraphite-cloog-opts.
2274         * graphite-clast-to-gimple.c (set_cloog_options): Same.
2275         * opts.c (decode_options): Same.
2276
2277 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2278
2279         * gcc.dg/graphite/id-17.c: New.
2280         * gcc.dg/graphite/pr41888.c: New.
2281         * gcc.dg/graphite/scop-22.c: New.
2282         * gfortran.dg/graphite/pr40982.f90: New.
2283
2284 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2285
2286         * graphite-dependences.c: Clarify comments.
2287         (build_pddr): Add an extra parameter direction.
2288         (graphite_legal_transform_dr): Use build_pddr.
2289         (dot_original_deps_stmt_1): Update use of build_pddr.
2290         (dot_transformed_deps_stmt_1): Same.
2291         (dot_original_deps): Same.
2292         (dot_transformed_deps): Same.
2293
2294         * gcc.dg/graphite/interchange-12.c: New.
2295         * gcc.dg/graphite/block-7.c: New.
2296
2297 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2298
2299         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
2300         (pddr_transformed_scattering): Removed.
2301         (graphite_legal_transform_dr): Use build_pddr.
2302         (dot_original_deps_stmt_1): Same.
2303         (dot_transformed_deps_stmt_1): Same.
2304         (dot_original_deps): Same.
2305         (dot_transformed_deps): Same.
2306
2307 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2308
2309         * graphite-dependences.c (lexicographically_gt_p): Add comments.
2310         (build_lexicographically_gt_constraint): Same.
2311         (dependence_polyhedron_1): Same.
2312         (dependence_polyhedron): Same.
2313
2314 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2315
2316         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
2317         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
2318         (lexicographically_gt_p): Change type of direction to int.
2319         (build_lexicographically_gt_constraint): Same.
2320         (dependence_polyhedron_1): Same.
2321         (dependence_polyhedron): Same.
2322         (pddr_original_scattering): Use integers for direction.
2323         (pddr_transformed_scattering): Same.
2324         (graphite_legal_transform_dr): Same.
2325         (graphite_carried_dependence_level_k): Same.
2326
2327 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2328
2329         * graphite-dependences.c (build_pairwise_constraint): Renamed
2330         ppl_build_relation.  Moved...
2331         (dr_equality_constraints): Use ppl_build_relation.
2332         (build_pairwise_scheduling_equality): Same.
2333         (build_pairwise_scheduling_inequality): Same.
2334         * graphite-ppl.c (ppl_build_relation): ...here.
2335         * graphite-ppl.h (ppl_build_relation): Declared.
2336
2337 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2338
2339         PR middle-end/42681
2340         * graphite-clast-to-gimple.c (gloog_error): New static variable.
2341         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
2342         Set gloog_error when such an expression failed to be built.
2343         (translate_clast): Early return when gloog_error is set.
2344         (gloog): Clear gloog_error.  When gloog_error is set, call
2345         set_ifsese_condition to enable the original code.  Return the status
2346         of the code generation based on gloog_error.
2347         * sese.c (set_ifsese_condition): New.
2348         * sese.h (set_ifsese_condition): Declared.
2349
2350         * g++.dg/graphite/pr42681.C: New.
2351
2352 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2353
2354         PR middle-end/42732
2355         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
2356         rename_nb_iterations.
2357         * sese.c (rename_variables_in_operand): New.
2358         (rename_variables_in_expr): New.
2359         (rename_nb_iterations): New.
2360         (sese_adjust_liveout_phis): Update the rename_map.
2361         * sese.h (rename_nb_iterations): Declared.
2362         * tree-scalar-evolution.c (scev_reset_htab): New.
2363         (scev_reset): Call scev_reset_htab.
2364         * tree-scalar-evolution.h (scev_reset_htab): Declared.
2365
2366         * gfortran.dg/graphite/pr42732.f: New.
2367
2368 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2369
2370         PR middle-end/42393
2371         * graphite-clast-to-gimple.c: Fix formatting.
2372         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
2373         (expr_defined_in_loop_p): New.
2374         (add_loop_exit_phis): Also handle full expressions: remove from
2375         the rename_map the expressions defined in the loop that we're closing.
2376
2377         * gfortran.dg/graphite/pr42393-1.f90: New.
2378         * gfortran.dg/graphite/pr42393.f90: Add new flags
2379         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
2380         make this testcase useful in the Graphite branch.
2381
2382 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2383
2384         * graphite-scop-detection.c (exclude_component_ref): Removed.
2385         (is_simple_operand): Removed.
2386         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
2387
2388 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2389
2390         PR middle-end/42221
2391         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2392         the array indexing of ADDR_EXPRs.
2393
2394         * gcc.dg/graphite/pr42221.c: New.
2395
2396 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2397
2398         PR middle-end/42521
2399         * graphite.c (graphite_finalize): Call scev_reset.
2400         (graphite_transform_loops): Do not call scev_reset between the code
2401         generation of scops.
2402
2403         * gcc.dg/graphite/pr42521.c: New.
2404
2405 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2406
2407         * graphite-interchange.c (memory_stride_in_loop): Renamed
2408         pdr_stride_in_loop.
2409         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
2410         (memory_strides_in_loop): Memoize the memory strides per loop.
2411         (lst_interchange_profitable_p): Do not initialize to zero the memory
2412         strides.
2413         * graphite-poly.h (struct lst): Add a field memory_strides.
2414         (LST_LOOP_MEMORY_STRIDES): New.
2415         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
2416         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
2417
2418 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2419
2420         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
2421         memory_strides_in_loop.  Gather memory strides on a whole loop.
2422         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
2423         (lst_interchange_profitable_p): Removed.
2424         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
2425
2426 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2427
2428         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2429         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2430         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2431         Remove context_loop and level.
2432
2433 2010-01-07  Richard Guenther  <rguenther@suse.de>
2434
2435         PR tree-optimization/42641
2436         * sese.c (rename_map_elt_info): Use the SSA name version, do
2437         not hash pointers.
2438
2439 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2440
2441         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
2442         blocked" only when both the strip mine and the interchange have
2443         been applied.
2444
2445         * gcc.dg/graphite/block-2.c: Removed.
2446         * gcc.dg/graphite/block-3.c: Add scan pattern.
2447         * gcc.dg/graphite/block-4.c: Same.
2448         * gcc.dg/graphite/block-5.c: Same.
2449         * gcc.dg/graphite/block-6.c: Same.
2450
2451 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
2452
2453         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
2454         before allocating a new one.
2455         (copy_renames): Check that slot is not NULL.
2456         (mark_bb_with_pbb): Same.
2457         (compute_cloog_iv_types_1): Same.
2458         * graphite-interchange.c (lst_perfect_nestify): Free the before,
2459         nest, and after LSTs.
2460         (lst_try_interchange_loops): Same.
2461
2462 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
2463
2464         PR middle-end/42178
2465         * graphite-interchange.c (lst_try_interchange_loops): Do not return
2466         the before, nest, and after LSTs.
2467         (lst_try_interchange): Removed.
2468         (lst_interchange_select_inner): Do not iterate over the LSTs if they
2469         were modified.
2470         (lst_interchange_select_outer): Apply interchange on the outer loop
2471         until there are no more changes in the inner loops.
2472
2473 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2474
2475         Revert patch fixing PR middle-end/42221.
2476
2477 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2478
2479         PR middle-end/42180
2480         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
2481         GIMPLE_CALL.
2482
2483         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
2484
2485 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
2486
2487         PR middle-end/42180
2488         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
2489         that contain only one statement.
2490
2491         * gfortran.dg/graphite/pr42180.f90: New.
2492
2493 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2494
2495         PR middle-end/42393
2496         * gfortran.dg/graphite/pr42393.f90: New.
2497
2498 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2499
2500         PR middle-end/42186
2501         * gfortran.dg/graphite/pr42186.f90: New.
2502
2503 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2504
2505         PR middle-end/42205
2506         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
2507         Insert the reduction copy in the same block as the phi node.
2508         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
2509
2510         * gcc.dg/graphite/pr42205-1.c: New.
2511         * gcc.dg/graphite/pr42205-2.c: New.
2512
2513 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2514
2515         PR middle-end/42221
2516         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
2517         the array indexing of ADDR_EXPRs.
2518
2519         * gcc.dg/graphite/pr42221.c: New.
2520
2521 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
2522
2523         PR middle-end/42178
2524         PR middle-end/42334
2525         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
2526         index.  Call lst_interchange_select_inner only once.
2527         (lst_interchange_select_inner): Update use of lst_try_interchange.
2528         (lst_interchange_select_outer): Update.
2529
2530 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2531
2532         PR middle-end/42178
2533         PR middle-end/42334
2534         * graphite-interchange.c (lst_try_interchange): Do not increment the
2535         the OUTER index when there is no AFTER kernel.  Do not increment the
2536         OUTER index for after processing the AFTER kernel.
2537         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
2538         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
2539         index.  Do not pass to lst_interchange_select_inner the OUTER index.
2540         (scop_do_interchange): Update use of lst_interchange_select_outer.
2541
2542         * gfortran.dg/graphite/graphite.exp
2543         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
2544         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
2545         the graphite dump file.
2546         * gfortran.dg/graphite/interchange-2.f: Same.
2547         * gfortran.dg/graphite/pr42334-1.f: New.
2548
2549 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2550
2551         PR middle-end/42178
2552         PR middle-end/42334
2553         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2554         that are empty.
2555         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2556         (lst_try_interchange): Reimplemented.
2557         (lst_interchange_select_inner): Same.
2558         (lst_do_interchange): Renamed lst_interchange_select_outer.
2559         Reimplemented.
2560         (scop_do_interchange): Update use of lst_interchange_select_outer.
2561
2562         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2563         * gcc.dg/graphite/block-0.c: Un-XFAILed.
2564         * gcc.dg/graphite/pr42211.c: New.
2565         * gfortran.dg/graphite/pr42334.f90: New.
2566
2567 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
2568
2569         PR middle-end/42181
2570         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2571         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2572
2573         * gfortran.dg/graphite/pr42181.f90: New.
2574
2575 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
2576
2577         PR middle-end/42284
2578         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2579         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2580         (detect_commutative_reduction_arg): Simplified.
2581         (detect_commutative_reduction): Early return when the argument of
2582         the close phi is not of an SSA_NAME.
2583
2584         * gcc.dg/graphite/pr42284.c: New.
2585
2586 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
2587
2588         * dbgcnt.def (graphite_scop): New counter.
2589         * graphite.c: Include dbgcnt.h
2590         (graphite_transform_loops): Use new counter to limit transformations.
2591
2592 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
2593
2594         PR middle-end/42285
2595         * graphite-scop-detection.c (graphite_can_represent_init): Also
2596         handle more complex MULT_EXPRs containing parameters by recursion
2597         on the structure.
2598
2599         * gfortran.dg/graphite/pr42285.f90: New.
2600
2601 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2602
2603         * g++.dg/graphite/pr42130.C: Fix type.
2604
2605 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
2606
2607         * g++.dg/graphite/pr42130.C: Correct testcase.
2608
2609 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2610
2611         * Merge from mainline (154493:154734).
2612
2613 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2614
2615         * Merge from mainline (151362:154491).
2616
2617 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2618
2619         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2620         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2621
2622 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2623
2624         PR middle-end/42130
2625         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2626         translate_clast_for_loop): New.
2627         (translate_clast_for): Add a condition around the loop, to do not
2628         execute loops with zero iterations.
2629         * g++.dg/graphite/pr42130.C: New.
2630         * gcc.dg/graphite/pr35356-2.c: Adapt.
2631
2632 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2633
2634         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2635         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2636         Remove context_loop and level.
2637
2638 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2639
2640         * graphite-clast-to-gimple.c (translate_clast_user,
2641         translate_clast_for, translate_clast_guard): Simplify and move common
2642         elements to translate_clast().
2643         (translate_clast): Simplify and get common elements.
2644
2645 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2646
2647         * graphite-clast-to-gimple.c (translate_clast_user,
2648         translate_clast_for, translate_clast_guard): Split out of
2649         translate_clast.
2650
2651 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2652
2653         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2654         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2655         debug_clast_name_indexes_1, debug_clast_name_indexes,
2656         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2657         (clast_name_to_gcc, clast_to_gcc_expression,
2658         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2659         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2660         graphite_create_guard_cond_expr, graphite_create_new_loop,
2661         translate_clast): Add params_index.
2662         (initialize_cloog_names): Create parameter strings from scratch, do
2663         not reference other strings.
2664         (create_params_index): New.
2665         (gloog): Initialize params_index.
2666         * graphite-scop-detection (free_scops_1): Removed.
2667         (limit_scops): Use normal free_scops.
2668         * graphite-sese-to-poly.c (save_var_names): Removed.
2669         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2670         and SESE_PARAMS_INDEX.
2671         * sese.c (new_sese, free_sese): Dito.
2672         * sese.h (struct sese): Remove params_index, params_names.
2673         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2674
2675 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2676
2677         Revert the following patch from 2009-09-14:
2678         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2679         tree-scalar-evolution.h, and then tree-data-ref.h.
2680         * graphite-clast-to-gimple.c: Same.
2681         * graphite-dependences.c: Same.
2682         * graphite-interchange.c: Same.
2683         * graphite-poly.c: Same.
2684         * graphite-scop-detection.c: Same.
2685         * graphite-sese-to-poly.c: Same.
2686         * graphite.c: Same.
2687         * lambda-code.c: Same.
2688         * matrix-reorg.c: Same.
2689         * tree-data-ref.c: Same.
2690         * tree-if-conv.c: Same.
2691         * tree-loop-distribu: Same.: Same.
2692         * tree-loop-linear.c: Same.
2693         * tree-parloops.c: Same.
2694         * tree-predcom.c: Same.
2695         * tree-vect-patterns.c: Same.
2696
2697 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2698
2699         Revert patch from 2009-09-14.
2700         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2701         passes at -O1 and below.
2702
2703 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2704
2705         PR middle-end/40281
2706         * gcc.dg/graphite/pr40281.c: New.
2707
2708         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2709         evolutions should not variate in inner loops.
2710
2711 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2712
2713         PR middle-end/42050
2714         * gfortran.dg/graphite/pr42050.f90: New.
2715
2716 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2717
2718         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2719         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2720
2721 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2722
2723         * graphite-blocking.c (scop_do_block): New.
2724         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2725         * graphite-poly.h (scop_do_block): Declared.
2726
2727 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2728
2729         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2730         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2731         to transform depth into the time_depth before calling
2732         pbb_number_of_iterations_at_time.
2733         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2734         lst_depth.
2735
2736 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2737
2738         Reverted the patch for "scattering permutations" from 2009-10-28.
2739
2740         * graphite-poly.c (print_permutation): New.
2741         (debug_permutation): New.
2742         (new_poly_bb): Initialize PBB_PERMUTATION.
2743         (free_poly_bb): Free PBB_PERMUTATION.
2744         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2745         (struct pbb_permutation_elt): New.
2746         (PBB_PERMUTATION_ELT_STRIDE): New.
2747         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2748         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2749         (new_pbb_permutation_elt): New.
2750         (pbb_permutation_elt_free): New.
2751         (struct poly_bb): Add field permutation.
2752         (PBB_PERMUTATION): New.
2753         (print_permutation): Declared.
2754         (debug_permutation): Declared.
2755
2756 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2757
2758         * graphite-interchange.c (build_partial_difference): New.
2759         (memory_stride_in_loop): Refactored the computation of
2760         equality constraints into build_partial_difference function.
2761         Added support for debugging stride computations.
2762
2763 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2764
2765         * graphite-clast-to-gimple.c (gloog): Free if_region,
2766         if_region->true_region, and if_region->region.
2767         * sese.c (if_region_set_false_region): Free if_region->false_region.
2768         (create_if_region_on_edge): Do not use GGC_NEW.
2769         (move_sese_in_condition): Remove useless initialization.
2770
2771 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2772
2773         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2774         for the loops created by the loop distribution.  Do not modify the
2775         input LSTs.
2776         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2777         transformed schedule.  Call lst_update_scattering before data
2778         dependence analysis.
2779         (lst_try_interchange): Pass an extra parameter INDEX.
2780         (lst_do_interchange_1): New.
2781         (lst_do_interchange): Call lst_do_interchange_1.
2782         (scop_do_interchange): Call lst_update_scattering.
2783         * graphite-poly.c (apply_poly_transforms): Do not call
2784         lst_update_scattering.
2785         * graphite-poly.h (lst_pred): New.
2786         (lst_succ): New.
2787         (lst_find_first_pbb): Return NULL when not found.
2788         (lst_empty_p): New.
2789         (lst_insert_in_sequence): Allow LST1 to be NULL.
2790         (lst_replace): New.
2791         (lst_substitute_3): New.
2792         * gcc.dg/graphite/interchange-1.c: XFail.
2793         * gcc.dg/graphite/interchange-8.c: XFail.
2794         * gcc.dg/graphite/interchange-11.c: XFail.
2795
2796 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2797
2798         * graphite-interchange.c (lst_perfectly_nested_p): New.
2799         (lst_perfect_nestify): New.
2800         (lst_try_interchange_loops): Call store_lst_schedule,
2801         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2802         (scop_do_interchange): Avoid redundant legality test.
2803         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2804         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2805         * graphite-poly.h (psct_static_dim): New.
2806         (lst_dewey_number_at_depth): New.
2807         (lst_find_pbb): Restructured.
2808         (lst_find_first_pbb): Restructured.
2809         (lst_find_last_pbb): New.
2810         (lst_contains_p): New.
2811         (lst_contains_pbb): New.
2812         (lst_create_nest): New.
2813         (lst_remove_from_sequence): New.
2814         (pbb_update_scattering): New.
2815         (lst_update_scattering_under): New.
2816         (lst_update_scattering_seq): New.
2817         (lst_update_scattering): New.
2818         (lst_insert_in_sequence): New.
2819         (lst_distribute_lst): New.
2820         (lst_remove_all_before_including_pbb): New.
2821         (lst_remove_all_before_excluding_pbb): New.
2822
2823 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2824
2825         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2826         get_loop_exit_edges.
2827
2828 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2829
2830         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2831
2832 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2833
2834         * graphite-poly.c (print_permutation): New.
2835         (debug_permutation): New.
2836         (new_poly_bb): Initialize PBB_PERMUTATION.
2837         (free_poly_bb): Free PBB_PERMUTATION.
2838         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2839         (struct pbb_permutation_elt): New.
2840         (PBB_PERMUTATION_ELT_STRIDE): New.
2841         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2842         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2843         (new_pbb_permutation_elt): New.
2844         (pbb_permutation_elt_free): New.
2845         (struct poly_bb): Add field permutation.
2846         (PBB_PERMUTATION): New.
2847         (print_permutation): Declared.
2848         (debug_permutation): Declared.
2849
2850 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2851
2852         * graphite-clast-to-gimple.c (gloog): Do not call
2853         sese_reset_aux_in_loops.
2854         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2855         extra argument for domains.  Do not use loop->aux.
2856         (build_scop_iteration_domain): Initialize and free domains, pass it
2857         to build_loop_iteration_domains and extract the information from
2858         domains.  Do not use loop->aux.
2859         * sese.c (sese_reset_aux_in_loops): Removed.
2860         * sese.h (sese_reset_aux_in_loops): Removed.
2861
2862 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2863
2864         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2865         (dependency_in_loop_p): Same.
2866         (translate_clast): Do not use loop->aux.  Initialize
2867         loop->can_be_parallel.
2868         (mark_loops_parallel): Removed.
2869         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2870         * graphite.c (free_aux_in_new_loops): Removed.
2871         (graphite_finalize): Do not call free_aux_in_new_loops.
2872         (graphite_transform_loops): Do not call mark_loops_parallel.
2873
2874 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2875
2876         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2877         (translate_clast): Pass an extra parameter LEVEL.
2878         Call get_scattering_level.
2879         * graphite-clast-to-gimple.h (get_scattering_level): New.
2880
2881 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2882
2883         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2884         * cfgloop.h (struct loop): New field single_iv.
2885
2886         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2887         loop->aux anymore: use loop->single_iv.
2888         (graphite_loop_normal_form): Moved...
2889         (build_graphite_loop_normal_form): Removed.
2890         (gloog): Do not call build_graphite_loop_normal_form.
2891         (free_aux_in_new_loops): Moved...
2892         (mark_loops_parallel): Restructure.
2893         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2894         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2895         (scop_canonicalize_loops): New.
2896         (build_poly_scop): Call scop_canonicalize_loops.
2897         * graphite.c (free_aux_in_new_loops): ...here.
2898
2899 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2900
2901         * g++.dg/graphite/graphite.exp: Add the same rules as in
2902         gcc.dg/graphite/graphite.exp.
2903
2904 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2905
2906         * g++.dg/graphite/id-1.C: New.
2907
2908 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2909
2910         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2911         argument base_name.
2912         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2913         (rewrite_phi_out_of_ssa): Same.
2914         (rewrite_cross_bb_scalar_deps): Same.
2915         (translate_scalar_reduction_to_array): Same.
2916
2917 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2918
2919         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2920         dump_alias_graphs.
2921
2922 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2923
2924         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2925         (build_scop_drs): Call dump_alias_graphs.
2926
2927 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2928
2929         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2930         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2931         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2932         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2933         * graphite-poly.h (free_lst): New.
2934         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2935         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2936
2937 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2938
2939         * graphite-poly.h (struct scop): Add a field saved_schedule.
2940         (SCOP_SAVED_SCHEDULE): New.
2941         (store_lst_schedule): New.
2942         (restore_lst_schedule): New.
2943         (store_scattering): Call store_lst_schedule.
2944         (restore_scattering): Call restore_lst_schedule.
2945
2946 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2947
2948         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2949         (pdr_add_alias_set): Same.
2950         (build_poly_dr): Same.
2951         (build_alias_set_optimal_p): Same.
2952         (build_base_obj_set_for_drs): Same.  Do not store the result of
2953         graphds_dfs.
2954
2955 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2956
2957         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2958         all_components_are_cliques to 1.
2959
2960 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2961
2962         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2963         the new structure.
2964         (pdr_add_alias_set): Update retrieving alias_set_num.
2965         (build_poly_dr): Update retrieving dr_base_object_set.
2966         (partition_drs_to_sets): Remove.
2967         (build_alias_set_optimal_p): New.
2968         (build_alias_set_for_drs): Rename.
2969         (build_scop_drs): Update.
2970         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2971         (ALIAS_SET_INDEX): Remove.
2972         (BASE_OBJECT_SET_INDEX): Remove.
2973
2974 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2975
2976         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2977
2978 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2979
2980         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2981         loop upper bounds for 1-element arrays at end of structures.
2982         * tree-flow.h (array_at_struct_end_p): Declared.
2983         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2984
2985 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2986
2987         * g++.dg/graphite/pr41305.C: New.
2988
2989 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
2990
2991         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2992         construction of parameter constraints from loop iteration analysis.
2993         * gcc.dg/graphite/run-id-2.c: New test.
2994
2995 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2996
2997         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2998         and new_cstr.
2999
3000 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3001
3002         * graphite-dependences.c (dependence_polyhedron_1): Remove
3003         unused gdim dimensions from the DDR polyhedron.
3004
3005 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3006
3007         * graphite-dependences.c (pddr_transformed_scattering): New.
3008         (dot_original_deps_stmt_1): New.
3009         (dot_transformed_deps_stmt_1): New.
3010         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
3011         dot_transformed_deps_stmt_1.
3012         (dot_original_deps): New.
3013         (dot_transformed_deps): New.
3014         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
3015
3016 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3017
3018         * graphite-dependences.c (reduction_dr_1): Remove wrong
3019         assert: reduction BBs can have multiple reduction writes
3020         to memory.  interchange-3.f90 is an example.
3021
3022 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3023
3024         * gfortran.dg/graphite/interchange-3.f90: New.
3025
3026 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3027
3028         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
3029
3030 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3031
3032         * graphite-dependences.c (dependence_polyhedron_1): Add the
3033         context to the dependence polyhedron.
3034
3035 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3036
3037         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
3038         PBB_PDR_DUPLICATES_REMOVED.
3039         (new_poly_bb): Same.
3040
3041 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3042
3043         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
3044         SCOP_CONTEXT.
3045         (build_loop_iteration_domains): Extract bounds on parameters
3046         based on the data size.
3047         (build_scop_context): Do not initialize SCOP_CONTEXT;
3048         add new constraints.
3049
3050 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3051
3052         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
3053         * graphite-ppl.h (graphite-ppl.h): Declared.
3054
3055 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
3056
3057         * graphite-ppl.c (ppl_print_linear_expr): New.
3058         (debug_ppl_linear_expr): New.
3059         * graphite-ppl.h (ppl_print_linear_expr): Declared.
3060         (debug_ppl_linear_expr): Declared.
3061
3062 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
3063
3064         * graphite-interchange.c: Fix comments.
3065         * gcc.dg/graphite/block-1.c: Fix comments.
3066
3067 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
3068
3069         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
3070         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
3071
3072 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
3073
3074         Reapply the patch from Alexander Monakov that disappeared during
3075         the last merges from trunk.
3076
3077         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
3078
3079         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3080         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3081
3082 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3083
3084         * graphite-interchange.c (memory_stride_in_loop): The depth
3085         argument corresponds to a dynamic time dimension, so use
3086         psct_dynamic_dim to refer to the transformed scattering dimension.
3087
3088 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3089
3090         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
3091
3092 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3093
3094         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
3095         root of the LST.
3096         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
3097         the root of the LST.
3098         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
3099         fake loop.
3100         (print_lst): Print the root of LST in a different format.
3101         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
3102
3103 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3104
3105         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
3106
3107 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3108
3109         * doc/passes.texi: Document the Graphite infrastructure.
3110
3111 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3112
3113         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
3114         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
3115         and check the SSA representation.
3116
3117         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
3118
3119 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
3120
3121         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
3122
3123 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3124
3125         * gcc.dg/graphite/interchange-11.c: New.
3126
3127 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3128
3129         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
3130
3131 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3132
3133         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3134         Add -fno-loop-strip-mine and -fno-loop-interchange.
3135         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
3136         -fno-loop-strip-mine.
3137         * gfortran.dg/graphite/graphite.exp: Same.
3138
3139 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3140
3141         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3142         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
3143         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
3144         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
3145         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
3146         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
3147         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
3148         DEFAULT_FLAGS_GRAPHITE_SCOP.
3149         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
3150         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
3151
3152 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3153
3154         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
3155
3156 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3157             Sebastian Pop  <sebastian.pop@amd.com>
3158
3159         * graphite-interchange.c (build_linearized_memory_access): Pass an
3160         offset as parameter.
3161         (memory_stride_in_loop): Include transform scattering in the
3162         access functions to be able to querry the strides in the
3163         transformed loops.
3164         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
3165         not the psct_iterator_dim.
3166
3167 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3168
3169         * graphite-blocking.c (pbb_do_strip_mine): Removed.
3170         (lst_do_strip_mine_loop): New.
3171         (lst_do_strip_mine): New.
3172         (scop_do_strip_mine): Call lst_do_strip_mine.
3173         * graphite-poly.h (lst_add_loop_under_loop): New.
3174         (lst_find_first_pbb): New.
3175
3176 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3177
3178         * graphite-poly.c (loop_to_lst): Fix LST creation.
3179
3180 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
3181
3182         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
3183         sizeof(unsigned long) to make it run on 32bit systems.
3184
3185 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
3186
3187         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
3188         SEGFAULT on 32bit.
3189
3190 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
3191
3192         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
3193         Comment.
3194         (write_alias_graph_to_ascii_dot): New.
3195         (write_alias_graph_to_ascii_ecc): Ditto.
3196         (partition_drs_to_sets): Add testing of optimality of current method
3197         which assigns alias numbers according to DFS Comopnent number.  used
3198         as heuristic for the upcoming ECC algorithm.
3199         (build_scop_drs): Write to file also with the ecc and dot format.
3200
3201 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3202
3203         * gfortran.dg/graphite/interchange-1.f: XFail.
3204
3205 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3206
3207         * graphite.c (graphite_initialize): Do not handle functions with
3208         more than 100 basic blocks.
3209
3210 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3211
3212         * graphite-blocking.c (pbb_do_strip_mine): Use
3213         PARAM_LOOP_BLOCK_TILE_SIZE.
3214
3215 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3216
3217         * graphite-poly.c (dot_lst_1): New.
3218         (dot_lst): New.
3219         * graphite-poly.h (dot_lst): Declared.
3220
3221 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
3222
3223         * graphite-dependences.c (dot_deps_stmt_1): New.
3224         (dot_deps_stmt): New.
3225         * graphite-dependences.h (dot_deps_stmt): Declared.
3226
3227 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3228
3229         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
3230         not replace cross BB scalar dependences ending on PHI nodes.
3231         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
3232
3233 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3234
3235         * graphite-poly.c (apply_poly_transforms): Implement the high
3236         level driver for flag_loop_block.
3237         * opts.c (decode_options): Enable flag_loop_block at -O2.
3238         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
3239         flag_loop_block.
3240
3241         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
3242         -floop-block.
3243         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
3244         Add -floop-block.
3245
3246 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3247
3248         * graphite-poly.h (lst_find_pbb): New.
3249         (find_lst_loop): New.
3250
3251 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3252
3253         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
3254         * graphite-poly.h (struct scop): Remove dep_graph field.
3255         (SCOP_DEP_GRAPH): Removed.
3256
3257 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
3258
3259         * graphite-poly.h (copy_lst): Do full copy of LST.
3260
3261 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
3262
3263         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
3264         when the loop stride is zero.
3265
3266         * gcc.dg/graphite/id-16.c: New.
3267
3268 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3269
3270         * graphite-dependences.c (reduction_dr_1): New.
3271         (reduction_dr_p): New.
3272         (graphite_legal_transform_dr): Call reduction_dr_p.
3273         (reduction_ddr): Renamed reduction_ddr_p.
3274         * graphite-poly.h (same_pdr_p): New.
3275         (number_of_write_pdrs): New.
3276         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
3277         (split_reduction_stmt): Do not split reduction statements
3278         when there are no writes to memory.
3279         (translate_scalar_reduction_to_array_for_stmt): Insert the
3280         memory reduction statement just after the scalar reduction statement.
3281
3282         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
3283         Un-XFAIL-ed.
3284         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
3285         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
3286
3287 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3288
3289         * graphite-interchange.c (lst_apply_interchange): New.
3290         (lst_interchange_profitable_p): New.
3291         (lst_try_interchange_loops): New.
3292         (lst_try_interchange): New.
3293         (lst_do_interchange): New.
3294         (pbb_do_interchange): Removed.
3295         (scop_do_interchange): Call lst_do_interchange.
3296
3297 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
3298
3299         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
3300         SCOP_TRANSFORMED_SCHEDULE.
3301         (loop_to_lst): New.
3302         (scop_to_lst): New.
3303         (print_lst): New.
3304         (debug_lst): New.
3305         * graphite-poly.h (lst_p): New.
3306         (struct lst): New.
3307         (LST_LOOP_P): New.
3308         (LST_LOOP_FATHER): New.
3309         (LST_PBB): New.
3310         (LST_SEQ): New.
3311         (scop_to_lst): Declared.
3312         (print_lst): Declared.
3313         (debug_lst): Declared.
3314         (new_lst_loop): New.
3315         (new_lst_stmt): New.
3316         (copy_lst): New.
3317         (lst_depth): New.
3318         (lst_dewey_number): New.
3319         (struct scop): Add original_schedule and transformed_schedule fields.
3320         (SCOP_ORIGINAL_SCHEDULE): New.
3321         (SCOP_TRANSFORMED_SCHEDULE): New.
3322         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
3323
3324 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3325
3326         * graphite-dependences.c (reduction_ddr): New.
3327         (graphite_legal_transform_bb): Call reduction_ddr.
3328         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
3329         Initialize PBB_IS_REDUCTION.
3330         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
3331         (PBB_IS_REDUCTION): New.
3332         (new_poly_bb): Update declaration.
3333         * graphite-scop-detection.h (build_scop_bbs): Removed.
3334         (nb_reductions_in_loop): Removed.
3335         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
3336         parameter for reductions.
3337         (try_generate_gimple_bb): Update call to new_poly_bb.
3338         (build_scop_bbs_1): Same.
3339         (build_scop_bbs): Same.
3340         (gsi_for_phi_node): New.
3341         (scalar_close_phi_node_p): Remove gcc_assert.
3342         (split_reduction_stmt): New.
3343         (is_reduction_operation_p): New.
3344         (phi_contains_arg): New.
3345         (follow_ssa_with_commutative_ops): New.
3346         (detect_commutative_reduction_arg): New.
3347         (detect_commutative_reduction_assign): New.
3348         (follow_inital_value_to_phi): New.
3349         (edge_initial_value_for_loop_phi): New.
3350         (initial_value_for_loop_phi): New.
3351         (detect_commutative_reduction): New.
3352         (translate_scalar_reduction_to_array_for_stmt): New.
3353         (insert_copyout): New.
3354         (insert_copyin): New.
3355         (translate_scalar_reduction_to_array): New.
3356         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
3357         (rewrite_commutative_reductions_out_of_ssa_loop): New.
3358         (rewrite_commutative_reductions_out_of_ssa): New.
3359         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
3360         * sese.h (split_region_for_bb): New.
3361
3362         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
3363         * gcc.dg/graphite/interchange-1.c: Fix format.
3364         * gcc.dg/graphite/interchange-10.c: New.
3365
3366 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3367
3368         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
3369         buggy assert.
3370
3371 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3372
3373         * graphite-sese-to-poly.c (scev_analyzable_p): New.
3374         (rewrite_cross_bb_scalar_dependence): New.
3375         (rewrite_cross_bb_scalar_deps): New.
3376         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
3377         Call rewrite_cross_bb_scalar_deps.
3378
3379 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3380
3381         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
3382         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
3383         gsi_for_stmt.
3384
3385 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
3386
3387         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
3388         * graphite-interchange.c (pbb_do_interchange): Same.
3389         * graphite-poly.c (print_scattering_function): Same.
3390         (debug_pdrs): Same.
3391         * graphite-poly.h (pbb_loop): New.
3392         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
3393
3394 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
3395
3396         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
3397
3398 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
3399
3400         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
3401         so don't pass a pointer to it.
3402         (build_alias_set_for_drs): Same.
3403         (build_base_obj_set_for_drs): Same.
3404         (build_scop_drs): Same.
3405
3406 2009-09-26  Li Feng  <nemokingdom@gmail.com>
3407
3408         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
3409         the alias graph of data references.
3410
3411 2009-09-25  Li Feng  <nemokingdom@gmail.com>
3412
3413         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
3414         (build_scop_drs): When debugging, write the alias graph to file,
3415         otherwise, should be disabled.
3416
3417 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3418
3419         * Merge from mainline (151310:151361).
3420
3421 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3422
3423         * Merge from mainline (151171:151310).
3424
3425 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3426
3427         * Merge from mainline (151171:151806).
3428
3429 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3430
3431         * Revert the last commit.
3432
3433 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3434
3435         * Merge from mainline (151171:151819).
3436
3437 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
3438
3439         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
3440         (is_simple_operand): Remove call to stmt_simple_memref_p.
3441         (stmt_simple_for_scop_p): Update call to is_simple_operand.
3442
3443 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
3444
3445         * gcc.dg/graphite/interchange-mvt.c: New File.
3446         * gcc.dg/graphite/scop-dsyrk.c: New File.
3447         * gcc.dg/graphite/scop-dsyr2k.c: New File.
3448         * gcc.dg/graphite/scop-mvt.c: New File.
3449         * gcc.dg/graphite/scop-sor.c: New File.
3450
3451 2009-09-17 Li Feng  <nemokingdom@gmail.com>
3452
3453         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
3454         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
3455         (graphite_carried_dependence_level_k): Ditto.
3456         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
3457         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
3458         (new_poly_dr): Adjust declaration.
3459         * graphite-sese-to-poly.c (free_data_refs_aux): New.
3460         (free_gimple_bb): Added free_data_refs_aux.
3461         (build_poly_dr): Add dr_base_object_set.
3462         (partition_drs_to_sets): New.
3463         (dr_same_base_object_p): New.
3464         (build_alias_set_for_drs): New.
3465         (build_base_object_set_for_drs): New.
3466         (build_scop_drs): Add build_base_obj_set_for_drs.
3467         * graphite-sese-to-poly.h: Added #define for alias set number index and
3468         base object set index.
3469         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
3470         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
3471
3472 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
3473
3474         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
3475         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
3476
3477 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3478
3479         * graphite-sese-to-poly.c (struct irp_data): Removed.
3480         (idx_record_params): Removed.
3481         (find_params_in_bb): Scan for parameters the access functions; don't
3482         parse the tree representation.
3483
3484 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3485
3486         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
3487         passes at -O1 and below.
3488
3489 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
3490
3491         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
3492         tree-scalar-evolution.h, and then tree-data-ref.h.
3493         * graphite-clast-to-gimple.c: Same.
3494         * graphite-dependences.c: Same.
3495         * graphite-interchange.c: Same.
3496         * graphite-poly.c: Same.
3497         * graphite-scop-detection.c: Same.
3498         * graphite-sese-to-poly.c: Same.
3499         * graphite.c: Same.
3500         * lambda-code.c: Same.
3501         * matrix-reorg.c: Same.
3502         * tree-data-ref.c: Same.
3503         * tree-if-conv.c: Same.
3504         * tree-loop-distribu: Same.: Same.
3505         * tree-loop-linear.c: Same.
3506         * tree-parloops.c: Same.
3507         * tree-predcom.c: Same.
3508         * tree-vect-patterns.c: Same.
3509
3510 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
3511
3512         Partially revert the previous patch, except the following.
3513         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
3514         as parameters the operands of the not expression.
3515
3516 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3517
3518         * tree-scalar-evolution.c (instantiate_scev_assign): New.
3519         Do not call analyze_scalar_evolution on assignments.
3520         (instantiate_scev_phi): Call analyze_scalar_evolution.
3521         (instantiate_scev_name): Call instantiate_scev_assign and
3522         instantiate_scev_phi.
3523         (instantiate_scev_not): Adapted to pass as parameters the operands
3524         of the not expression.
3525
3526 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3527
3528         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
3529         to pass as parameters the operands of the binary expression.
3530
3531 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3532
3533         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
3534         instantiate_scev_not.  Handle NEGATE_EXPR.
3535         (instantiate_scev_r): Handle NEGATE_EXPR.
3536
3537 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3538
3539         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
3540         instantiate_scev_r.
3541         (instantiate_scev_r): Move code in instantiate_scev_2
3542         and instantiate_scev_1.
3543
3544 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3545
3546         * tree-scalar-evolution.c (instantiate_scev_3): New.
3547         (instantiate_scev_1): Move code in instantiate_scev_3.
3548
3549 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3550
3551         * tree-scalar-evolution.c (instantiate_scev_poly): New.
3552         (instantiate_scev_1): Move code in instantiate_scev_poly.
3553
3554 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3555
3556         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3557         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3558
3559 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3560
3561         * tree-scalar-evolution.c (instantiate_scev_convert): New.
3562         (instantiate_scev_1): Move code in instantiate_scev_convert.
3563
3564 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3565
3566         * tree-scalar-evolution.c (instantiate_scev_binary): New.
3567         (instantiate_scev_1): Move code in instantiate_scev_binary.
3568
3569 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3570
3571         * tree-scalar-evolution.c (instantiate_scev_name): New.
3572         (instantiate_scev_1): Move code in instantiate_scev_name.
3573
3574 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
3575
3576         * Merge from mainline (150992:151171).
3577
3578 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3579
3580         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3581
3582 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3583
3584         * graphite-dependences.c (graphite_legal_transform_bb): Call
3585         pbb_remove_duplicate_pdrs.
3586         * graphite-poly.c (can_collapse_pdr): Removed.
3587         (pdr_find_duplicate): Removed.
3588         (can_collapse_pdrs): New.
3589         (pbb_remove_duplicate_pdrs): New.
3590         (new_poly_dr): Do not look for duplicates.
3591         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3592         (PBB_PDR_DUPLICATES_REMOVED): New.
3593         (pbb_remove_duplicate_pdrs): Declared.
3594
3595 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3596
3597         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3598         the strides by multiplying by PDR_NB_REFS.
3599         * graphite-poly.c (can_collapse_pdr): New.
3600         (pdr_find_duplicate): New.
3601         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
3602         Initialize PDR_NB_REFS.
3603         * graphite-poly.h (struct poly_dr): Add field nb_refs.
3604         (PDR_NB_REFS): New.
3605         (new_poly_dr): Number of subscripts is a graphite_dim_t.
3606
3607 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3608
3609         Revert one of the previous commits:
3610         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3611         the computation of symmetric data dependence relations.
3612         (dependency_between_pbbs_p): Same.
3613
3614 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3615
3616         PR middle-end/40965
3617         * graphite-poly.c (apply_poly_transforms): Remove legality test before
3618         any transform.
3619
3620 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3621
3622         * graphite-dependences.c (pddr_original_scattering): Return NULL
3623         for read-read dependence relations.
3624         * graphite-poly.h (enum poly_dr_type): Fix comment.
3625         (pdr_read_p): New.
3626         (pdr_write_p): New.
3627         (pdr_may_write_p): New.
3628
3629 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3630
3631         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3632         (struct poly_dr): Same.
3633         (new_poly_dr): Same.
3634         * graphite-poly.c (new_poly_dr): Same.
3635
3636 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3637             Sebastian Pop  <sebastian.pop@amd.com>
3638
3639         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3640         pbb_strip_mine_time_depth.  Changed the implementation so that
3641         transformation is expressed as a transformation on
3642         time (scatttering) dimensions.  Also, ensures that the 2d+1
3643         scheduling format is preserved.
3644         (pbb_strip_mine_profitable_p): Profitability is based on the
3645         iteration number of a given time (scattering) dimension,
3646         and not on a original loop depth dimension.
3647         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3648         (pbb_do_strip_mine): Call psct_dynamic_dim.
3649         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3650         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3651         (pbb_nb_dynamic_scattering_transform): New.
3652         (psct_dynamic_dim): New.
3653
3654 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3655
3656         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3657         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3658         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3659         * graphite-interchange.c (build_linearized_memory_access): Same.
3660         (memory_stride_in_loop): Same.
3661
3662 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3663
3664         * graphite-dependences.c (pddr_original_scattering): New.
3665         (graphite_legal_transform_dr): Call pddr_original_scattering.
3666         (dot_deps_1): New.
3667         (dot_deps): New.
3668         * graphite-dependences.h (dot_deps): Declared.
3669         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3670         (print_pdr): Print PDR_ID.
3671         * graphite-poly.h (struct poly_dr): Add field id.
3672         (PDR_ID): New.
3673         (pbb_index): New.
3674         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3675
3676 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3677
3678         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3679         not delete the original dependence relation.
3680
3681 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3682
3683         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3684         the computation of symmetric data dependence relations.
3685         (dependency_between_pbbs_p): Same.
3686
3687 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3688
3689         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3690         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3691         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3692         (free_poly_ddr): New.
3693         (pddr_is_empty): New.
3694         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3695         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3696         Remove fprintfs.
3697         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3698         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3699         * graphite-dependences.h (enum poly_dependence_kind): New.
3700         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3701         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3702         (PDRP_SINK): Renamed PDDR_SINK.
3703         (PDRP_DDP): Renamed PDDR_DDP.
3704         (PDDR_KIND): New.
3705         (free_poly_ddr): Declared.
3706         * graphite-poly.c (new_scop): Use the new hash function names.
3707         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3708         into original_pddrs.
3709         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3710
3711 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3712
3713         * Merge from mainline (150764:150992).
3714
3715 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3716
3717         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3718         bounds with LT_EXPR to make niter analysis more precise on code
3719         generated by Graphite.
3720
3721 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3722
3723         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3724         (graphite_legal_transform_bb): Same.
3725         (poly_drs_may_alias_p): Same.
3726
3727 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3728
3729         PR middle-end/40981
3730         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3731         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3732
3733 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3734
3735         * graphite-poly.c (print_pbb): Print PBB index.
3736
3737 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3738
3739         * Merge from mainline (r150672:150764).
3740
3741 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3742
3743         * graphite-interchange.c (ppl_max_for_le): Moved...
3744         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3745         * graphite-ppl.c (ppl_max_for_le): ... here.
3746         * graphite-ppl.h (ppl_max_for_le): Declared.
3747
3748 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3749
3750         * Merge from mainline (r150372:150672).
3751
3752 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3753
3754         PR middle-end/40980
3755         * sese.c (convert_for_phi_arg): New.
3756         (add_guard_exit_phis): Use convert_for_phi_arg.
3757
3758         * gfortran.dg/graphite/id-17.f: New.
3759
3760 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3761
3762         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3763         unknown subscript upper bounds.
3764
3765         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3766
3767 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3768             Pranav Garg  <pranav.garg2107@gmail.com>
3769
3770         * graphite-interchange.c (gather_access_strides): Removed.
3771         (ppl_max_for_le): New.
3772         (build_linearized_memory_access): New.
3773         (memory_stride_in_loop): New.
3774         (pbb_interchange_profitable_p): Reimplemented.
3775         * graphite-ppl.h (ppl_new_id_map): New.
3776         (ppl_interchange): New.
3777
3778         * gcc.dg/graphite/interchange-6.c: XFAILed.
3779
3780 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3781
3782         * graphite-interchange.c (compute_subscript): Removed.
3783         (compute_array_size_cstr): Removed.
3784         (compute_array_size_poly): Removed.
3785         (compute_array_size): Removed.
3786         (gather_access_strides_poly): Removed.
3787         (gather_access_strides): Empty.
3788
3789 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3790
3791         * graphite-dependences.c (dependence_polyhedron_1): Replace
3792         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3793         (graphite_legal_transform_dr): Same.
3794         (graphite_carried_dependence_level_k): Same.
3795         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3796         Initialize PDR_NB_SUBSCRIPTS.
3797         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3798         PDR_NB_SUBSCRIPTS.
3799         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3800         (PDR_NB_SUBSCRIPTS): New.
3801         (pdr_nb_subscripts): Removed.
3802         (pdr_dim): Simplified.
3803         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3804         with PDR_NB_SUBSCRIPTS.
3805
3806 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3807
3808         * graphite-interchange.c (compute_array_size): Remove use of
3809         PDR_DATA_CONTAINER.
3810         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3811         Do not initialize PDR_DATA_CONTAINER.
3812         (print_pdr): Do not print PDR_DATA_CONTAINER.
3813         * graphite-poly.h (struct poly_dr): Remove data_container field.
3814         (PDR_DATA_CONTAINER): Removed.
3815         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3816         PDR_DATA_CONTAINER.
3817         (build_poly_dr): Same.
3818
3819 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3820
3821         * gcc.dg/graphite/interchange-9.c: New.
3822
3823 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3824             Sebastian Pop  <sebastian.pop@amd.com>
3825
3826         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3827         copy of the dependence polyhedron.  Free the temporary objects.
3828         (graphite_carried_dependence_level_k): Free unused objects before
3829         returning.
3830
3831         * gcc.dg/graphite/interchange-1.c: XFAILed.
3832         * gcc.dg/graphite/interchange-2.c: XFAILed.
3833         * gcc.dg/graphite/interchange-3.c: XFAILed.
3834         * gcc.dg/graphite/interchange-4.c: XFAILed.
3835         * gcc.dg/graphite/interchange-7.c: XFAILed.
3836
3837 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3838
3839         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3840         Early return without analyzing the data dependences if no
3841         transform has been done.  Call restore_scattering if the transform
3842         is not legal.
3843         (graphite-interchange.c): Same.
3844         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3845         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3846         (apply_poly_transforms): Do not gcc_assert that
3847         the transform is legal.
3848         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3849         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3850         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3851         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3852         * graphite-poly.h (struct poly_scattering): New.
3853         (struct poly_bb): Add original, transformed, and saved fields.
3854         Remove transformed_scattering, original_scattering, nb_local_variables,
3855         and nb_scattering_transform fields.
3856         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3857         (poly_scattering_new): New.
3858         (poly_scattering_free): New.
3859         (poly_scattering_copy): New.
3860         (store_scattering_pbb): New.
3861         (store_scattering): New.
3862         (restore_scattering_pbb): New.
3863         (restore_scattering): New.
3864         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3865         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3866
3867 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3868
3869         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3870         (print_scop): Same.
3871
3872 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3873
3874         * Makefile.in (graphite.o): Depends on PREDICT_H.
3875         * graphite.c: Include predict.h.
3876         (graphite_finalize): Call tree_estimate_probability.
3877         * predict.c (predict_loops): Do not call scev_initialize and
3878         scev_finalize.
3879         (tree_estimate_probability_bb): New.
3880         (tree_estimate_probability): Do not initialize loops: move that
3881         code to the driver.  Call tree_estimate_probability_bb.
3882         (tree_estimate_probability_driver): New.
3883         (pass_profile): Use tree_estimate_probability_driver.
3884         * predict.h (tree_estimate_probability): Declared.
3885
3886 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3887
3888         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3889         * graphite-dependences.c (graphite_legal_transform): Add time to
3890         TV_GRAPHITE_DATA_DEPS.
3891         (dependency_between_pbbs_p): Same.
3892         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3893
3894 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3895
3896         * Merge from mainline (r149952:150372).
3897
3898 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3899
3900         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3901         * graphite-blocking.c: Same.
3902         * graphite-clast-to-gimple.c: Same.
3903         * graphite-dependences.c: Same.
3904         * graphite-poly.c: Same.
3905         * graphite-poly.h: Same.
3906         * graphite-ppl.c: Same.
3907         * graphite-scop-detection.c: Same.
3908         * graphite-sese-to-poly.c: Same.
3909         * graphite.c: Same.
3910
3911 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3912
3913         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3914         (remove_simple_copy_phi): New.
3915         (remove_invariant_phi): New.
3916         (simple_copy_phi_p): New.
3917         (reduction_phi_p): New.
3918         (gsi_for_ssa_name_def): New.
3919         (insert_out_of_ssa_copy): New.
3920         (insert_out_of_ssa_copy_on_edge): New.
3921         (create_zero_dim_array): New.
3922         (scalar_close_phi_node_p): New.
3923         (rewrite_close_phi_out_of_ssa): New.
3924         (rewrite_phi_out_of_ssa): New.
3925         (rewrite_reductions_out_of_ssa): New.
3926         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3927
3928         * gcc.dg/graphite/id-11.c: New.
3929         * gcc.dg/graphite/id-15.c: New.
3930         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3931         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3932         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3933         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3934         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3935         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3936         * gfortran.dg/graphite/id-13.f: New.
3937         * gfortran.dg/graphite/id-5.f: New.
3938
3939 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3940
3941         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3942         check that nb_reductions_in_loop is zero.
3943         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3944         reduction phi nodes.
3945         (nb_reductions_in_loop): Removed.
3946         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3947         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3948         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3949         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3950         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3951
3952 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3953
3954         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3955         statements that have an empty iteration domain.
3956         * gfortran.dg/graphite/id-16.f: New.
3957
3958 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3959
3960         * tree-scalar-evolution.c (instantiate_scev_1): Return
3961         chrec_dont_know when the result is not above instantiate_below.
3962         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3963         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3964         the tree has a known scalar evolution.
3965         * gfortran.dg/graphite/id-14.f: New.
3966         * gfortran.dg/graphite/id-15.f: New.
3967
3968 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3969
3970         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
3971         insert_gsi.
3972         (rename_variables): Keep inserting renames after the ones already
3973         inserted.
3974
3975 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3976
3977         * graphite-sese-to-poly.c (compare_bb_depths): New.
3978         (graphite_sort_dominated_info): New.
3979         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3980         (build_scop_scattering): Fix comment.
3981
3982 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3983
3984         * graphite.c (graphite_finalize): Call print_loops instead of
3985         dump_function_to_file.
3986         * gcc.dg/graphite/graphite.exp: Fix formatting.
3987         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
3988         loops generated in the graphite output file.
3989         * gcc.dg/graphite/pr35356-2.c: New.
3990         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
3991         * gfortran.dg/graphite/id-12.f: New.
3992
3993 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3994
3995         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3996         Remove 2 XFAIL.
3997
3998 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3999             Tobias Grosser  <grosser@fim.uni-passau.de>
4000
4001         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
4002         alias set number build alias in ACCESSES polyhedron.
4003         (build_alias_set_for_drs): New.
4004         (build_pbb_drs): Added build_alias_set_for_drs.
4005         * graphite-dependences.c (poly_drs_may_alias_p): New.
4006         (graphite_carried_dependence_level_k): Check alias information
4007         before building polyhedron.
4008
4009 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4010
4011         * Makefile.in (lambda-code.o): Fix formatting.
4012
4013 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4014
4015         * Merge from mainline (r149350-149952)
4016
4017 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
4018
4019         * graphite-poly.c (apply_poly_transforms): Move strip_mine
4020         before interchange to prepare for loop blocking.
4021
4022 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
4023
4024         * graphite-poly.c (apply_poly_transforms): Add checks after every
4025         transformation.
4026         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
4027         done in apply_poly_transforms.
4028
4029 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
4030
4031         * graphite-dependences.c (build_lexicographically_gt_constraint):
4032         Replace RES parameter with *RES.
4033         (dependence_polyhedron_1): Pass an address of the parameter RES
4034         instead of value of RES.
4035
4036 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4037
4038         * graphite.c (graphite_finalize): Fix comment.
4039         (graphite_transform_loops): Reset scev info after code generation
4040         of each scop.
4041
4042 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4043
4044         * graphite.c (graphite_finalize): Call scev_reset.
4045
4046 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4047
4048         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
4049         GBB_CLOOG_IV_TYPES hash table twice.
4050         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
4051         (add_condition_to_domain): Clear GMP values.
4052
4053 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4054
4055         * graphite-dependences.c: Fix formatting.
4056         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
4057         (pbb_number_of_iterations): Free ppl_Linear_Expression.
4058         * graphite-sese-to-poly.c: Fix formatting.
4059         * graphite.c (graphite_transform_loops): Create the hash table
4060         after the early return.
4061
4062 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4063
4064         * gcc.dg/graphite/id-14.c: New.
4065         * gcc.dg/graphite/pr40157.c: New.
4066         * gfortran.dg/graphite/id-11.f: New.
4067
4068 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4069
4070         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
4071         (build_poly_scop): Return false when there are no pbbs within
4072         loops to avoid to pass to cloog scops with no loops.
4073
4074 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
4075
4076         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
4077         useless test "i % 2".
4078         (build_pbb_scattering_polyhedrons): Fix formatting.
4079         (build_poly_dr): Same.
4080         * graphite.c (graphite_transform_loops): Restructure.
4081
4082 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
4083
4084         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
4085         reduction_list parameter.
4086         (rewrite_all_phi_nodes_with_iv): Same.
4087         (canonicalize_loop_ivs): Same.
4088         * tree-parloops.c (struct brli): Removed.
4089         (build_reduction_list_info): Removed.
4090         (build_new_reduction): New.
4091         (analyze_reduction_list): Removed.
4092         (gather_scalar_reductions): Find reductions instead of phi
4093         nodes that can't be canonicalized.
4094         (try_create_reduction_list): Remove reduction_list parameter.
4095         (gen_parallel_loop): Same.
4096         (parallelize_loops): Remove analyze_reductions variable,
4097         initialization and free.
4098         Change reduction_list htab initialization to reduction_info
4099         elements instead of ssa names.
4100         Call try_create_reduction_list and gen_parallel_loop without
4101         analyzed_reduction argument.
4102         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
4103         canonicalize_loop_ivs with one less argument.
4104         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
4105
4106 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
4107
4108         * graphite-dependences.c (new_poly_dr_pair): New.
4109         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
4110         (new_poly_dr_pair): New.
4111         (eq_poly_dr_pair_p): New.
4112         (hash_poly_dr_pair_p): New.
4113         * graphite-dependences.h (struct poly_dr_pair): New.
4114         (eq_poly_dr_pair_p): Declared.
4115         (hash_poly_dr_pair_p): Declared.
4116         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
4117         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
4118         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
4119         * Makefile.in (graphite-poly.o): Add dependence on
4120         graphite-dependences.h.
4121
4122 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4123
4124         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
4125         polynomials of degree > 1 pass to Graphite.
4126         * tree-chrec.c (scev_is_linear_expression): Call
4127         evolution_function_is_affine_multivariate_p.
4128         * gfortran.dg/graphite/id-10.f90: New.
4129
4130 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4131
4132         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
4133         Instantiate scevs varying in outer loops.
4134         * gfortran.dg/graphite/id-9.f: Correct testcase.
4135
4136 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4137
4138         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
4139         redundant constraint.
4140
4141 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4142
4143         * gcc.dg/graphite/graphite.exp: Fix comments.
4144         * gfortran.dg/graphite/graphite.exp: Trigger actions
4145         based on the file names as in the C testsuite.
4146         * gfortran.dg/graphite/block-1.f90: Fix patterns.
4147         * gfortran.dg/graphite/block-2.f: Same.
4148         * gfortran.dg/graphite/block-3.f90: Same.
4149         * gfortran.dg/graphite/block-4.f90: Same.
4150         * gfortran.dg/graphite/id-1.f90: Same.
4151         * gfortran.dg/graphite/id-2.f90: Same.
4152         * gfortran.dg/graphite/id-3.f90: Same.
4153         * gfortran.dg/graphite/id-4.f90: Same.
4154         * gfortran.dg/graphite/id-6.f: Same.
4155         * gfortran.dg/graphite/id-9.f: Same.
4156         * gfortran.dg/graphite/interchange-1.f: Same.
4157         * gfortran.dg/graphite/interchange-2.f: Same.
4158         * gfortran.dg/graphite/scop-1.f: Same.
4159
4160 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
4161
4162         * sese.c (expand_scalar_variables_call): New.
4163         (expand_scalar_variables_ssa_name): Handle calls in expander.
4164
4165 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4166
4167         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
4168         Expect to see the pattern twice.
4169         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
4170         * gcc.dg/graphite/interchange-5.c: Same.
4171         * gcc.dg/graphite/interchange-6.c: Same.
4172
4173 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4174
4175         * gcc.dg/graphite/id-10.c: New.
4176         * gcc.dg/graphite/id-12.c: New.
4177         * gfortran.dg/graphite/id-7.f: New.
4178         * gfortran.dg/graphite/id-8.f: New.
4179
4180 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4181
4182         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
4183         zero.
4184
4185 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4186
4187         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
4188
4189 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
4190
4191         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
4192
4193 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
4194
4195         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
4196         building PDR subscripts.
4197
4198 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
4199
4200         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
4201         computation of array sizes.
4202
4203 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
4204
4205         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
4206
4207 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4208
4209         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
4210         build_pairwise_constraint, dr_equality_constraints,
4211         build_pairwise_scheduling_equality,
4212         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4213         build_lexicographically_gt_constraint, dependence_polyhedron,
4214         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
4215         Move from NNC_Polyhedron to C_Polyhedron.
4216         * graphite-interchange.c (compute_array_size_poly,
4217         gather_access_strides): Dito.
4218         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
4219         free_scop, pbb_number_of_iterations): Dito.
4220         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
4221         pbb_dim_iter_domain, struct scop): Dito.
4222         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
4223         new_Cloog_Domain_from_ppl_Polyhedron,
4224         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
4225         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
4226         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
4227         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
4228         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
4229         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
4230         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
4231         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
4232         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
4233         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
4234         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
4235         build_scop_iteration_domain, build_poly_dr): Dito
4236
4237 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4238
4239         * gcc.dg/graphite/graphite.exp: Added a rule to execute
4240         run-id-*.c files.
4241         * gcc.dg/graphite/run-id-1.c: New.
4242
4243 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4244
4245         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
4246         positivity constraint on the symbolic number of iterations.
4247
4248 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4249
4250         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
4251
4252 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4253             Tobias Grosser  <grosser@fim.uni-passau.de>
4254
4255         * graphite-clast-to-gimple.c (build_scop_context): Removed.
4256         (build_cloog_prog): Directly use SCOP_CONTEXT.
4257         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
4258         (free_scop): Free SCOP_CONTEXT.
4259         (print_scop_context): New.
4260         (print_scop): Call print_scop_context.
4261         (debug_scop_context): New.
4262         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
4263         (struct scop): Added field context.
4264         (SCOP_CONTEXT): New.
4265         * graphite-sese-to-poly.c (add_param_constraints): New.
4266         (build_scop_context): New.
4267         (build_poly_scop): Call build_scop_context.
4268
4269 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4270
4271         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
4272         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
4273         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
4274         * graphite-ppl.h: Include double-int.h and tree.h.
4275         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
4276         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
4277         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
4278         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
4279
4280 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4281
4282         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
4283         POINTER_PLUS_EXPR for pointer types.
4284         (clast_to_gcc_expression): Same.
4285
4286 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
4287
4288         * graphite-poly.c (print_scattering_function): Early return when
4289         PBB_TRANSFORMED_SCATTERING is not initialized.
4290         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
4291
4292 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
4293
4294         * tree-parloops.c (analyze_reduction_list): Remove unused variable
4295         to fix bootstrap.
4296
4297 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
4298
4299         * tree-parloops.c (analyze_reduction_list): Change return
4300         value to void.
4301         (try_create_reduction_list): Move the call to
4302         analyze_reduction_list to the beginining.
4303         Call reduction_phi with analyzed_reductions as argument
4304         instead of reduction_list.
4305
4306 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4307
4308         *  Merge from mainline (r148296:149346)
4309
4310 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4311
4312         * graphite-scop-detection.c (graphite_can_represent_init): New.
4313         (graphite_can_represent_scev): Call graphite_can_represent_init:
4314         check that the initial value does not contain multiplications of
4315         parameters.
4316         (stmt_has_simple_data_refs_p): New.
4317         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
4318         (is_simple_operand): Fix formatting.
4319         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
4320
4321 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4322
4323         * gcc.dg/graphite/id-13.c: New.
4324         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
4325         analyze_scalar_evolution, use scalar_evolution_in_region.
4326         (scan_tree_for_params_right_scev): Add extra assert.
4327         (parameter_index_in_region_1): Split from parameter_index_in_region.
4328         (idx_record_params): Use scalar_evolution_in_region.
4329         (find_params_in_bb): Same.
4330         (find_scop_parameters): Same.
4331         (build_loop_iteration_domains): Same.
4332         (create_linear_expr_from_tree): Same.
4333         * sese.c (scalar_evolution_in_region): New.
4334         * sese.h (scalar_evolution_in_region): Declared.
4335         (defined_in_sese_p): New.
4336         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
4337         static anymore.
4338         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
4339         Declared.
4340
4341 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4342
4343         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
4344         TREE_DATA_REF_H also implies SCEV_H.
4345
4346 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
4347
4348         * graphite-poly.c (print_scop_params): New.
4349         (print_scop): Call print_scop_params.
4350         (debug_scop_params): New.
4351         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
4352
4353 2009-07-07  Li Feng  <nemokingdom@gmail.com>
4354
4355         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
4356         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
4357         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
4358         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
4359         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
4360         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
4361
4362 2009-07-07  Li Feng  <nemokingdom@gmail.com>
4363
4364         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
4365         for dependency checking part.
4366         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
4367         tests for dependency checking.
4368         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4369         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4370         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
4371         flag -fdump-tree-graphite-all for autopar testsuites.
4372
4373 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
4374
4375         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
4376         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
4377         canonicalize_loop_ivs): Moved...
4378         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
4379
4380 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
4381
4382         * tree-parloops.c (try_create_reduction_list): Pass an extra
4383         argument analyzed_reductions.  Call analyze_reduction_list.
4384         (gen_parallel_loop): Do not call analyze_reduction_list.
4385         (parallelize_loops): Init and finalize analyzed_reductions.
4386
4387 2009-07-06  Li Feng  <nemokingdom@gmail.com>
4388
4389         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4390         Added flag -fno-loop-strip-mine for autopar testcase.
4391
4392 2009-07-04  Li Feng  <nemokingdom@gmail.com>
4393
4394         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
4395         transformed scattering dimension instead of unmatch orignal when
4396         calling dependence_polyhedron.
4397
4398 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4399
4400         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
4401
4402 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4403
4404         * graphite-poly.c (pbb_number_of_iterations): Check for returned
4405         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
4406
4407 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
4408
4409         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
4410         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
4411         * graphite-poly.c (pbb_number_of_iterations): New.
4412         * graphite-poly.h (pbb_number_of_iterations): Declared.
4413         (pbb_iterator_dim, pbb_parameter_dim): New.
4414
4415 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
4416
4417         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
4418         last commit on type of lower and upper bound of loops.
4419
4420 2009-06-29  Li Feng  <nemokingdom@gmail.com>
4421
4422         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
4423         graphite-dependences.h.
4424         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
4425         (mark_bb_with_pbb): New.
4426         (get_stmtfor_depth): New.
4427         (find_pbb_via_hash): New.
4428         (dependency_in_loop_p): New.
4429         (mark_loops_parallel): New.
4430         (free_aux_in_new_loops): New.
4431         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
4432         bb with it's relevant pbb. Mark newly created loops.  Remove mark
4433         innermost loop parallel without checking.
4434         (gloog): Add parameter BB_PBB_MAPPING.
4435         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
4436         (gloog): Change declaration.
4437         (mark_loop_parallel): Make extern.
4438         (free_aux_in_new_loops): Declare.
4439         (bb_pbb_map_hash): New.
4440         (eq_bb_pbb_map): New.
4441         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
4442         auto parallelization when flag_graphite_force_parallel is set.
4443         (graphite_finalize): Added free_aux_in_new_loops.
4444         * tree-parloops.c (parallelize_loops): Only generate parallel code for
4445         the innermost loop that marked parallel.  Use
4446         flag_graphite_force_parallel instead of loop->can_be_parallel.
4447         (loop_parallel_p): Move inner most checking out of function.
4448
4449 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4450
4451         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
4452         type of lower and upper bound of loops signed long int.
4453
4454 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4455
4456         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
4457         expression outside the loop.
4458
4459 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4460
4461         * gcc.dg/graphite/interchange-8.c: New.
4462
4463 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4464
4465         * gcc.dg/graphite/interchange-0.c: XFailed.
4466         * gcc.dg/graphite/interchange-5.c: XFailed.
4467         * gcc.dg/graphite/interchange-6.c: XFailed.
4468
4469 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4470
4471         * graphite-interchange.c (compute_array_size_poly): The end of the
4472         recursion should return 1.
4473
4474 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4475
4476         * graphite-interchange.c (compute_array_size_cstr): Allow the
4477         subscript multiplier to be -1.
4478         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
4479         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
4480         data_container.  Initializes PDR_DATA_CONTAINER.
4481         (print_pdr_access_layout): New.
4482         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
4483         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
4484         data_container.
4485         (PDR_DATA_CONTAINER): New.
4486         (new_poly_dr): Update declaration.
4487         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
4488         (build_poly_dr): Call pdr_add_data_dimensions.
4489
4490 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4491
4492         * graphite-poly.h (struct poly_dr): Fix comment.
4493         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
4494         (pdr_add_memory_accesses): New.
4495         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
4496
4497 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
4498
4499         * graphite-poly.c (print_pdrs, debug_pdrs): New.
4500         (print_pbb): Add call to print_pdrs.
4501         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
4502
4503 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
4504             Li Feng <nemokingdom@gmail.com>
4505
4506         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
4507         (dependency_between_pbbs_p): New.
4508         (lexicographically_gt_p): Assure !empty_p before polyhedron
4509         intersection assign.
4510         (build_lexicographically_gt_constraint): Correct lexicographically
4511         judging.
4512         * graphite-dependences.h: New.
4513         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
4514
4515 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4516
4517         * graphite-clast-to-gimple.c (print_clast_stmt): New.
4518         (gloog): Print to dump_file the generated clast.
4519         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
4520         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
4521
4522 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4523
4524         * graphite-poly.c (extend_scattering): Increment
4525         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
4526
4527 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
4528
4529         * graphite-interchange.c (compute_array_size_poly): Added exit of
4530         recursion condition.  Continue iterating even after the first equality.
4531         (compute_array_size): Same.
4532
4533 2009-06-24  Li Feng  <nemokingdom@gmail.com>
4534
4535         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
4536         -fdump-tree-final_cleanup to -fdump-tree-optimized.
4537         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
4538         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
4539         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
4540
4541 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4542
4543         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
4544         only when the use verifies is_gimple_reg.
4545
4546 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4547
4548         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
4549         Allocate scaldims after call to unify_scattering_dimensions.
4550
4551 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4552
4553         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4554
4555 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4556             Albert Cohen  <albert.cohen@inria.fr>
4557
4558         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4559         variables for the strip mining.
4560
4561 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4562             Pranav Garg  <pranav.garg2107@gmail.com>
4563
4564         * Makefile.in (OBJS-common): Added graphite-blocking.o.
4565         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4566         (graphite-blocking.o): New rule.
4567         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4568         * graphite-blocking.c: New.
4569         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4570         flag_loop_strip_mine.
4571         (psct_scattering_dim_for_loop_depth): New.
4572         * graphite-poly.h (scop_do_strip_mine): Declared.
4573         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4574         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4575         flag_loop_strip_mine.
4576
4577 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4578
4579         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4580         a GMP value and a PPL coefficient at each iteration of a loop.
4581
4582 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4583
4584         * graphite-dependences.c (dependence_polyhedron): Do not use
4585         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
4586         pbb_nb_scattering_transform.
4587         (graphite_legal_transform_dr): Same.
4588         * graphite-poly.c (extend_scattering): Same.
4589         (unify_scattering_dimensions): Same.
4590         (print_scattering_function): Same.
4591         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4592         PBB_NB_LOCAL_VARIABLES.
4593         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4594         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4595         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4596         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4597         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4598         (pbb_nb_scattering_transform): New.
4599         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4600         (psco_scattering_dim): Add assert on parameters.
4601         (psct_scattering_dim): Same.
4602         (psct_scattering_dim_for_loop_depth): Declared.
4603         (psct_local_var_dim): New.
4604         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4605         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
4606         correct layout, call pbb_nb_local_vars.
4607         (psct_add_local_variable, psct_add_scattering_dimension): New.
4608         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4609         Initialize PBB_NB_SCATTERING_TRANSFORM.
4610
4611 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4612
4613         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4614         (set_coef): Renamed ppl_set_coef.
4615         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4616
4617 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4618
4619         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4620         test a boolean against 1.
4621         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4622         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4623         (pbb_do_interchange): Returns true when a transform has been performed.
4624         (scop_do_interchange): Same.
4625         * graphite-poly.c (apply_poly_transforms): Use the return value of
4626         scop_do_interchange.
4627         * graphite-poly.h (scop_do_interchange): Update declaration.
4628
4629 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4630
4631         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4632         after last use.
4633         * sese.c (sese_reset_aux_in_loops): New.
4634         * sese.h (sese_reset_aux_in_loops): New.
4635
4636 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4637
4638         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4639         multiplier and multiply the constant by the multiplier.
4640         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4641         (build_poly_dr): Do not use the multiplier to define the subscript.
4642
4643 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4644
4645         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4646         compiler's data reference.  Initialize PDR_CDR.
4647         (print_pdr): Call dump_data_reference.
4648         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4649         Add compiler_dr field.
4650         (PDR_BB): Renamed PDR_PBB.
4651         (PDR_CDR): New.
4652         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4653         GCC's data reference representation.
4654         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4655         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4656
4657 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4658
4659         * graphite-poly.c (print_scattering_function): Also print the layout.
4660         * graphite-poly.h (pbb_nb_local_vars): New.
4661
4662 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4663
4664         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4665
4666 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4667
4668         * graphite-poly.c (print_pdr, debug_pdr): New.
4669         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4670         (PDR_BASE): Removed.
4671
4672 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4673
4674         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4675         ltrans-{1..6,8}.c.
4676
4677 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4678
4679         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4680         subscript identification column.
4681         (pbb_do_interchange): Print to dump_file that some loops "will be
4682         interchanged".  Rely on that chain of characters in the testcases.
4683         * gcc.dg/graphite/interchange-0.c: New.
4684         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4685         interchange-*.c files and compile them with -floop-interchange.
4686
4687 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4688
4689         * graphite-interchange.c (interchange_profitable_p): Renamed
4690         pbb_interchange_profitable_p.
4691
4692 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4693             Harsha Jagasia  <harsha.jagasia@amd.com>
4694             Pranav Garg  <pranav.garg2107@gmail.com>
4695
4696         * graphite-interchange.c (interchange_profitable_p): Make static.
4697         (pbb_interchange_loop_depths, pbb_do_interchange,
4698         scop_do_interchange): New.
4699         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4700         for flag_loop_interchange.
4701         * graphite-poly.h (scop_do_interchange): Declared.
4702         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4703         flag_loop_interchange is used.
4704
4705 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4706
4707         * graphite-dependences.c (dependence_polyhedron): Update use of
4708         pbb_nb_scattering_dims.
4709         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4710         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4711         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4712         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4713
4714 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4715
4716         * graphite.c: Cleanup foo.
4717
4718 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4719
4720         * Merge from mainline (r143684:148293).
4721         * Disabled libpcp until it gets fixed.
4722
4723 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4724             Harsha Jagasia  <harsha.jagasia@amd.com>
4725
4726         * graphite-interchange.c: New.
4727         * Makefile.in (graphite-interchange.o): New.
4728         * graphite-poly.h (interchange_profitable_p): Declared.
4729         * graphite-ppl.h (value_max): New.
4730
4731 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4732
4733         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4734         * graphite-poly.h: Fix some comments.
4735         (pdr_dim): New.
4736         (pdr_scop): New.
4737
4738 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4739
4740         * graphite-poly.h
4741         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4742         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4743         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4744         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4745         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4746         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4747         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4748         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4749         * graphite-clast-to-gimple.c: Same.
4750         * graphite-dependences.c: Same.
4751         * graphite-poly.c: Same.
4752         * graphite-sese-to-poly.c: Same.
4753
4754 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4755
4756         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4757         expressions for an IV rename, as returned by clast_to_gcc_expression.
4758         (copy_renames): Rename new_name to expr.
4759         * sese.c (debug_rename_elt): Same.
4760         (get_rename): Same.
4761         (set_rename): Same.
4762         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4763         the information from the rename map.
4764         (rename_variables_in_stmt): Same.
4765         (add_loop_exit_phis): Rename new_name to expr.
4766         (insert_loop_close_phis): Same.
4767         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4768         * sese.h (struct rename_map_elt): Rename new_name to expr.
4769         (new_rename_map_elt): Same.
4770
4771 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4772
4773         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4774         * sese.c (set_rename): Make it extern.
4775         * sese.h (set_rename): Declared.
4776
4777 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4778
4779         * graphite-poly.c (extend_scattering): Free values.
4780         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4781         Free iterators.
4782         (ppl_print_powerset_matrix): Same.
4783         * graphite-scop-detection.c (free_scops_1): New.
4784         (limit_scops): Call free_scops_1.
4785         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4786         (build_poly_dr): Free PPL coefficients.
4787         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4788
4789 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4790
4791         * graphite-dependences.c: New.
4792         * graphite-data-ref.c: Removed.
4793         * graphite-data-ref.h: Removed.
4794         * Makefile.in (graphite-data-ref.o): Removed.
4795         (graphite-dependences.o): Added.
4796         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4797         * graphite-poly.c: Same.
4798         Move the data dependence testing to graphite-dependences.c.
4799
4800 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4801
4802         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4803         from graphite_cannot_represent_loop. Code refactored.
4804         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4805
4806 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4807
4808         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4809         Cover all the testcases (not only the filtered ones).
4810
4811 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4812
4813         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4814         unnecessary check. Update comments. Move check for REAL_TYPE here.
4815         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4816         done in (stmt_simple_for_scop_p).
4817
4818 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4819
4820         * graphite.c (print_global_statistics): New.
4821         (print_graphite_scop_statistic): New.
4822         (print_graphite_statistics): New.
4823         (graphite_initialize, graphite_transform_loops): Print statistics.
4824         * graphite-scop-detection (build_scops): Print statistics.
4825         (print_graphite_scop_statistics): New.
4826         (print_graphite_statistics): New.
4827
4828 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4829
4830         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4831         (debug_clast_name_index): Removed.
4832         (debug_clast_name_indexes_1): Removed.
4833         (debug_clast_name_indexes): Removed.
4834         (clast_name_index_elt_info): Removed.
4835         (eq_clast_name_indexes): Removed.
4836         (clast_name_to_index): Removed.
4837         (new_clast_name_index): Removed.
4838         (save_clast_name_index): Removed.
4839         (save_var_name): Moved...
4840         (init_sese_params_index): Removed.
4841         (clast_name_to_gcc): Remove use of name_tree.
4842         (initialize_cloog_names): Same.
4843         (gloog): Do not call init_sese_params_index.
4844         * graphite-sese-to-poly.c (save_var_name): ...here.
4845         (parameter_index_in_region): New.
4846         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4847         (parameter_index_in_region): Removed.
4848         (is_parameter): Remove use of name_tree.
4849         * sese.h (struct name_tree): Removed.
4850         (struct sese): Remove use of name_tree.  New field params_names.
4851         (SESE_PARAMS_NAMES): New.
4852         (SESE_PARAMS): Remove duplicate.
4853         (parameter_index_in_region): Removed.
4854         (sese_nb_params): Remove use of name_tree.
4855         (struct clast_name_index): New.
4856         (new_clast_name_index): New.
4857         (clast_name_to_index): New.
4858         (save_clast_name_index): New.
4859         (debug_clast_name_index): New.
4860         (debug_clast_name_indexes_1): New.
4861         (debug_clast_name_indexes): New.
4862         (clast_name_index_elt_info): New.
4863         (eq_clast_name_indexes): New.
4864
4865 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4866
4867         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4868         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4869         (graphite_loop_normal_form): Do not pass region.  Do not
4870         initialize SESE_OLDIVS.
4871         (build_graphite_loop_normal_form): Update call to
4872         graphite_loop_normal_form.
4873         * sese.c (debug_oldivs): Removed.
4874         (new_sese): Do not initialize SESE_OLDIVS.
4875         (free_sese): Do not free SESE_OLDIVS.
4876         (oldiv_for_loop): Removed.
4877         * sese.h (struct sese): Remove old_ivs.
4878         (SESE_OLDIVS): Removed.
4879         (oldiv_for_loop): Removed.
4880
4881 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4882
4883         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4884         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4885         replaced by a call to newivs_to_depth_to_newiv.
4886         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4887         (clast_to_gcc_expression_red): Same.
4888         (gcc_type_for_clast_expr): Same.
4889         (gcc_type_for_clast_eq): Same.
4890         (graphite_translate_clast_equation): Same.
4891         (graphite_create_guard_cond_expr): Same.
4892         (graphite_create_new_guard): Same.
4893         (graphite_create_new_loop): Same.
4894         (build_iv_mapping): Same.
4895         (translate_clast): Same.
4896         (gloog): Same.
4897         (loop_iv_stack_patch_for_consts): Removed.  *
4898         sese.c (iv_stack_entry_is_constant): Removed.
4899         (iv_stack_entry_is_iv): Removed.
4900         (loop_iv_stack_push_iv): Removed.
4901         (loop_iv_stack_insert_constant): Removed.
4902         (loop_iv_stack_pop): Removed.
4903         (loop_iv_stack_get_iv): Removed.
4904         (loop_iv_stack_get_iv_from_name): Removed.
4905         (debug_loop_iv_stack): Removed.
4906         (free_loop_iv_stack): Removed.
4907         (loop_iv_stack_remove_constants): Removed.  *
4908         sese.h (iv_stack_entry_kind): Removed.
4909         (iv_stack_entry_data_union): Removed.
4910         (iv_stack_entry_struct): Removed.
4911         (iv_stack_entry_p): Removed.
4912         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4913         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4914         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4915         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4916         (gbb_loop_at_index): Fix indenting.
4917         (gbb_loop_index): Removed.
4918
4919 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4920
4921         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4922         Call clast_name_to_index.
4923
4924 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4925
4926         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4927         do not pass params.  Get params from SESE_PARAMS.
4928         (clast_to_gcc_expression): Same.
4929         (clast_to_gcc_expression_red): Same.
4930         (gcc_type_for_clast_eq): Same.
4931         (graphite_translate_clast_equation): Same.
4932         (graphite_create_new_loop): Same.
4933         * sese.c (rename_variables_in_stmt): Fix comment.
4934
4935 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4936
4937         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4938         newivs_index.
4939         Call save_clast_name_index.
4940         (translate_clast): Pass newivs_index.
4941         (gloog): Create and free newivs_index.
4942
4943 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4944
4945         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4946         (clast_name_index_p): New type.
4947         (debug_clast_name_index): New.
4948         (debug_clast_name_indexes_1): New.
4949         (debug_clast_name_indexes): New.
4950         (clast_name_index_elt_info): New.
4951         (eq_clast_name_indexes): New.
4952         (clast_name_to_index): New.
4953         (new_clast_name_index): New.
4954         (save_clast_name_index): New.
4955         (init_sese_params_index): New.
4956         (gloog): Call init_sese_params_index.
4957         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4958         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4959         (free_sese): Free SESE_PARAMS_INDEX.
4960         * sese.h (struct sese): Add params_index.
4961         (SESE_PARAMS_INDEX): New.
4962
4963 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4964
4965         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4966         (graphite_create_new_loop): Pass the newivs vector.  Push the
4967         newly created IV to newivs.
4968         (translate_clast): Pass the newivs vector.
4969         (gloog): Create and destroy the newivs vector.
4970
4971 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4972
4973         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4974         (graphite_loop_normal_form): Initialize loop->aux with the unique
4975         IV that has been created.
4976
4977 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4978
4979         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4980         scev with parameters in the base part. They where forbidden
4981         exidently.
4982
4983 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4984
4985         * gcc.dg/graphite/graphite.exp: Set different default
4986         compile options by file names.
4987         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4988         * gcc.dg/graphite/id-{1-9}.c: Ditto.
4989         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4990         * gcc.dg/graphite/scop-matmult.c: Ditto.
4991
4992 2009-05-08  Li Feng <nemokingdom@gmail.com>
4993
4994         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4995         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4996         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4997         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4998
4999 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5000
5001         * graphite-scop-detection (build_scops_1): Fix little bug introduced
5002         by final cleanup.
5003
5004 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5005
5006         * graphite-scop-detection.c (graphite_can_represent_scev): Only
5007         allow integer constant strides.
5008         (graphite_can_represent_expr): Depend on outermost_loop.
5009         (stmt_simple_memref_p, graphite_cannot_represent_loop,
5010         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
5011         build_scops_1): Same.
5012         (scopdet_basic_block_info): Same and insert layered SCoP
5013         detection.
5014         (try_generate_gimple_bb): Cleanup.
5015         (build_scops): Enable data references.
5016
5017         * gcc.dg/graphite/id-5.c: New.
5018         * gcc.dg/graphite/id-9.c: New.
5019         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
5020         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
5021
5022 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5023
5024         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
5025         that we have not yet built for this SCoP.
5026
5027 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5028
5029         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
5030         for complex numbers.
5031
5032 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5033
5034         * graphite-ppl.c: Fix build if cloog is not available.
5035
5036 2009-05-04  Li Feng  <nemokingdom@gmail.com>
5037
5038         * tree-parloops.c (loop_parallel_p): Remove construction of
5039         NITER and REDUCTION_LIST.
5040         (try_get_loop_niter): New.
5041         (try_create_reduction_list): New.
5042         (parallelize_loops): Bypass the failed checkings in autopar
5043         when can_be_parallel in loop structure is set to true.
5044
5045 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5046
5047         * gcc.dg/graphite/id-6.c: Update testcase.
5048         * gcc.dg/graphite/scop-3.c: Dito.
5049
5050 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5051
5052         * graphite-scop-detection.c (stmt_simple_for_scop_p):
5053         Enable EQ_EXPR and NE_EXPR again.
5054
5055 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5056
5057         * graphite-scop-detection.c (graphite_can_represent_scev):
5058         Add check if scev is affine multivariate.
5059         (harmful_stmt_in_bb): Check if we can represent the conditions.
5060         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
5061         harmful_stmt_in_bb.
5062         * gcc.dg/graphite/id-7.c: New.
5063
5064 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5065
5066         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
5067         Check all bbs in region, not only the bbs that are represented in
5068         GRAPHITE.
5069         (build_poly_scop): Add newline.
5070         * gcc.dg/graphite/id-8.c: New.
5071
5072 2009-04-30  Li Feng  <nemokingdom@gmail.com>
5073
5074         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
5075         when loop initialize.
5076         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
5077         * common.opt: Declare flag_graphite_force_parallel.
5078         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
5079         loop parallel.
5080         * graphite-poly.c (apply_poly_transforms): Introduce
5081         flag_graphite_force_parallel.
5082         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
5083         * toplev.c (process_options): ditto and replace a not correctly
5084         encoded space.
5085
5086 2009-04-30  Li Feng  <nemokingdom@gmail.com>
5087
5088         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
5089         Change the call of gbb_loop_at_index and/or gbb_loop_index due
5090         to the redefinition.
5091         (compute_cloog_iv_types_1): ditto.
5092         (build_iv_mapping): ditto.
5093         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
5094         initialization.
5095         (free_gimple_bb): Removed GBB_LOOPS related free part.
5096         (build_bb_loops): Removed.
5097         * sese.h (struct gimple_bb): Removed loops.
5098         (GBB_LOOPS): Removed.
5099         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
5100         (gbb_loop_index): ditto.
5101
5102 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
5103
5104         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
5105         allow non constant strides.
5106         * gcc.dg/graphite/scop-20.c: New.
5107
5108 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5109
5110         * graphite-scop-detection.c (dot_all_scops): Fix system call
5111         return value warning.
5112         (dot_scop): Same.
5113
5114 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5115
5116         * gcc.dg/graphite/id-6.c: Fix pattern.
5117         * gcc.dg/graphite/scop-3.c: Same.
5118
5119 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5120
5121         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
5122         build_pairwise_constraint, dr_equality_constraints,
5123         build_pairwise_scheduling_equality,
5124         build_pairwise_scheduling_inequality, lexicographically_gt_p,
5125         build_lexicographically_gt_constraint, dependence_polyhedron,
5126         graphite_legal_transform_dr, graphite_legal_transform_bb,
5127         graphite_legal_transform): New.
5128         * graphite-poly.h (graphite_legal_transform): Declared.
5129         * graphite-sese-to-poly.c (build_poly_scop): Call to
5130         graphite_legal_transform is disabled for the moment.
5131
5132 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5133
5134         * graphite-poly.h (pbb_nb_scattering_dims): New.
5135         (pbb_nb_scattering): Use it.
5136
5137 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5138
5139         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
5140         Pointset_Powerset version of ppl_insert_dimensions.
5141         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
5142
5143 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5144
5145         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
5146
5147 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5148
5149         * graphite-poly.h: Fix comment.
5150
5151 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
5152
5153         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
5154
5155 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
5156
5157         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
5158         statements.
5159
5160 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
5161
5162         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
5163         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
5164         conditions.
5165
5166 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
5167
5168         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
5169         handle EQ_EXPR and NE_EXPR.
5170
5171 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
5172
5173         * graphite-poly.h (poly_dr): Fix comment.
5174
5175 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
5176             Tobias Grosser  <grosser@fim.uni-passau.de>
5177
5178         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
5179         with a zero dimension polyhedron.
5180         (find_scop_parameters): Move the call to scop_set_nb_params here.
5181         (build_loop_iteration_domains): Store in loop->aux the iteration
5182         domain polyhedron.
5183         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
5184         by any loop in scop.
5185         (build_poly_scop): Do not call scop_set_nb_params.
5186
5187 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
5188             Tobias Grosser  <grosser@fim.uni-passau.de>
5189
5190         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
5191         add_condition_to_domain not GT_EXPR.
5192
5193 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5194
5195         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
5196         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
5197         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
5198         upper_bound_assign to calculate unions.
5199         * gcc.dg/graphite/id-6.c: New.
5200
5201 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5202
5203         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
5204         handle abnormal edges.
5205
5206 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5207
5208         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
5209         (free_poly_bb): Also free poly_drs.
5210         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
5211         (poly_dr): Polyhedron to Pointset_Powerset.
5212         (pdr_accessp_nb_subscripts): Same.
5213         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
5214         poly_drs.
5215
5216 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5217
5218         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
5219         names into more meaningful names.
5220
5221 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5222
5223         * gfortran.dg/graphite/interchange-1.c: New.
5224         * gfortran.dg/graphite/interchange-2.c: New.
5225
5226 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5227
5228         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
5229         the reduction_list.
5230         * tree-parloops.c (rewrite_phi_with_iv): New.
5231         (rewrite_all_phi_nodes_with_iv): New.
5232         (canonicalize_loop_ivs): Call them.
5233
5234 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5235
5236         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
5237         graphite_find_data_references_in_stmt.
5238         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
5239         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
5240
5241 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5242
5243         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
5244
5245 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5246
5247         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
5248         instead of bb_in_region.
5249         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
5250         (build_sese_conditions): Use flag_bb_in_sese.
5251         * sese.c (register_bb_in_sese): Removed.
5252         (new_sese): Remove initialization of SESE_REGION_BBS.
5253         (free_sese): Do not free SESE_REGION_BBS.
5254         * sese.h (struct sese): Remove field region_basic_blocks.
5255         (SESE_REGION_BBS): Removed.
5256         (bb_in_sese_p): Implement in function of bb_in_region.
5257
5258 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
5259
5260         * graphite-scop-detection.c (limit_scops): Deal only with single exit
5261         loops.
5262
5263 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5264
5265         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
5266         and EQ_EXPR.
5267         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
5268         (add_condition_to_domain): New.
5269         (add_condition_to_pbb): New.
5270         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
5271         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
5272
5273 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
5274
5275         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
5276         ppl_Pointset_Powerset.
5277         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
5278         * graphite-poly.h (poly_bb): poly_bb.domain Same.
5279         (pbb_nb_loops): Same.
5280         * graphite-sese-to-poly.c (build_loop_iteration_domains,
5281         add_conditions_to_domain): Same.
5282         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
5283         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
5284         ppl_const_Polyhedron_t.
5285         (ppl_print_powerset_matrix): New.
5286         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
5287         ppl_print_powerset_matrix): New.
5288         (ppl_print_polyhedron_matrix): Updated.
5289
5290 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5291
5292         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
5293
5294 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5295
5296         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
5297         (print_iteration_domains, debug_iteration_domain,
5298         debug_iteration_domains): New.
5299         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
5300         debug_iteration_domains): Declared.
5301         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
5302         indenting.
5303
5304 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5305             Sebastian Pop  <sebastian.pop@amd.com>
5306
5307         * graphite-poly.h (print_iteration_domain): New.
5308         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
5309         (build_sese_conditions_1, build_sese_conditions_after,
5310         build_sese_conditions_before): New.
5311         (build_sese_conditions): Rewritten.
5312
5313 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
5314             Tobias Grosser  <grosser@fim.uni-passau.de>
5315
5316         Cleanup of code generation liveouts.
5317         * graphite-clast-to-gimple.c (translate_clast): Use a single
5318         rename_map instead of one per translated statement.
5319         Do not use SESE_LIVEOUT_RENAMES.
5320         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
5321         (gloog): Do not use SESE_LIVEOUT_RENAMES.
5322         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
5323         phi node of a reduction: when a loop contains a reduction used outside
5324         the loop, there should be a scalar close phi node on the exit block.
5325         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
5326         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
5327         (free_sese): Do not free them.
5328         (sese_build_liveouts_use): Do not use them.
5329         (sese_build_liveouts_bb): Same.
5330         (sese_build_liveouts): Same.
5331         (sese_insert_phis_for_liveouts): Same.
5332         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
5333         (defined_in_loop_p): New.
5334         (alive_after_loop): New.
5335         (close_phi_not_yet_inserted_p): New.
5336         (struct alep, alep_p): New.
5337         (add_loop_exit_phis): Remove from the rename_map all the names defined
5338         in the code generated loop.
5339         (insert_loop_close_phis): Traverse the rename_map passed to it.
5340         Don't use SESE_LIVEOUT_RENAMES.
5341         (default_liveout_before_guard): Renamed default_before_guard.
5342         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
5343         (graphite_copy_stmts_from_block): Do not directly call set_rename.
5344         (register_sese_liveout_renames): Removed.
5345         (copy_bb_and_scalar_dependences): Do not call it.
5346         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
5347         reduction_list.
5348         (SESE_LIVEOUT): Removed.
5349         (SESE_LIVEOUT_RENAMES): Removed.
5350         (SESE_REDUCTION_LIST): Removed.
5351         (sese_build_liveouts): Removed.
5352         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
5353         (insert_loop_close_phis): Pass a htab_t instead of a sese.
5354         (insert_guard_phis): Same.
5355         (rename_map_elt): Declare a VEC of them.
5356         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5357         trees not pointers to trees.
5358
5359         Rewrite in canonical close SSA form:
5360         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
5361         (limit_scops): Close the scop after the block containing the close phi
5362         nodes.
5363         (canonicalize_loop_closed_ssa): New.
5364         (canonicalize_loop_closed_ssa_form): New.
5365         (build_scops): Call canonicalize_loop_closed_ssa_form.
5366
5367         * graphite-sese-to-poly.c: Fix typos.
5368
5369 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
5370
5371         * graphite-poly.c (print_scattering_function, print_pbb_domain):
5372         Extended.
5373         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
5374         (print_pbb): Add conditions.
5375
5376 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
5377             Sebastian Pop  <sebastian.pop@amd.com>
5378
5379         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
5380         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
5381         (build_scop_bbs_1): New.
5382         (build_scop_bbs): Rewrite.
5383         * sese.h (bb_in_region): New.
5384
5385 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5386
5387         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5388         poly_drs vector.
5389         (print_scop): Style.
5390         * graphite-poly.h (poly_bb): Add drs vector.
5391         (PBB_DRS): Add accessor.
5392         * graphite-sese-to-poly.c (build_poly_dr): New.
5393         (build_pbb_drs, build_scop_drs): New.
5394         (build_poly_scop): call build_scop_drs (Disabled at the moment).
5395
5396 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5397
5398         * tree-ssa-loop.c: Include forgotten toplev.h
5399
5400 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5401
5402         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
5403         * gcc.dg/graphite/pr37883.c: Remove -floop-*
5404         * gcc.dg/graphite/pr37928.c: Same
5405         * gcc.dg/graphite/pr38409.c: Same
5406         * gcc.dg/graphite/pr38498.c: Same
5407         * gcc.dg/graphite/pr38559.c: Same
5408         * gcc.dg/graphite/pr39335.c: Same
5409         * gcc.dg/graphite/pr39335_1.c: Same
5410         * gfortran.dg/graphite/block-2.f: Same
5411         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
5412         with -floop-*.
5413
5414 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
5415
5416         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
5417         build_access_matrix, build_scop_data_accesses): Remove access function
5418         building. (We get a new version soon).
5419         (build_bb_loops, scan_tree_for_params_right_scev): Update.
5420         * sese.h (nb_loops_around_loop_in_sese): Remove.
5421         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
5422
5423 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
5424             Sebastian Pop  <sebastian.pop@amd.com>
5425
5426         * graphite-scop-detection.c (struct scopdet_info): Rename last
5427         field to exit.
5428         (scopdet_basic_block_info, build_scops_1): Don't use
5429         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
5430
5431 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
5432             Sebastian Pop  <sebastian.pop@amd.com>
5433
5434         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
5435         * sese.c (sese_build_liveouts_use): Renamed from
5436         sese_build_livein_liveouts_use. Remove liveins.
5437         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
5438         Call sese_build_liveouts_use.
5439         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
5440         Call sese_build_liveouts_bb.
5441         (new_sese, free_sese): Remove liveins.
5442         (sese_add_exit_phis_var): Deleted.
5443         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
5444         directly.
5445         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
5446
5447         * sese.h (sese): Remove num_ver and livein.
5448         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
5449
5450 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5451
5452         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
5453
5454 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
5455
5456         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
5457         (build_scop_scattering): Do not use compare_prefix_loops any more.
5458         (nb_common_loops): New.
5459
5460 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5461
5462         * sese.c (get_new_name_from_old_name): Renamed get_rename.
5463         (register_old_and_new_names): Renamed set_rename.
5464
5465 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5466
5467         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
5468         of the decl from the previous commit.
5469
5470 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5471
5472         * graphite-scop-detection.c (dot_scop): New.
5473         * graphite-scop-detection.h (dot_scop): Declared.
5474
5475 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5476
5477         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
5478
5479 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5480
5481         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
5482         condition at the end of the loop.
5483         * graphite.c (graphite_initialize, graphite_finalize): Print to
5484         dump_file the compiled function.
5485         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
5486         of create_empty_loop_on_edge.
5487         (translate_clast): Update the code generation of loops for the new
5488         shape of loops.
5489         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
5490
5491 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
5492
5493         Reverted the patch from 2009-03-19.
5494
5495 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
5496
5497         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
5498         poly_drs vector.
5499         (print_scop): Style.
5500         * graphite-poly.h (poly_bb): Add drs vector.
5501         (PBB_DRS): Add accessor.
5502         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
5503         (build_access_matrix_with_af, build_access_matrix,
5504         build_scop_data_accesses): Delete.
5505         (build_poly_dr): New.
5506         (build_pbb_drs, build_scop_drs): New.
5507         (build_poly_scop): call build_scop_drs.
5508
5509 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
5510
5511         * graphite-scop-detection.c (dot_all_scops_1): Close the table
5512         once per basic block.
5513
5514 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5515
5516         * graphite-scop-detection.c (graphite_can_represent_scev): New.
5517         (graphite_can_represent_expr): Renamed from loop_affine_expr
5518         and enhanced.
5519         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
5520         (graphite_cannot_represent_loop): Add scop_entry to parameters.
5521         (scopdet_basic_block_info): Actually define entry_block.
5522         (stmt_simple_memref_p): Moved here from ...
5523
5524         * tree-data-ref.c (stmt_simple_memref_p): here.
5525         * tree-data-ref.h (stmt_simple_memref_p): Removed.
5526
5527 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
5528
5529         * gcc.dg/graphite/id-4.c: New.
5530
5531 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5532
5533         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5534         (register_old_and_new_names): Update the content of the map.
5535         When there was already a rename_map_elt in the map at that
5536         location, free it.
5537         (copy_bb_and_scalar_dependences): Do rename_variables after
5538         expand_scalar_variables.
5539         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5540         of the map.  When there was already a rename_map_elt in the
5541         map at that location, free it.
5542         (translate_clast): Pass the rename_map.  Do not initialize and free
5543         a rename_map per stmt_user.
5544         (gloog): Initialize and free one rename_map and pass it to
5545         translate_clast.
5546
5547 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
5548
5549         * sese.c (expand_scalar_variables_stmt,
5550         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5551         parameter.
5552         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5553         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5554         the gimple_stmt_iterator of the statement to be expanded.
5555         * graphite-scop-detection.c (is_simple_operand): Do handle
5556         REALPART_EXPR.
5557
5558 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5559
5560         * graphite-scop-detection.c (is_simple_operand): Do not handle
5561         REALPART_EXPR.
5562         * gcc.dg/graphite/id-2.c: New.
5563
5564         * graphite-sese-to-poly.c (build_bb_loops,
5565         add_value_to_dim, scan_tree_for_params_right_scev,
5566         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5567         find_params_in_bb, build_loop_iteration_domains,
5568         add_conditions_to_domain): Remove subtract.
5569
5570 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5571
5572         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5573         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5574         pbb_loop_at_index -> gbb_loop_at_index.
5575         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5576         (debug_loop_vec): Delete.
5577         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5578         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
5579         (PBB_LOOPS): Removed.
5580         (PBB_BLACK_BOX): Insert cast.
5581         (pbb_set_black_box): New setter.
5582         (pbb_loop_at_index, pbb_loop_index): Removed.
5583         (scop_set_region, scop_set_nb_params): New.
5584         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5585         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5586         (build_poly_scop): Use scop_set_nb_params.
5587         * sese.h (gimple_bb): Add LOOPS.
5588         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5589
5590 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5591
5592         Revert previous commit.
5593
5594 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5595
5596         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5597         (register_old_and_new_names): Update the content of the map.
5598         When there was already a rename_map_elt in the map at that
5599         location, free it.
5600         (copy_bb_and_scalar_dependences): Do rename_variables after
5601         expand_scalar_variables.
5602         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5603         of the map.  When there was already a rename_map_elt in the
5604         map at that location, free it.
5605         (translate_clast): Pass the rename_map.  Do not initialize and free
5606         a rename_map per stmt_user.
5607         (gloog): Initialize and free one rename_map and pass it to
5608         translate_clast.
5609
5610 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5611
5612         Remove forgotten line in revert.
5613
5614 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5615
5616         Revert previous commit.
5617
5618 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5619
5620         * sese.c (register_old_and_new_names): Update the content
5621         of the map.  When there was already a rename_map_elt in the
5622         map at that location, free it.
5623         (copy_bb_and_scalar_dependences): Do rename_variables after
5624         expand_scalar_variables.
5625         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5626         of the map.  When there was already a rename_map_elt in the
5627         map at that location, free it.
5628         (translate_clast): Pass the rename_map.  Do not initialize and free
5629         a rename_map per stmt_user.
5630         (gloog): Initialize and free one rename_map and pass it to
5631         translate_clast.
5632
5633 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5634
5635         * graphite-clast-to-gimple.c (translate_clast): context_loop
5636         is never NULL.
5637
5638 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5639             Sebastian Pop  <sebastian.pop@amd.com>
5640
5641         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5642         of the use of ppl_Polyhedron_map_space_dimensions.
5643
5644 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5645             Sebastian Pop  <sebastian.pop@amd.com>
5646
5647         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5648         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5649         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5650         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5651         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5652         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5653         pbb_nb_params): New.
5654         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5655         nb_loops_around_pbb): Adapt return types.
5656
5657 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5658
5659         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5660         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5661         graphite-scop-detection.o, graphite-poly.o): Add
5662         more headers.
5663
5664 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5665
5666         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5667         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5668         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5669
5670 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5671
5672         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5673         * gcc.dg/graphite/pr37828.c: Same.
5674         * gcc.dg/graphite/pr37684.c: Same.
5675         * gcc.dg/graphite/block-0.c: Same.
5676         * gcc.dg/graphite/block-1.c: Same.
5677         * gcc.dg/graphite/block-2.c: Same.
5678         * gcc.dg/graphite/block-3.c: Same.
5679         * gcc.dg/graphite/block-4.c: Same.
5680         * gcc.dg/graphite/block-5.c: Same.
5681         * gcc.dg/graphite/block-6.c: Same.
5682         * gfortran.dg/graphite/pr38083.f90: Same.
5683         * gfortran.dg/graphite/block-1.f90: Same.
5684         * gfortran.dg/graphite/block-3.f90: Same.
5685         * gfortran.dg/graphite/pr37852.f90: Same.
5686         * gfortran.dg/graphite/block-4.f90: Same.
5687         * gfortran.dg/graphite/pr37980.f90: Same.
5688         * gfortran.dg/graphite/pr38953.f90: Same.
5689         * gfortran.dg/graphite/pr37857.f90: Same.
5690         * opts.c: Remove -floop-block from -O2.
5691         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5692         -floop-strip-mine are used.
5693
5694 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5695             Sebastian Pop  <sebastian.pop@amd.com>
5696
5697         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5698         dimensions.
5699         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5700         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5701         strip_mine_profitable_p, is_interchange_valid,
5702         graphite_trans_bb_block, graphite_trans_loop_block,
5703         graphite_trans_scop_block): Temporary removed.
5704         (extend_scattering, unify_scattering_dimensions): New.
5705         (print_scattering_function, graphite_read_transforms):
5706         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5707         (graphite_generate_scattering_fns): Removed.
5708         (apply_poly_transforms): Cleanup.
5709         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5710         (schedule_to_scattering): Moved.
5711         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5712         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5713         (pbb_nb_scattering): New.
5714         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5715         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5716         Removed.
5717         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5718         shift_poly.
5719         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5720         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5721         -> PBB_TRANSFORMED_SCATTERING.
5722         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5723         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5724         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5725         (check_poly_representation): Do not return bool.
5726         (graphite_transform_loops): Reformat.
5727         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5728
5729 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5730
5731         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5732         debug_pbb_domain, debug_pbb, debug_scop): New.
5733         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5734         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5735
5736 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5737
5738         PR middle-end/39335
5739         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5740         when the type precision of the induction variable should be
5741         larger than the type precision of nit.
5742         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5743         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5744         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5745
5746         * gcc.dg/graphite/pr39335_1.c: New.
5747         * gcc.dg/graphite/pr39335.c: New.
5748
5749 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5750
5751         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5752         SSA_NAMES not struct reduction_info.
5753
5754 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5755
5756         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5757
5758 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5759             Tobias Grosser  <grosser@fim.uni-passau.de>
5760
5761         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5762         (free_sese): Free SESE_REDUCTION_LIST.
5763         * sese.h (struct sese): Add field reduction_list.
5764         (SESE_REDUCTION_LIST): New.
5765         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5766         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5767
5768 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5769             Tobias Grosser  <grosser@fim.uni-passau.de>
5770
5771         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5772         of loop_p.
5773
5774 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5775             Tobias Grosser  <grosser@fim.uni-passau.de>
5776
5777         * tree-parloops.c (struct brli, build_reduction_list_info,
5778         analyze_reduction_list, gather_scalar_reductions): New.
5779         (loop_parallel_p): Build a reduction list containing only
5780         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5781         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5782         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5783         * tree-flow.h (gather_scalar_reductions): Declared.
5784
5785 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5786
5787         PR middle-end/39308
5788         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5789         number_of_iterations_exit from a gcc_assert.
5790
5791 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5792             Jan Sjodin  <jan.sjodin@amd.com>
5793
5794         * output.h (graphite_out_file, graphite_in_file): Declared.
5795         * toplev.c (graphite_out_file, graphite_in_file): New.
5796         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5797         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5798         Don't call schedule_to_scattering.
5799         * common.opt (fgraphite-write, fgraphite-read): New.
5800         * graphite-poly.c: Include output.h.
5801         (print_scattering_function, print_scattering_functions,
5802         debug_scattering_function, debug_scattering_functions,
5803         graphite_write_transforms, graphite_read_transforms,
5804         graphite_generate_scattering_fns): New.
5805         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5806         Call graphite_generate_scattering_fns, graphite_write_transforms,
5807         graphite_read_transforms.
5808         (new_poly_bb): Initialize PBB_SCATTERING.
5809         (free_poly_bb): Free PBB_SCATTERING.
5810         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5811         * graphite-poly.h (struct poly_bb): Add field scattering.
5812         (PBB_SCATTERING): New.
5813         (print_scattering_function, print_scattering_functions,
5814         debug_scattering_function, debug_scattering_functions): Declared.
5815         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5816         GMP values, not integers!
5817         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5818         ppl_read_polyhedron_matrix): New.
5819         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5820         debug_ppl_polyhedron_matrix,
5821         ppl_read_polyhedron_matrix): Declared.
5822         * Makefile.in (graphite-poly.o): Depends on output.h.
5823
5824 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5825             Tobias Grosser  <grosser@fim.uni-passau.de>
5826
5827         Revert this change:
5828         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5829         scalar evolutions in the scop_entry->loop_father.
5830
5831 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5832             Tobias Grosser  <grosser@fim.uni-passau.de>
5833
5834         * graphite.h (ref_nb_loops): Remove declaration.
5835         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5836         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5837         debug_gbb): Moved to sese.h.
5838         * sese.h: As said.
5839
5840 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5841             Tobias Grosser  <grosser@fim.uni-passau.de>
5842
5843         * graphite-data-ref.[ch]: Disable.
5844
5845 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5846             Tobias Grosser  <grosser@fim.uni-passau.de>
5847
5848         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5849         scalar evolutions in the scop_entry->loop_father.
5850
5851 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5852
5853         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5854         (graphite_cannot_represent_loop_niter): Renamed
5855         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5856         (limit_scops): build_sese_loop_nests does not return a bool.
5857         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5858         * sese.c (nb_reductions_in_loop): ... from here.
5859         (graphite_loop_normal_form): ... from here.
5860         (sese_record_loop): Does not fail, so does not return a bool.
5861         (build_sese_loop_nests): Same.
5862         * sese.h (build_sese_loop_nests): Update declaration.
5863         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5864         (build_graphite_loop_normal_form): New.
5865         (gloog): Call build_graphite_loop_normal_form.
5866         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5867         build_sese_loop_nests.
5868
5869         * gcc.dg/graphite/id-1.c: New.
5870
5871 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5872             Tobias Grosser  <grosser@fim.uni-passau.de>
5873
5874         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5875         The SCoP detection fix is sufficient.
5876
5877 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5878
5879         PR tree-optimization/39260
5880         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5881         the basic block contains a condition with a real type.
5882         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5883
5884         * gcc.dg/graphite/pr39260.c: New.
5885
5886 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5887
5888         * graphite-poly.c: Inlcude params.h.
5889         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5890         the size of a tile.
5891         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5892         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5893
5894 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5895             Tobias Grosser  <grosser@fim.uni-passau.de>
5896
5897         * graphite-scop-detection.c (dot_all_scops_1,
5898         dot_all_scops): Moved here.
5899         * graphite-scop-detection.h (dot_all_scops): Declared here.
5900         * graphite.c (graphite_initialize, graphite_finalize): New.
5901         (graphite_transform_loops): Cleaned up.
5902         * sese.c (debug_oldivs): Moved here.
5903         * graphite-poly.c (graphite_apply_transformations): Renamed
5904         apply_poly_transforms.
5905         (debug_loop_vec): Moved here.
5906         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5907         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5908         find_scop_parameters, build_scop_iteration_domain,
5909         add_conditions_to_constraints, build_scop_canonical_schedules,
5910         build_scop_data_accesses): Now static.
5911         (build_poly_scop, check_poly_representation): New.
5912
5913 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5914
5915         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5916         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5917         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5918         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5919         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5920         scan_tree_for_params, struct irp_data, dx_record_params,
5921         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5922         build_loop_iteration_domains, add_conditions_to_domain,
5923         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5924         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5925         build_sese_conditions, add_conditions_to_constraints,
5926         build_scop_iteration_domain, build_access_matrix_with_af,
5927         build_access_matrix,
5928         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5929
5930         * graphite-sese-to-poly.c: New.
5931         * graphite-sese-to-poly.h: New.
5932
5933         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5934
5935 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5936
5937         * graphite.c: Split graphite code generation to a new file.
5938         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5939         max_precision_type, clast_to_gcc_expression_red,
5940         clast_to_gcc_expression, gcc_type_for_clast_expr,
5941         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5942         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5943         graphite_create_new_guard, clast_get_body_of_loop,
5944         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5945         graphite_create_new_loop, build_iv_mapping, copy_renames,
5946         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5947         compute_cloog_iv_types, free_scattering, save_var_name,
5948         initialize_cloog_names, build_scop_context, build_cloog_prog,
5949         set_cloog_options, debug_clast_stmt, scop_to_clast,
5950         print_generated_program, debug_generated_program,
5951         gloog): Moved to graphite-clast-to-gimple.c.
5952
5953         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5954
5955         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5956         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5957         loop_iv_stack_pop, loop_iv_stack_get_iv,
5958         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5959         free_loop_iv_stack, loop_iv_stack_remove_constants,
5960         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5961         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5962         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5963         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5964         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5965         get_vdef_before_sese, sese_adjust_vphi,
5966         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5967         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5968         is_iv, expand_scalar_variables_ssa_name,
5969         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5970         expand_scalar_variables, rename_variables, remove_condition,
5971         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5972         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5973         default_liveout_before_guard, add_guard_exit_phis,
5974         insert_guard_phis, register_old_and_new_names,
5975         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5976         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5977         if_region_set_false_region, create_if_region_on_edge,
5978         move_sese_in_condition): Moved to sese.c.
5979
5980         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5981         if_region_exit, if_region_get_condition_block,
5982         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5983         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5984         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5985         ivtype_map_elt, new_ivtype_map_elt,
5986         recompute_all_dominators): Moved to sese.h.
5987
5988         * graphite-clast-to-gimple.c: New.
5989         * graphite-clast-to-gimple.h: New.
5990         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5991         * sese.c: Modified as said above.
5992         * sese.h: Same.
5993
5994 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5995
5996         * graphite.c: Split scop detection to a new file.
5997         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5998         move_sd_regions, loop_affine_expr, exclude_component_ref,
5999         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
6000         graphite_cannot_represent_loop_niter, struct scopdet_info,
6001         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
6002         find_single_entry_edge, find_single_exit_edge,
6003         create_single_entry_edge, sd_region_without_exit,
6004         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
6005         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
6006         Moved to graphite-scop-detection.c.
6007
6008         * graphite-scop-detection.c: New.
6009         * graphite-scop-detection.h: New.
6010         * Makefile.in: Add new rule for graphite-scop-detection.o.
6011
6012         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
6013         tree-scalar-evolution.h.
6014         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
6015         build_sese_loop_nests): Moved here from graphite.c.
6016         (param_index): Renamed parameter_index_in_region.
6017
6018 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
6019             Sebastian Pop  <sebastian.pop@amd.com>
6020
6021         * gcc.dg/graphite/block-0.c: Expected to fail now.
6022         * gcc.dg/graphite/block-1.c: Same.
6023         * gcc.dg/graphite/block-5.c: Same.
6024         * gcc.dg/graphite/block-6.c: Same.
6025
6026 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
6027             Sebastian Pop  <sebastian.pop@amd.com>
6028
6029         * graphite.h: Separate from graphite_bb_p the polyhedral
6030         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
6031         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
6032         graphite-data-ref.h.
6033         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
6034         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
6035         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
6036         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
6037         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
6038         scop_nb_params): Moved to graphite-poly.h.
6039         * graphite-data-ref.c: Same.
6040         * graphite-data-ref.h: New.
6041         * graphite.c: Same.
6042         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
6043         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
6044         is_interchange_valid, graphite_trans_bb_block,
6045         graphite_trans_loop_block, scop_max_loop_depth,
6046         graphite_trans_scop_block, graphite_apply_transformations,
6047         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
6048         graphite-poly.c.
6049         * graphite-poly.h: New.
6050         * graphite-poly.c: New.
6051         * Makefile.in (OBJS-common): Add graphite-poly.o.
6052         (graphite-poly.o): New rule.
6053         * tree-data-ref.h (struct data_reference): Remove unused scop field.
6054         (DR_SCOP): Removed.
6055
6056 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
6057             Tobias Grosser  <grosser@fim.uni-passau.de>
6058
6059         * graphite.c: Replace gb -> gbb.
6060         * graphite.h: Same.
6061         * graphite-data-ref.c: Same.
6062
6063 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
6064             Tobias Grosser  <grosser@fim.uni-passau.de>
6065
6066         * Makefile.in (OBJS-commmon): Add sese.o.
6067         (sese.o): New.
6068         (graphite.o): Add sese.h.
6069         * graphite.c (bb_in_ss_p, loop_in_sese_p,
6070         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
6071         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
6072         Move to sese.
6073         (block_before_scop): Add missing return.
6074         (new_scop, free_scop): Remove SESE data structures.
6075         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
6076         find_scop_parameters, build_loop_iteration_domains,
6077         add_conditions_to_domain, register_scop_liveout_renames,
6078         copy_bb_and_scalar_dependences): Scop -> SESE.
6079
6080         (add_conditions_to_domain): SCoP -> SESE and remove check
6081         (scop_contains_non_iv_scalar_phi_nodes): New.
6082         (build_scop_conditions_1, build_scop_conditions): Remove check for
6083         non iv scalar phi nodes.
6084         (print_scop_statistics): New.
6085         (graphite_transform_loops): Cleanup.
6086
6087         * graphite.h: Move to sese & cleanup.
6088         * sese.c: New.
6089         * sese.h: New.
6090
6091 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6092             Tobias Grosser  <grosser@fim.uni-passau.de>
6093
6094         * graphite.c (build_scop_conditions_1): Conditions are only
6095         at the end of a basic block.
6096
6097 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6098             Tobias Grosser  <grosser@fim.uni-passau>
6099
6100         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
6101         field.
6102         (GBB_ALPHA): Removed.
6103
6104 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6105             Tobias Grosser  <grosser@fim.uni-passau.de>
6106
6107         * graphite-data-ref.c (graphite_test_dependence): Don't use
6108         GBB_DYNAMIC_SCHEDULE.
6109         * graphite.c (new_graphite_bb): Same.
6110         (free_graphite_bb): Same.
6111         (build_scop_dynamic_schedules): Removed.
6112         (graphite_transform_loops): Don't call it.
6113         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
6114         (GBB_DYNAMIC_SCHEDULE): Removed.
6115
6116 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6117             Tobias Grosser  <grosser@fim.uni-passau.de>
6118
6119         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
6120         (print_graphite_bb): Same.
6121         (build_cloog_prog): Same.
6122
6123 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6124             Tobias Grosser  <grosser@fim.uni-passau.de>
6125
6126         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
6127
6128 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6129             Tobias Grosser  <grosser@fim.uni-passau.de>
6130
6131         * graphite.c (build_scop_context): Don't use CloogMatrix.
6132         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
6133         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
6134
6135 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6136             Tobias Grosser  <grosser@fim.uni-passau.de>
6137
6138         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
6139         liveout_renames, add_params fields...
6140         (struct sese): ... here.
6141         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
6142         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
6143
6144 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6145             Tobias Grosser  <grosser@fim.uni-passau.de>
6146
6147         * graphite.c (print_scop): Do not print the CLooG program.
6148         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
6149         build_cloog_prog, gloog): Don't use SCOP_PROG.
6150         (find_transform): Renamed scop_to_clast.
6151         (print_generated_program, debug_generated_program): New.
6152         (graphite_transform_loops): Adapt to new interface.
6153         * graphite.h (struct scop): Remove program field.
6154         (SCOP_PROG): Removed.
6155         (print_generated_program, debug_generated_program): Declared.
6156
6157 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
6158
6159         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
6160         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
6161         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
6162         free_graphite_bb, build_scop_canonical_schedules,
6163         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
6164         schedules are now represented using a ppl_Linear_Expression_t.
6165         * graphite.h (struct graphite_bb): Same.
6166         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
6167         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
6168
6169 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
6170
6171         * graphite.c: Free local memory.
6172         * graphite-ppl.c: Same.
6173
6174 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
6175
6176         * graphite.c (const_column_index, get_first_matching_sign_row_index,
6177         get_lower_bound_row, get_upper_bound_row, copy_constraint,
6178         swap_constraint_variables, scale_constraint_variable): Removed.
6179         (graphite_trans_bb_strip_mine): Remove pong.
6180         * graphite-ppl.c: Include missing header files.
6181         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
6182         * graphite-ppl.h (ppl_strip_loop): Declared.
6183         * Makefile.in (graphite-ppl.o): Adjust dependences.
6184
6185 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
6186
6187         * graphite.c (build_loop_iteration_domains): Remove ping pong.
6188         (build_scop_iteration_domain): Same.
6189
6190 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
6191
6192         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6193         ping pong.
6194         (add_value_to_dim, scan_tree_for_params_right_scev,
6195         scan_tree_for_params_int): New.
6196         * graphite-ppl.c (oppose_constraint): New.
6197         (insert_constraint_into_matrix): Implement missing cases.
6198         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6199
6200 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
6201
6202         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6203         use ppl_move_dimension.
6204
6205 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
6206
6207         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
6208         * graphite.c: Same.
6209         * graphite.h: Same.
6210         * graphite-ppl.c: Same.
6211         * graphite-ppl.h: Same.
6212
6213 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
6214
6215         Revert last 3 commits.
6216
6217 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6218
6219         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
6220         ping pong.
6221         (add_value_to_dim, scan_tree_for_params_right_scev,
6222         scan_tree_for_params_int): New.
6223         * graphite-ppl.c (oppose_constraint): New.
6224         (insert_constraint_into_matrix): Implement missing cases.
6225         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
6226
6227 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6228
6229         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
6230
6231 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6232             Tobias Grosser  <grosser@fim.uni-passau.de>
6233
6234         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
6235         use ppl_move_dimension.
6236         * graphite-ppl.c (ppl_move_dimension): New.
6237         * graphite-ppl.h (ppl_move_dimension): Declared.
6238
6239 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
6240
6241         * graphite.c: Do not include cloog/cloog.h.
6242         (print_graphite_bb): Remove ping pong, call PPL print function.
6243
6244 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6245
6246         * Makefile.in (OBJS-common): Add graphite-ppl.o.
6247         (graphite.o): Add dependence on graphite-ppl.h.
6248         (graphite-ppl.o): New.
6249         (graphite-data-ref.c): Ping pong between PPL data structures
6250         and matrices.
6251         * graphite-ppl.c: New.
6252         * graphite-ppl.h: New.
6253         * graphite.c: Include graphite-ppl.h.
6254         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
6255         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
6256         Ping pong between PPL data structures and matrices.
6257         (new_graphite_bb): Create a PPL constraint system.
6258         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
6259         (build_loop_iteration_domains): Use PPL functions.
6260         * graphite.h: Include graphite-ppl.h.  Fix comments.
6261         (graphite_bb): Use a ppl_Constraint_System_t instead of
6262         CloogMatrix for representing the domain.
6263         (scop): Remove static_schedule.
6264         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
6265
6266 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
6267
6268         * graphite.c: Fix some comments.
6269
6270 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
6271
6272         PR middle-end/38953
6273         * graphite.c (if_region_set_false_region): After moving a region
6274         in the false branch of a condition, remove the empty dummy
6275         basic block.
6276         (gloog): Remove wrong fix for PR38953.
6277
6278 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
6279
6280         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
6281         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
6282         register_bb_in_sese, new_sese, free_sese): Moved.
6283         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
6284         outermost_loop_in_scop, build_scop_iteration_domain,
6285         expand_scalar_variables_ssa_name, get_vdef_before_scop,
6286         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
6287         Use loop_in_sese_p instead of loop_in_scop_p.
6288         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
6289         (free_scop): Do not free SCOP_BBS_B.
6290         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
6291         ref_nb_loops): Moved here...
6292         * graphite.h (ref_nb_loops): ... from here.
6293         (struct scop): Remove bbs_b bitmap.
6294         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
6295         * gcc.dg/graphite/scop-19.c: New
6296
6297 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
6298
6299         * graphite.c (scopdet_basic_block_info): Fix bug in scop
6300         detection.
6301
6302 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
6303
6304         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
6305         eq_loop_to_cloog_loop): Remove.
6306         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
6307         * graphite.h (struct scop): Remove loop2cloog_loop.
6308         (loop_domain_dim, loop_iteration_vector_dim): Remove.
6309
6310 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
6311
6312         * opts.c (decode_options): Only add graphite options to O2
6313         if we compile with graphite enabled.
6314
6315 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
6316
6317         * Merge from mainline (r143163:143684).
6318
6319 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
6320
6321         * graphite.c (debug_value): Removed.
6322         * graphite.h (debug_value): Removed.
6323
6324 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6325
6326         * passes.c (init_optimization_passes): Do not call pass_copy_prop
6327         after graphite: pass_copy_prop does not maintain a proper loop closed
6328         SSA form.  pass_copy_prop should be fixed.
6329
6330 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6331
6332         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
6333
6334 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
6335
6336         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
6337         (gloog): Split the exit of the scop when the scop exit is a loop exit.
6338         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
6339         changed the CFG.
6340
6341 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
6342
6343         * graphite.c (gloog): Return true when code gen succeeded.
6344         (graphite_transform_loops): Do not call cleanup_tree_cfg if
6345         the code of the function did not changed.  After cleanup_tree_cfg
6346         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
6347         form.
6348
6349 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
6350
6351         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
6352         gimple_call_lhs is NULL.
6353
6354 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
6355             Tobias Grosser  <tobi.grosser@amd.com>
6356
6357         * graphite.c (graphite_trans_scop_block): Do not block single
6358         nested loops.
6359
6360 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
6361             Tobias Grosser  <tobi.grosser@amd.com>
6362
6363         * graphite.c (build_scop_canonical_schedules): Start schedules at
6364         zero.
6365
6366 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
6367             Tobias Grosser  <tobi.grosser@amd.com>
6368
6369         * graphite.c (compare_prefix_loops): New.
6370         (build_scop_canonical_schedules): Rewritten.
6371         (graphite_transform_loops): Move build_scop_canonical_schedules
6372         after build_scop_iteration_domain.
6373
6374 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6375             Tobias Grosser  <tobi.grosser@amd.com>
6376
6377         * graphite.c (add_conditions_to_domain): Add the loops to
6378         the dimension of the iteration domain.  Do copy the domain
6379         only when it exists.
6380         (build_scop_conditions_1): Do not call add_conditions_to_domain.
6381         (add_conditions_to_constraints): New.
6382         (can_generate_code_stmt, can_generate_code): Removed.
6383         (gloog): Do not call can_generate_code.
6384         (graphite_transform_loops): Call add_conditions_to_constraints
6385         after building the iteration domain.
6386
6387 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6388             Tobias Grosser  <tobi.grosser@amd.com>
6389             Jan Sjodin  <jan.sjodin@amd.com>
6390
6391         * graphite.c (scan_tree_for_params): On substractions negate
6392         all the coefficients of the term.
6393         (clast_to_gcc_expression_red): New.  Handle reduction expressions
6394         of more than two operands.
6395         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
6396         (get_vdef_before_scop): Handle also the case of default definitions.
6397
6398 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
6399
6400         PR middle-end/38431
6401         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
6402         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
6403         (gloog): Do not call cleanup_tree_cfg.
6404         (graphite_transform_loops): Call cleanup_tree_cfg after all
6405         scops have been code generated.
6406
6407 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
6408
6409         * passes.c (init_optimization_passes): Schedule after
6410         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
6411
6412 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
6413
6414         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
6415         Fix comment.
6416         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
6417         Set the type of an expression to the type of its assign statement.
6418         (expand_scalar_variables_expr):  Do not pass loop_p.
6419         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
6420         (copy_bb_and_scalar_dependences): Do not pass loop_p.
6421         (translate_clast): Update call to copy_bb_and_scalar_dependences.
6422
6423 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
6424
6425         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
6426         an expression to the gimple_expr_type of its assign statement.
6427         (expand_scalar_variables_expr): Stop recursion on tcc_constant
6428         or tcc_declaration.
6429
6430 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
6431
6432         PR tree-optimization/38786
6433         * gcc.dg/graphite/pr38786.c: New.
6434         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
6435         the SSA_NAME case of expand_scalar_variables_expr.
6436         (expand_scalar_variables_expr): Also gather the scalar computation
6437         used to index the memory access.
6438         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
6439         the gimple_stmt_iterator where it inserts new code.
6440
6441 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
6442
6443         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
6444
6445 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
6446
6447         * opts.c (decode_options): Enable flag_graphite_identity and
6448         flag_loop_block in -O2 and above.
6449
6450 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6451
6452         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
6453         Fix merge problem: replace with the file from trunk.
6454
6455 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
6456
6457         * Merge from mainline (r141727:143163).
6458
6459 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
6460             Jan Sjodin  <jan.sjodin@amd.com>
6461
6462         PR tree-optimization/38559
6463         * gcc.dg/graphite/pr38559.c: New.
6464
6465         * graphite.c (debug_value, copy_constraint,
6466         swap_constraint_variables, scale_constraint_variable, ): New.
6467         (get_lower_bound, get_upper_bound): Removed.
6468         (graphite_trans_bb_strip_mine): Clean up this code that works
6469         only for constant number of iterations.  Fully copy upper and
6470         lower bound constraints, not only the constant part of them.
6471         * graphite.h (debug_value): Declared.
6472
6473 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
6474
6475         PR tree-optimization/38492
6476         PR tree-optimization/38498
6477         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
6478         * tree-chrec.h (scev_is_linear_expression): Declared.
6479         * graphite.c (graphite_cannot_represent_loop_niter): New.
6480         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
6481         (graphite_loop_normal_form): Use gcc_assert.
6482         (scan_tree_for_params): Use CASE_CONVERT.
6483         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
6484         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
6485         Use gcc_assert.  Discard scops that contain unhandled cases.
6486         (build_scop_conditions): Return a boolean status for unhandled cases.
6487         (strip_mine_profitable_p): Print the loop number, not its depth.
6488         (is_interchange_valid): Pass the depth of the loop nest, don't
6489         recompute it wrongly.
6490         (graphite_trans_bb_block): Same.
6491         (graphite_trans_bb_block): Print tentative of loop blocking.
6492         (graphite_trans_scop_block): Do not print that the loop has been
6493         blocked.
6494         (graphite_transform_loops): Do not handle scops that contain condition
6495         scalar phi nodes.
6496
6497         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
6498         in trunk.
6499         * gcc.dg/graphite/block-0.c: Update test.
6500         * gcc.dg/graphite/block-1.c: Same.
6501         * gcc.dg/graphite/block-2.c: Remove xfail and test for
6502         blocking.
6503         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
6504         * gcc.dg/graphite/block-3.c: New.
6505         * gcc.dg/graphite/pr38498.c: New.
6506
6507 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
6508
6509         PR tree-optimization/38510
6510         * gcc.dg/graphite/pr38510.c: New.
6511         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
6512           (translate_clast): Call recompute_all_dominators before
6513           graphite_verify.
6514           (gloog): Call recompute_all_dominators before graphite_verify.
6515
6516 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
6517
6518         PR tree-optimization/38492
6519         * graphite.c (rename_map_elt, debug_rename_elt,
6520         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
6521         rename_map_elt_info, eq_rename_map_elts,
6522         get_new_name_from_old_name, bb_in_sese_p): Moved around.
6523         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
6524         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
6525         (sese_build_livein_liveouts): New.
6526         (new_sese, free_sese): New.
6527         (new_scop): Call new_sese.
6528         (free_scop): Call free_sese.
6529         (rename_variables_from_edge, rename_phis_end_scop): Removed.
6530         (register_old_new_names): Renamed register_old_and_new_names.
6531         (register_scop_liveout_renames, add_loop_exit_phis,
6532         insert_loop_close_phis, struct igp,
6533         default_liveout_before_guard, add_guard_exit_phis,
6534         insert_guard_phis, copy_renames): New.
6535         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
6536         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
6537         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
6538         (scop_adjust_phis_for_liveouts): New.
6539         (gloog): Call scop_adjust_phis_for_liveouts.
6540
6541         * graphite.h (struct sese): Documented.  Added fields liveout,
6542         num_ver and livein.
6543         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
6544         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
6545         (struct scop): Added field liveout_renames.
6546         (SCOP_LIVEOUT_RENAMES): New.
6547
6548 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6549
6550         PR tree-optimization/38409
6551         * gcc.dg/graphite/pr38409.c: New.
6552         * graphite.c (nb_reductions_in_loop): Use simple_iv.
6553
6554 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6555
6556         * graphite.c (gcc_type_for_cloog_iv): By default return
6557         integer_type_node.
6558         (graphite_create_new_loop): Don't fold_convert the already
6559         fold_convert-ed expression.
6560
6561 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
6562
6563         PR tree-optimization/38446
6564         * gcc.dg/graphite/pr38446.c: New.
6565         * graphite.c (register_bb_in_sese): New.
6566         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6567         looking at the bbs in the region.
6568         * graphite.h (sese): Add region_basic_blocks pointer set to
6569         structure and initialize at the time of defining new scop.
6570
6571 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6572
6573         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6574         (find_params_in_bb): Do not free data refs.
6575         (free_graphite_bb): Add FIXME on disabled free_data_refs.
6576
6577 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6578
6579         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6580         * gcc.dg/graphite/scop-17.c: Same.
6581         * gcc.dg/graphite/block-5.c: New.
6582         * gcc.dg/graphite/block-6.c: New.
6583         * gcc.dg/graphite/pr37485.c: Clean dump file after.
6584         * gcc.dg/graphite/pr37684.c: Same.
6585         * gcc.dg/graphite/block-2.c: Same.
6586
6587         * graphite.c (struct ivtype_map_elt): New.
6588         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6589         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6590         gcc_type_for_cloog_iv): New.
6591         (loop_iv_stack_patch_for_consts): Use the type of the induction
6592         variable from the original loop, except for the automatically
6593         generated loops, i.e., in the case of a strip-mined loop, in
6594         which case there is no original loop: in that case just use
6595         integer_type_node.
6596         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6597         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6598         (clast_name_to_gcc): Accept params to be NULL.
6599         (clast_to_gcc_expression): Take an extra parameter for the type.
6600         Convert to that type all the expressions built by this function.
6601         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6602         (graphite_translate_clast_equation): Compute the type of the
6603         clast_equation before translating its LHS and RHS.
6604         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6605         (graphite_create_new_loop): Compute the type of the induction
6606         variable before translating the lower and upper bounds and before
6607         creating the induction variable.
6608         (rename_variables_from_edge, rename_phis_end_scop): New.
6609         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6610         (sese_add_exit_phis_edge): Do not use integer_zero_node.
6611         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6612         compute_cloog_iv_types): New.
6613         (gloog): Call compute_cloog_iv_types before starting the
6614         translation of the clast.
6615
6616         * graphite.h (struct graphite_bb): New field cloog_iv_types.
6617         (GBB_CLOOG_IV_TYPES): New.
6618         (debug_ivtype_map): Declared.
6619         (oldiv_for_loop): New.
6620
6621 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6622
6623         PR middle-end/38459
6624         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6625         (param_index): Assert if parameter is not know after parameter
6626         detection.
6627         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6628         (find_scop_parameters): Mark, that we have finished parameter
6629         detection.
6630         (graphite_transform_loops): Move condition detection before parameter
6631         detection.
6632         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6633         * gfortran.dg/graphite/pr38459.f90: New.
6634
6635 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6636
6637         * graphite.c (graphite_transform_loops): Always call find_transform ()
6638         in ENABLE_CHECKING.  So we test these code paths, even if we do not
6639         generate code.
6640
6641 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6642
6643         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6644         (print_scop): Ditto.
6645
6646 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6647
6648         PR middle-end/38084
6649         Fix gfortran.dg/graphite/id-3.f90.
6650         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6651         regions more than once.
6652
6653 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6654
6655         Fix gfortran.dg/graphite/id-4.f90.
6656         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6657         when not needed.
6658
6659 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6660
6661         Fix gfortran.dg/graphite/id-1.f90.
6662         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6663         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6664         (max_precision_type): New.
6665         (value_clast): Removed.
6666         (clast_to_gcc_expression): Be more careful to types of expressions.
6667         Use max_precision_type and update use of gmp_cst_to_tree.
6668         (graphite_translate_clast_equation): Use max_precision_type.
6669         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6670         use the type of the condition.
6671         (graphite_create_new_loop): Do not use integer_type_node, use the
6672         max_precision_type of lb and ub.
6673
6674 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6675
6676         * graphite.c (build_scops_1): Initialize open_scop.exit
6677         and sinfo.last.
6678
6679 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6680
6681         * gcc.dg/graphite/pr38084.c: New.
6682         * gfortran.dg/graphite/id-1.f90: New.
6683         * gfortran.dg/graphite/id-2.f90: New.
6684         * gfortran.dg/graphite/id-3.f90: New.
6685         * gfortran.dg/graphite/id-4.f90: New.
6686         * gfortran.dg/graphite/pr37857.f90: New.
6687
6688 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6689             Jan Sjodin  <jan.sjodin@amd.com>
6690             Harsha Jagasia  <harsha.jagasia@amd.com>
6691
6692         PR middle-end/37852
6693         PR middle-end/37883
6694         PR middle-end/37928
6695         PR middle-end/37980
6696         PR middle-end/38038
6697         PR middle-end/38039
6698         PR middle-end/38073
6699         PR middle-end/38083
6700         PR middle-end/38125
6701
6702         * gcc.dg/graphite/pr38073.c: New.
6703         * gcc.dg/graphite/pr37928.c: New.
6704         * gcc.dg/graphite/pr37883.c: New.
6705         * gcc.dg/graphite/pr38125.c: New.
6706         * gfortran.dg/graphite/pr38083.f90: New.
6707         * gfortran.dg/graphite/pr37852.f90: New.
6708         * gfortran.dg/graphite/pr37980.f90: New.
6709
6710         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6711         the number of detected scops.  Copy exact same test for loop
6712         blocking...
6713         * gcc.dg/graphite/block-1.c: Fix the number of expected
6714         loops to be blocked as reductions are not handled.
6715         * gcc.dg/graphite/block-4.c: ...here.  New.
6716
6717         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6718         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6719         ...here.
6720         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6721         * Makefile.in (graphite.o): Depend on value-prof.h.
6722         (graphite.o-warn): Removed -Wno-error.
6723         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6724         to be a NULL pointer.  Call update_stmt.  Return the newly created
6725         cannonical induction variable.
6726
6727         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6728
6729         * graphite.c: Reimplement the code generation from graphite to gimple.
6730         Include value-prof.h.
6731         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6732         (get_old_iv_from_ssa_name): Removed.
6733         (graphite_stmt_p): New.
6734         (new_graphite_bb): Test for useful statements before building a
6735         graphite statement for the basic block.
6736         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6737         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6738         reason.
6739         (recompute_all_dominators, graphite_verify,
6740         nb_reductions_in_loop, graphite_loop_normal_form): New.
6741         (scop_record_loop): Call graphite_loop_normal_form.
6742         (build_scop_loop_nests): Iterate over all the blocks of the
6743         function instead of relying on the incomplete information from
6744         SCOP_BBS.  Return the success of the operation.
6745         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6746         (add_bb_domains): Removed.
6747         (build_loop_iteration_domains): Don't call add_bb_domains.
6748         Add the iteration domain only to the basic blocks that have been
6749         translated to graphite.
6750         (build_scop_conditions_1): Add constraints only if the basic
6751         block have been translated to graphite.
6752         (build_scop_data_accesses): Completely disabled until data
6753         dependence is correctly implemented.
6754         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6755         (remove_all_edges_1, remove_all_edges): Removed.
6756         (get_new_name_from_old_name): New.
6757         (graphite_rename_variables_in_stmt): Renamed
6758         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6759         Use replace_exp and update_stmt.
6760         (is_old_iv): Renamed is_iv.
6761         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6762         Use replace_exp and update_stmt.
6763         (expand_scalar_variables_expr): Same.  Use the map to get the
6764         new names for the renaming of induction variables and for the
6765         renaming of variables after a basic block has been copied.
6766         (expand_scalar_variables): Same.
6767         (graphite_rename_variables): Renamed rename_variables.
6768         (move_phi_nodes): Removed.
6769         (get_false_edge_from_guard_bb): New.
6770         (build_iv_mapping): Do not insert the induction variable of a
6771         loop in the renaming iv map if the basic block does not belong
6772         to that loop.
6773         (register_old_new_names, graphite_copy_stmts_from_block,
6774         copy_bb_and_scalar_dependences): New.
6775         (translate_clast): Heavily reimplemented: copy basic blocks,
6776         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6777         At each translation step call graphite_verify ensuring the
6778         consistency of the SSA, loops and dominators information.
6779         (collect_virtual_phis, find_vdef_for_var_in_bb,
6780         find_vdef_for_var_1, find_vdef_for_var,
6781         patch_phis_for_virtual_defs): Removed huge hack.
6782         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6783         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6784         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6785         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6786         if_region_get_condition_block, if_region_set_false_region,
6787         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6788         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6789         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6790         rewrite_into_sese_closed_ssa): New.
6791         (gloog): Remove dead code.  Early return if code cannot be
6792         generated.  Call cleanup_tree_cfg once the scop has been code
6793         generated.
6794         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6795         block loops with less than two loops.
6796         (graphite_apply_transformations): Remove the call to
6797         scop_remove_ignoreable_gbbs.
6798         (limit_scops): When build_scop_loop_nests fails, continue on
6799         the next scop.  Fix open_scop.entry.
6800         (graphite_transform_loops): Call recompute_all_dominators: force the
6801         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6802         Call initialize_original_copy_tables and free_original_copy_tables
6803         to be able to copy basic blocks during code generation.
6804         When build_scop_loop_nests fails, continue on next scop.
6805         (value_clast): New union.
6806         (clast_to_gcc_expression): Fix type cast warning.
6807
6808 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6809
6810         * Merge from mainline (r140838:141727).
6811
6812 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6813
6814         PR middle-end/37833
6815
6816         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6817
6818 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6819
6820         PR middle-end/37943
6821
6822         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6823         exits and conditions.
6824         * gcc.dg/graphite/pr37943.c: New.
6825
6826 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6827
6828         PR middle-end/37886
6829         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6830
6831 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6832
6833         * doc/invoke.texi: Fix spaces.
6834
6835 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6836
6837         PR tree-optimization/37891
6838         Reverted last commit.
6839         * graphite.c (create_single_entry_edge): Set
6840         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6841
6842 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6843             Mitul Thakkar  <mitul.thakkar@amd.com>
6844
6845         * graphite.c (create_single_entry_edge): Set
6846         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6847
6848 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6849
6850         * doc/invoke.texi: Add -fgraphite-identity.
6851         * graphite.c (graphite_apply_transformations): Check for
6852         -fgraphite-identity.
6853         * toplev.c (process_options): Add flag_graphite_identity.
6854         * tree-ssa-loop.c: Add flag_graphite_identity.
6855
6856 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6857
6858         Undo changes from 2008-10-02:
6859         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6860         operand type when copying the operand to a variable of different type.
6861         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6862         with the IV name after increment.
6863
6864 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6865             Harsha Jagasia  <harsha.jagasia@amd.com>
6866
6867         PR tree-optimization/37828
6868         * gcc.dg/graphite/pr37828.c: New.
6869         * graphite.c (graphite_trans_loop_block): Do not loop block
6870         single nested loops.
6871
6872 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6873             Sebastian Pop  <sebastian.pop@amd.com>
6874
6875         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6876         rename_map_elt_info, eq_rename_map_elts): New.
6877         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6878         (expand_scalar_variables_expr): Change parameters.
6879         (expand_scalar_variables_stmt): Same.
6880         (expand_scalar_variables): Same.
6881         (graphite_rename_ivs): Rename graphite_rename_variables.
6882         (build_iv_mapping): New.
6883         (translate_clast): Call build_iv_mapping.
6884         * graphite.h (gbb_p): New name.
6885
6886 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6887
6888         PR tree-optimization/37684
6889         * gcc.dg/graphite/pr37684.c: New.
6890         * graphite.c (exclude_component_ref): New.
6891         (is_simple_operand): Call exclude_component_ref.
6892
6893 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6894             Harsha Jagasia  <harsha.jagasia@amd.com>
6895
6896         PR tree-optimization/37485
6897         * gcc.dg/graphite/block-2.c: New
6898         * graphite.c (gmp_cst_to_tree): Moved.
6899         (iv_stack_entry_is_constant): New.
6900         (iv_stack_entry_is_iv): New.
6901         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6902         (loop_iv_stack_insert_constant): New.
6903         (loop_iv_stack_pop): Use new datatpype.
6904         (loop_iv_stack_get_iv): Same.
6905         (loop_iv_stack_get_iv_from_name): Same.
6906         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6907         (loop_iv_stack_patch_for_consts): New.
6908         (loop_iv_stack_remove_constants): New.
6909         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6910         (translate_clast): Call loop_iv_stack_patch_for_consts and
6911         loop_iv_stack_remove_constants.
6912         (gloog): Use new datatype.  Redirect construction edge to end
6913         block to avoid accidental deletion.
6914         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6915         iv stack entry.
6916         (union iv_stack_entry_data): New.  Data in iv stack entry.
6917         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6918
6919 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6920
6921         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6922         operand type when copying the operand to a variable of different type.
6923
6924 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6925
6926         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6927         with the IV name after increment.
6928
6929 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6930
6931         * Merge from mainline (r140164:140838).
6932
6933 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6934
6935         * graphite-data-ref.c: New.
6936         * graphite.c (print_scop): Also dump the dependence graph.
6937         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6938         (new_scop): Initialize SCOP_DEP_GRAPH.
6939         (build_scop_dynamic_schedules): New.
6940         (build_access_matrix_with_af): Fixed column numbering.
6941         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6942         * graphite.h: Add ifndef/define guards against multiple inclusion.
6943         (struct scop): Add dep_graph field.
6944         (SCOP_DEP_GRAPH): Defined.
6945         (ref_nb_loops): Fixed and moved to other position.
6946         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6947         (nb_loops_around_loop_in_scop): New.
6948         (graphite_dump_dependence_graph): Declared.
6949         (graphite_build_rdg_all_levels): Declared.
6950         (graphite_test_dependence): Declared.
6951         * Makefile.in (graphite-data-ref.o): New target.
6952
6953 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6954
6955         * Merge from mainline (139870:140164).
6956
6957 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6958
6959         * Merge from mainline (138275:139870).
6960         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6961         the commits from trunk broke the niter detection.
6962
6963 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6964
6965         * graphite.c: Add more documentation.  Fix formatting.
6966         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6967         loop_iv_stack_debug): Moved...
6968         (schedule_to_scattering): Move before use.
6969         (dot_all_scops): Include in "#if 0" the code for system
6970         call dotty.
6971
6972         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6973         loop_iv_stack_debug): ...here.
6974
6975 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6976
6977         * tree-phinodes.c (make_phi_node): Extern.
6978         (add_phi_node_to_bb): New.
6979         (create_phi_node): Call add_phi_node_to_bb.
6980         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6981         (remove_statement): Handle case where stored phi was updated
6982         and is no longer the same.
6983         * graphite.c (is_parameter): New.
6984         (is_old_iv): New.
6985         (expand_scalar_variables_expr): New.
6986         (expand_scalar_variables_stmt): New.
6987         (expand_scalar_variables): New.
6988         (move_phi_nodes): Create new phi instead of moving old one.
6989         (translate_clast): Call expand_scalar_variables.
6990         (find_vdef_for_var_in_bb): Also scan regular definitions.
6991         (skip_phi_defs): New.
6992         (collect_scop_exit_phi_args): New.
6993         (patch_scop_exit_phi_args): New.
6994         (gloog): Patch phis after scop.
6995         * tree-flow.h: (add_phi_node_to_bb): Declared.
6996         (make_phi_node): Declared.
6997
6998 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6999
7000         * graphite.c (end_scop): Split the entry of the scop when it
7001         is the header of the loop in which the scop is ending.
7002         (build_scops_1, limit_scops): Update uses of end_scop.
7003
7004 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
7005
7006         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
7007         SCOP_ENTRY or SCOP_EXIT.
7008
7009 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7010
7011         * graphite.c (get_construction_edge): Removed.
7012         (gloog): Construction edge is the scop entry edge.
7013
7014 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7015
7016         * graphite.c (can_generate_for_scop): Removed.
7017         (gloog): Do not call it.
7018
7019 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7020
7021         * graphite.c (new_scop): Entry of a scop is an edge.
7022         Initialize SESE region.
7023         (free_scop): Free SESE region.
7024         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
7025         (split_difficult_bb): New, split from end_scop.
7026         (end_scop): Exit of a scop is an edge.
7027         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
7028         not automatically updated and thus is always wrong.
7029         * graphite.h (struct sese): New.
7030         (SESE_ENTRY): New.
7031         (SESE_EXIT): New.
7032         (struct scop): New field for a SESE region.  Remove entry, exit.
7033         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
7034         semantics as before.  Moved comment around.
7035
7036 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
7037             Sebastian Pop  <sebastian.pop@amd.com>
7038
7039         * graphite.c (graphite_transform_loops): Always enable gloog
7040         and find_transform when ENABLE_CHECKING.
7041
7042 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7043
7044         * graphite.c (graphite_transform_loops): Move pretty printer
7045         of SCOPs before doing any transform.  Remove call to print_scops
7046         and dot_all_scops_1.
7047
7048 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7049
7050         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
7051         (print_graphite_bb): Same.
7052
7053 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7054
7055         * graphite.c (dot_all_scops_1): Cleanup.
7056         (move_scops): Fix comment.
7057
7058 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
7059
7060         * graphite.c (build_scop_bbs): Revert commit 139355:
7061
7062         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7063                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7064
7065                 * graphite.c (build_scop_bbs): Factor up code.
7066
7067 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
7068
7069         * graphite.c (gloog): Update dominator info.
7070
7071 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
7072
7073         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
7074
7075 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7076
7077         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
7078         initialization.
7079         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
7080         (translate_clast): Correct formatting.
7081         * graphite.h (struct num_map): Removed.
7082         (struct graphite_bb): Remove num_map field.
7083         (GBB_INDEX_TO_NUM_MAP): Removed.
7084
7085 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7086
7087         * graphite.c (build_access_matrix_with_af): Fix comments.
7088         (build_scop_data_accesses): Same.
7089
7090 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7091
7092         * graphite.c (build_scop_data_accesses): Don't construct
7093         access matrices.  Add a FIXME and an assert condition that
7094         should pass when the access matrices will be needed.
7095
7096 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
7097
7098         * tree-data-ref.c (stmt_simple_memref_p): Don't call
7099         really_constant_p.
7100         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
7101         Moved close by free_graphite_bb.
7102         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
7103         (new_scop): Move close by free_scop.
7104         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
7105
7106 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
7107
7108         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
7109         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
7110         instead of recursive call.
7111         (graphite_translate_clast_equation): New.
7112         (graphite_create_guard_cond_expr): New.
7113         (graphite_create_new_guard): New.
7114         (get_stack_index_from_iv): Removed.
7115         (graphite_rename_ivs_stmt): Use gbb_loop_index.
7116         (get_true_edge_from_guard_bb): New.
7117         (translate_clast): Handle stmt_guard in clast.
7118         (get_construction_edge): Allow construction edge detection for
7119         a scope entry with multiple predecessors if one predecessor is
7120         the immediate dominator of scope entry.
7121         (can_generate_code_stmt): Enable code generation for clast_guard.
7122         (gloog): Use correct context loop.  Removed check for post dominators.
7123         * cfgloop.h (create_empty_if_region_on_edge): Declared.
7124
7125 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7126
7127         * graphite.c (remove_dead_loops): Document better which
7128         loops are removed.
7129
7130 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7131
7132         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
7133         and PPLINC.
7134         (graphite.o): Also depends on pointer-set.h.
7135
7136 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7137
7138         * graphite.c (scop_record_loop): Fix compile warning.
7139
7140 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
7141             Sebastian Pop  <sebastian.pop@amd.com>
7142
7143         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
7144
7145 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
7146
7147         * graphite.c (build_graphite_bb): Initialize bb->aux to
7148         point to the graphite_bb_p.
7149         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
7150         content of bb->aux.
7151         (add_bb_domains): Does not use the scop parameter.
7152         (graphite_transform_loops): Clean bb->aux at the end.
7153
7154 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7155             Sebastian Pop  <sebastian.pop@amd.com>
7156
7157         * lib/target-supports.exp
7158         (check_effective_target_fgraphite): New.
7159
7160         * gcc.dg/graphite/graphite.exp: Early exit when
7161         check_effective_target_fgraphite returns false.
7162         Set dg-do-what-default to compile.
7163         (scan-graphite-dump-times): Removed.
7164         * gfortran.dg/graphite/graphite.exp: Same.
7165
7166         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
7167         Use scan-tree-dump-times instead of scan-graphite-dump-times.
7168         * gcc.dg/graphite/scop-1.c: Same.
7169         * gcc.dg/graphite/scop-2.c: Same.
7170         * gcc.dg/graphite/scop-3.c: Same.
7171         * gcc.dg/graphite/scop-4.c: Same.
7172         * gcc.dg/graphite/scop-5.c: Same.
7173         * gcc.dg/graphite/scop-6.c: Same.
7174         * gcc.dg/graphite/scop-7.c: Same.
7175         * gcc.dg/graphite/scop-8.c: Same.
7176         * gcc.dg/graphite/scop-9.c: Same.
7177         * gcc.dg/graphite/scop-10.c: Same.
7178         * gcc.dg/graphite/scop-11.c: Same.
7179         * gcc.dg/graphite/scop-12.c: Same.
7180         * gcc.dg/graphite/scop-13.c: Same.
7181         * gcc.dg/graphite/scop-matmult.c: Same.
7182         * gcc.dg/graphite/scop-14.c: Same.
7183         * gcc.dg/graphite/scop-15.c: Same.
7184         * gcc.dg/graphite/block-0.c: Same.
7185         * gcc.dg/graphite/scop-16.c: Same.
7186         * gcc.dg/graphite/block-1.c: Same.
7187         * gcc.dg/graphite/scop-17.c: Same.
7188         * gcc.dg/graphite/scop-18.c: Same.
7189         * gfortran.dg/graphite/block-1.f90: Same.
7190         * gfortran.dg/graphite/scop-1.f: Same.
7191         * gfortran.dg/graphite/block-2.f: Same.
7192
7193 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7194
7195         * graphite.c: Fix some XXX comments.
7196         (build_scop_dynamic_schedules): Removed.
7197
7198 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7199
7200         * graphite.h (scop_max_loop_depth): Moved...
7201         * graphite.c (scop_max_loop_depth): ...here.
7202         (remove_all_edges_1): New.
7203         (remove_all_edges): Factored code.
7204         (remove_cond_exprs): Check only the last statement for
7205         a GIMPLE_COND expression.
7206
7207 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7208
7209         * graphite.c (scan_tree_for_params): Early return when the
7210         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
7211         (find_scop_parameters): Factor out code.
7212         (graphite_trans_bb_strip_mine): Remove dead code.
7213
7214 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7215
7216         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
7217         graphite_trans_bb_move_loop): Factor asserts.
7218         (gloog): Perform sanity checks only for ENABLE_CHECKING.
7219         Do not call calculate_dominance_info and estimate_bb_frequencies.
7220
7221 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
7222
7223         * graphite.c (create_loops_mapping, free_loops_mapping,
7224         create_loops_mapping_num, debug_loop_mapping_1,
7225         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
7226         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
7227         graphite_loops_mapping_add_child_num,
7228         graphite_loops_mapping_insert_child,
7229         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
7230         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
7231         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
7232         create_num_from_index, get_num_from_index,
7233         swap_loop_mapped_depth): Removed.
7234         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
7235         (free_scop): Do not call free_loops_mapping.
7236         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
7237         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
7238         get_loop_mapped_depth.
7239         (graphite_trans_bb_move_loop): Do not update the loop mapping.
7240         (graphite_trans_bb_strip_mine): Same.
7241         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
7242         (struct scop): Remove field loops_mapping.
7243
7244 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7245             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7246
7247         * graphite.c (scop_record_loop): Factor out one level of the
7248         condition by early return.
7249         (build_scop_loop_nests): Format following FSF coding style.
7250         (build_scop_dynamic_schedules): Factor out code.
7251         (scopdet_bb_info): Reindent.  Default case should not be reachable.
7252
7253 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7254             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7255
7256         * graphite.c (loop_affine_expr): Check for DECL_P or struct
7257         assignments that are not handled as simple operands for now.
7258
7259 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7260             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7261
7262         * graphite.c (build_scop_bbs): Factor up code.
7263
7264 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7265             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7266
7267         * graphite.c (stmt_simple_for_scop_p): Factor code out
7268         of the loop.
7269         (enum gbb_type): New.  Group all the GBB_* types under it.
7270         (is_loop_exit): Moved...
7271         (end_scop): Enable BB spliting.
7272         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
7273         * cfgloop.h (is_loop_exit): Declared.
7274
7275 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7276
7277         * doc/invoke.texi: Remove strides from examples containing
7278         DO loops when the strides are equal to 1.
7279
7280 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
7281             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7282
7283         * graphite.c (graphite_trans_scop_block): Or the result with
7284         the result from graphite_trans_loop_block.
7285         * gcc.dg/graphite/block-1.c: New.
7286         * gfortran.dg/graphite/block-1.f90: New.
7287         * gfortran.dg/graphite/block-2.f: New.
7288
7289 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7290
7291         * graphite.c (graphite_transform_loops): Call cloog_initialize
7292         and cloog_finalize.
7293
7294 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7295
7296         * tree-data-ref.c) (stmt_simple_memref_p): New.
7297         * tree-data-ref.h (stmt_simple_memref_p): Declared.
7298         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
7299         (is_simple_operand): Call stmt_simple_memref_p.
7300
7301         * gcc.dg/graphite/scop-matmult.c: Updated for not
7302         using pointer arithmetic, as this is optimized by PRE and
7303         makes the code too difficult to analyze.
7304
7305         * gcc.dg/graphite/scop-18.c: Same.
7306
7307 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
7308
7309         * gdbinit.in (pgg): New.
7310
7311 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7312
7313         * graphite.c (graphite_trans_loop_block): Fix warning.
7314
7315 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7316
7317         * graphite.c (graphite_trans_loop_block): Fix my merge error.
7318
7319 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7320
7321         * graphite.c (graphite_trans_bb_block): Remove check for
7322         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
7323         Check if loop blocking is profitable for every loop, before applying
7324         the changes.
7325         (graphite_apply_transformations): Call graphite_trans_bb_block only,
7326         if flag_loop_block is set.
7327
7328 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7329
7330         * graphite.c: Add some more documentation for the loop
7331         mapping.
7332
7333 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7334
7335         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
7336         * graphite.c: Format on less than 80 columns.
7337         * graphite.h: Same.
7338
7339 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7340
7341         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
7342
7343 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
7344
7345         * doc/invoke.texi (floop-block, floop-strip-mine,
7346         floop-interchange): Update documentation with examples.
7347
7348 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
7349
7350         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
7351         add_referenced_var.
7352         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
7353
7354 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
7355
7356         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
7357         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
7358         * tree-scalar-evolution.c: Revert useless changes.
7359         * tree-phinodes.c: Same.
7360         * cfghooks.c: Same.
7361         * vec.h: Same.
7362         * tree-vectorizer.h: Same.
7363         * tree-flow.h: Same.
7364         * tree-cfg.c: Same.
7365         * common.opt (fgraphite): Update documentation.
7366
7367 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
7368
7369         * doc/invoke.texi (-floop-block, -floop-strip-mine,
7370         -floop-interchange): Add more text for explaining what each of these
7371         flags is doing.
7372         * tree-into-ssa.c (gimple_vec): Moved to...
7373         * graphite.c: Include gimple.h.
7374         (gimple_vec): Moved to...
7375         (del_loop_to_cloog_loop): Removed.
7376         (loop_affine_expr): Do not call create_data_ref when the
7377         operand is a constant.
7378         (new_scop): Use free instead of del_loop_to_cloog_loop.
7379         * Makefile.in (graphite.o): Depend on GIMPLE_H.
7380         * gimple.h (gimple_vec): ... here.
7381
7382 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7383
7384         * graphite.c (scopdet_bb_info): Only allow loops with known number of
7385         latch executions.
7386         (build_loop_iteration_domains): Fail, if latch executions unknown.
7387
7388 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7389
7390         * graphite.c (add_conditions_to_domain): New.
7391         (build_scop_conditions_1): Call add_conditions_to_domain.
7392         (set_cloog_options): Allow to disable optimizations.
7393
7394 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7395
7396         * graphite.c (find_params_in_bb): Look for parameters in conditions.
7397         Do not use walk_dominator_tree.
7398         (find_scop_parameters): Do not use walk_dominator_tree.
7399
7400 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7401
7402         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
7403         (idx_record_params): Adapt.
7404         * graphite.h (scop_gimple_loop_depth): New.
7405
7406 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7407
7408         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
7409         (scan_tree_for_params): Remove value_init.
7410         (build_scop_context): Remove value_init.
7411         (build_loop_iteration_domains): Remove value_init.
7412         (schedule_to_scattering): Remove value_init.
7413         (graphite_trans_bb_strip_mine): Remove value_init.
7414
7415 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7416
7417         * gcc/graphite.c (limit_scops): New.
7418         (graphite_transform_loops): Add limit SCoPs.
7419         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
7420         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
7421         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
7422         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
7423         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
7424         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
7425         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
7426         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
7427         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
7428         Change loop numbers.
7429         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
7430         Change loop numbers.
7431         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
7432         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
7433         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
7434         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
7435         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
7436         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
7437         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
7438         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
7439         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
7440         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
7441
7442 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7443
7444         * graphite.c (graphite_transform_loops): Call always find_transform.
7445
7446 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
7447
7448         * graphite.c (free_loops_mapping): New.
7449         (stmt_simple_for_scop_p): Fix typo.
7450         (stmt_simple_for_scop_p): Fix tuples functions, that
7451         broke polyhedron.
7452         (free_graphite_bb): Fix some memleaks.
7453         (free_scop): Fix some memleaks.
7454         (scopdet_bb_info): Do not forget some tmp SCoPs.
7455         (find_params_in_bb): Fix some memleaks.
7456         (clast_to_gcc_expression): Fix warning.
7457
7458 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7459
7460         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
7461         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
7462
7463 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7464
7465         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
7466         Move code ifdef-ed HAVE_cloog...
7467         * graphite.c: Include toplev.h.
7468         ... here.
7469         * Makefile.in (OBJS-common): Always build graphite.o.
7470         (BACKEND): Remove @GRAPHITE@.
7471         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
7472         (graphite.o): Depend on TOPLEV_H.
7473
7474 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
7475
7476         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
7477         Remove typo left from polylib to ppl conversion.
7478         * graphite.c (graphite_transforms): Use sorry instead of fatal.
7479
7480 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7481
7482         * toplev.c (process_options): Move the graphite loop optimization
7483         flags...
7484         * tree-ssa-loop.c (graphite_transforms): ... here.
7485         When not configured with CLooG, print to dump_file that
7486         Graphite transforms were not performed.
7487         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
7488         New.
7489         * gcc.dg/graphite/*.c: Updated all testcases to use
7490         scan-graphite-dump-times.
7491
7492 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
7493
7494         * graphite.c (dot_scop, dot_all_scops): Do not call system.
7495         Do not open /tmp/scop.dot and /tmp/allscops.dot.
7496
7497 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
7498             Jan Sjodin  <jan.sjodin@amd.com>
7499
7500         * configure: Regenerated.
7501         * omp-low.c (expand_omp_sections): Remove now unused code.
7502         * config.in (HAVE_polylib): Removed.
7503         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
7504         (PPLLIBS, PPLINC): Added.
7505         * graphite.c: Replace unsigned with int wherever possible.
7506         Don't access Cloog's data structures, but use accessor functions.
7507         Clast's stmt->type is now implemented as a vtable: change the
7508         switches of stmt->type into ifs.
7509         (polylib/polylibgmp.h): Don't include.
7510         (initialize_dependence_polyhedron,
7511         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7512         statement_precedes_p, test_dependence, build_rdg_all_levels,
7513         dump_dependence_graph): Removed until this code is cleaned up
7514         or ported to Cloog.
7515         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
7516         (POLYLIBINC): Renamed PPLINC.
7517
7518 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
7519             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7520             Jan Sjodin  <jan.sjodin@amd.com>
7521
7522         Finish the merge and tuplification of graphite.
7523
7524 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7525             Jan Sjodin  <jan.sjodin@amd.com>
7526
7527         Partial merge from mainline (138072:138275).
7528         * graphite.c still has to be tuplified.
7529
7530 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
7531
7532         * graphite.c (graphite_loops_mapping_max_loop_num): New.
7533         (create_num_from_index): New.
7534         (get_num_from_index): Also pass in the graphite BB.
7535         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
7536         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
7537         (graphite_trans_bb_strip_mine): Call create_num_from_index.
7538         (is_interchange_valid): Return false when failing.
7539         * graphite.h (struct num_map): New.
7540         (struct graphite_bb): New field num_map.
7541         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
7542
7543 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7544
7545         * graphite.c (dump_gbb_conditions): Print also conditions like
7546         "if (a)".  Remove dublicated code and use print_generic_expr ().
7547         (stmt_simple_for_scop_p): Only allow conditions we can handle
7548         {<, <=, >, >=}.
7549
7550 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7551
7552         * graphite.h (struct scop): Removed new_ivs field.
7553         (SCOP_NEWIVS): Deleted.
7554         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7555         clast_to_gcc_expression, graphite_create_new_loop):
7556         Removed use of new_ivs.
7557
7558 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7559
7560         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7561         create_loops_mapping_num, debug_loop_mapping_1): New.
7562         (debug_loop_mapping): Call debug_loop_mapping_1.
7563         (get_loop_mapping_for_num,
7564         graphite_loops_mapping_add_child,
7565         graphite_loops_mapping_add_child_num,
7566         graphite_loops_mapping_insert_child,
7567         graphite_loops_mapping_parent,
7568         split_loop_mapped_depth_for_num,
7569         loop_mapped_depth_split_loop): New.
7570         (increment_loop_mapped_depths): Removed.
7571         (swap_loop_mapped_depth_for_num): Reimplemented.
7572         (new_scop): Call create_loops_mapping.
7573         (scop_record_loop): Call graphite_loops_mapping_insert_child.
7574         (translate_clast): Pass the old loop father in parameter, and pass
7575         it to get_old_iv_from_ssa_name.
7576         (remove_edges_around_useless_blocks, can_generate_code_stmt,
7577         can_generate_code, can_generate_for_scop): New.
7578         (graphite_trans_bb_block): Returns false when it fails to transform.
7579         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7580
7581 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7582
7583         Reverted all the changes related to the streamization and
7584         loop fusion.
7585         These changes are now tracked in the streamization branch.
7586
7587 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7588             Jan Sjodin  <jan.sjodin@amd.com>
7589
7590         * graphite.c (gbb_compare): Correctly constify.
7591         (gbb_can_be_ignored): Indent.
7592         (graphite_trans_scop_swap_1and2): Add legality check.
7593         Remove dead FIXMEs.
7594
7595 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7596
7597         Remove fallouts from "Reverted the Condate changes".
7598         * tree.h: Remove unused decl.
7599         * gcc.dg/tree-checker: Same.
7600         * timevar.def: Remove counter.
7601
7602 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7603
7604         * Merge from mainline (135673:138072).
7605
7606         Reverted the MIRO changes (from 2008-04-05) that are now
7607         tracked in the miro branch.
7608         * tree-bounds.c: Removed.
7609         * tree-bounds.h: Removed.
7610
7611         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7612         are now tracked in the condate branch.
7613         * tree-check.c: Removed.
7614         * tree-match.c: Removed.
7615         * condate.y: Removed.
7616
7617 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7618
7619         * common.opt: New user flag -floop-block, -floop-strip-mine
7620         and -floop-interchange.
7621         * toplev.c (process_options): Enable -fgraphite pass if any one of the
7622         graphite loop optimization flags is turned on.
7623         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7624         flag_loop_strip_mine and flag_loop_interchange checks before
7625         optimizations.
7626         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7627         -floop-strip-mine and -floop-interchange.
7628         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7629         -fgraphite.
7630         * gcc.dg/graphite/scop-16.c: Ditto.
7631         * gcc.dg/graphite/scop-17.c: Ditto.
7632         * gcc.dg/graphite/scop-18.c: Ditto.
7633
7634 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
7635             Sebastian Pop  <sebastian.pop@amd.com>
7636
7637         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7638         (create_empty_loop_on_edge): More fixes.
7639         * tree-phinodes.c (resize_phi_node): Extern.
7640         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7641         * cfghooks.c (update_dominator_information): New split from
7642         split_edge.
7643         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7644         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7645         successor of the function entry block.
7646
7647         * graphite.c: Include pointer-set.h.
7648         (debug_loop_mapping, increment_loop_mapped_depths,
7649         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7650         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7651         swap_loop_mapped_depth_for_num, get_num_from_index,
7652         swap_loop_mapped_depth, loop_iv_stack_debug,
7653         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7654         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7655         get_old_iv_from_ssa_name): New.
7656         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7657         (free_scop): Free SCOP_LOOPS_MAPPING.
7658         (scop_record_loop): Record old ivs.
7659         (create_var_name): Removed.
7660         (initialize_cloog_names): Allocate double space in case strip mine
7661         applies to all loops once.
7662         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7663         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7664         translation.
7665         (graphite_create_new_loop): Pass in ivstack.
7666         (remove_all_edges): Pass in the construction_edge.
7667         (graphite_remove_iv): Removed.
7668         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7669         remove_cond_exprs): Rewritten.
7670         (move_phi_nodes): New.
7671         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7672         (translate_clast): Pass in ivstack.  Rewrite some cases.
7673         (set_cloog_options, debug_clast_stmt): New.
7674         (find_transform): Use set_cloog_options.
7675         (outermost_loop_layer): Removed.
7676         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7677         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7678         mark_old_loops, remove_dead_loops): New.
7679         (gloog): Rewritten.
7680         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7681         (const_column_index, get_first_matching_sign_row_index,
7682         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7683         get_upper_bound): New.
7684         (graphite_trans_bb_strip_mine): Also update the iv map.
7685
7686         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7687         (struct name_tree): Add a loop field.
7688         (struct scop): Add a graphite_loops_mapping field.
7689         (SCOP_LOOPS_MAPPING): New.
7690         (debug_clast_stmt): Declare.
7691         * lambda.h (find_induction_var_from_exit_cond): Declare.
7692         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7693         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7694         (create_empty_loop_on_edge): Updated.
7695         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7696         rename_variables_in_bb): Declare.
7697         * tree-cfg.c (remove_bb): Extern.
7698
7699         * gcc.dg/graphite/block-0.c: New.
7700
7701 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7702             Sebastian Pop  <sebastian.pop@amd.com>
7703
7704         * graphite.c (strip_mine_profitable_p): New.
7705         (graphite_trans_bb_block): Disable strip mining if not profitable.
7706
7707         * gcc.dg/graphite/scop-18.c: New.
7708         * gcc.dg/graphite/scop-17.c: Fixed.
7709         * gcc.dg/graphite/scop-16.c: Fixed.
7710
7711 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7712             Jan Sjodin  <jan.sjodin@amd.com>
7713             Sebastian Pop  <sebastian.pop@amd.com>
7714
7715         * graphite.c (is_interchange_valid): New.
7716         (graphite_trans_bb_block): Check loop nest of basic block for legality
7717         of interchange.
7718
7719         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7720         outer_most_loop, gbb_outer_most_loop_index): New.
7721
7722         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7723         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7724         * gcc.dg/graphite/scop-16.c: New.
7725         * gcc.dg/graphite/scop-17.c: New.
7726
7727 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7728
7729         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7730         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7731
7732 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7733
7734         * graphite.c (new_scop): Initialize SCOP_EXIT.
7735         (scopdet_info): Add.
7736         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7737         (build_scops_1): Cleanup, bugfixes.
7738         (build_scops): Cleanup.
7739
7740         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7741         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7742
7743 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7744
7745         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7746
7747         * gfortran.dg/graphite/graphite.exp: Use
7748         DEFAULT_GRAPHITE_FLAGS.
7749
7750         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7751
7752 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7753
7754         * graphite.c (scan_tree_for_params): Do not assert any more if
7755         MULT_EXPR parameter is negative.
7756
7757         * gfortran.dg/graphite/scop-1.f: New.
7758
7759         * gfortran.dg/graphite/graphite.exp: New.
7760
7761         * gcc.dg/graphite/scop-15.c: New.
7762
7763 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7764
7765         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7766
7767 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7768
7769         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7770         graphite_swap_loops.
7771         (graphite_trans_bb_move_loop): New.
7772         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7773         (graphite_trans_bb_block): New.
7774         (graphite_trans_loop_block): New.
7775         (graphite_trans_scop_swap_1and2): Rename from
7776         graphite_trans_swap_1and2.
7777         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7778         (graphite_trans_scop_block): New.
7779         (graphite_apply_transformations): Rename from
7780         graphite_transformations.
7781
7782         * gcc.dg/graphite/scop-matmult.c: New.
7783
7784 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7785
7786         * graphite.c (gbb_compare): New.
7787         (graphite_sort_gbbs): New.
7788         (gbb_can_be_ignored): New.
7789         (scop_remove_ignoreable_gbbs): New.
7790         (graphite_transformations): Cleanup and add
7791         scop_remove_ignoreable_gbbs.
7792         * lambda.h (lambda_vector_compare): New.
7793
7794 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7795
7796         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7797         (graphite_swap_loops): int -> unsigned
7798         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7799         (graphite_transformations): New.
7800         (graphite_transform_loops): Move to graphite_transformations.
7801         * graphite.h (gbb_nb_loops): Return unsigned.
7802
7803 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7804
7805         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7806         the domain matrix.  This makes scop-0.c work again.
7807
7808 2008-06-20  Richard Guenther  <rguenther@suse.de>
7809
7810         * graphite.h: Adjust copyright to GPLv3.
7811         * graphite.c: Likewise.
7812         (stmt_simple_memref_for_scop_p): Split out from ...
7813         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7814         and simplify.
7815         (get_bb_type): Optimize.
7816         (is_pred): Remove.
7817         (is_bb_addable): Fix memleak, replace is_pred call with
7818         single_pred.
7819         (build_scops): Use current_loops.
7820         (param_index): Fix memleak.
7821
7822 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7823
7824         * graphite.c: Fix formatting.
7825
7826 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7827
7828         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7829         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7830         (create_var_name, save_var_name): Newly defined functions.
7831         (initialize_cloog_names): Part of the code factored out to
7832         save_var_name.
7833         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7834         in clast_reduction statement.
7835         (graphite_create_new_loop): Now takes a new parameter
7836         for outer_loop.
7837         (translate_clast): Now also takes the context_loop and bb_exit
7838         parameters. Rewritten the code so that it creates a gimple code
7839         inside the given context.
7840         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7841         remove_cond_expr, disconnect_cond_expr,
7842         disconnect_virtual_phi_nodes): Newly defined functions.
7843         * graphite.h (struct scop): added old_ivs vector.
7844         SCOP_OLDIVS: New macro.
7845
7846 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7847
7848         * cfgloopmanip.c: Add missing function comments, fix formatting.
7849
7850 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7851
7852         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7853         (create_empty_loop_on_edge): Defined.
7854         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7855         instead of void.
7856         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7857         (update_dominators_in_loop): Declared as extern
7858         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7859
7860 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7861
7862         * graphite.c (print_graphite_bb): Allow changing number of loops
7863         in SCoP domain.
7864         (initialize_cloog_names): Allow changing number of loops.
7865         (build_cloog_prog): Simplify.
7866         (find_transform): Enable cloog option --strides.
7867         (graphite_swap_loops): New.
7868         (graphite_strip_mine_loop): New.
7869         (graphite_trans_swap_1and2): New.
7870         (graphite_trans_strip): New.
7871         (graphite_transform_loops): Add graphite_trans_strip.
7872         * graphite.h (scop_max_loop_depth): New.
7873
7874 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7875
7876         * graphite.c (build_scop_iteration_domain): Remove forgotten
7877         line. (Fixes compile)
7878
7879 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7880
7881         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7882         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7883         (build_bb_loops): New.
7884         (graphite_transform_loops): Add build_bb_loops.
7885         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7886         numbers.
7887         * graphite.h (graphite_bb): Add loops.
7888         (gbb_nb_loops): New.
7889         (gbb_loop_at_index): New.
7890         (gbb_loop_index): New.
7891         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7892         using nb_params_in_scop.
7893
7894 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7895
7896         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7897         (build_scop_canonical_schedules): Build minimized schedule.
7898         (schedule_to_scattering): Adapt to minimized schedule.
7899         * graphite.h (graphite_bb): Add/Update descriptions.
7900
7901 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7902             Tobias Grosser  <grosser@fim.uni-passau.de>
7903
7904         * graphite.c (print_graphite_bb): Add condition printing.
7905         (dump_value): New.
7906         (dump_gbb_conditions): New.
7907         (build_scop_conditions_1): New.
7908         (build_scop_conditions): New.
7909         * graphite.h (graphite_bb): Add conditions.
7910
7911 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7912
7913         * graphite.c (print_graphite_bb):
7914         (free_graphite_bb): New.
7915         (free_scop): Free bbs.
7916         (get_bb_type): Free doms.
7917         (build_scop_context): Free context matrix.
7918         (build_loop_iteration_domains): Remove unused code.
7919         (build_cloog_prog): Free scattering function and blocklist.
7920         (find_transform): Free options.
7921
7922 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7923
7924         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7925         Remove unnecessery cloog data structures. Make a copy of the domain
7926         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7927         unnecessary cloog data structures. Fix memory leaks. Remove insert
7928         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7929         used.
7930         (build_scop_iteration_domain): Remove unnecessary cloog
7931         data structures.  Fix memory leaks.
7932         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7933         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7934
7935 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7936
7937         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7938
7939 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7940
7941         * graphite.c (end_scop): Style fix.
7942         (schedule_to_scattering): Style and comment fix.
7943
7944 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7945         * graphite.c (print_graphite_bb): Fix definiton of
7946         schedule_to_scattering.
7947         (initialize_cloog_names): Change nb_scattdims to max loop
7948         depth in SCoP.
7949         (schedule_to_scattering): Take parameter for number of scattering
7950         dimensions.
7951         (build_cloog_prog): Only build as much scattering dimensions as
7952         necessary.
7953
7954 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7955
7956         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7957         in polyhedron/aermod.f90.
7958
7959 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7960             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7961             Harsha Jagasia  <harsha.jagasia@amd.com>
7962
7963         * graphite.c (is_bb_addable): Fix segfault.
7964
7965 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7966
7967         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7968         with multiple exits and conditional handling in edge cases.
7969         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7970
7971         * gcc.dg/graphite/scop-14.c: New.
7972
7973 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7974             Adrien Eliche  <aeliche@isty.uvsq.fr>
7975
7976         * graphite.c (is_bb_addable): Add more comments and enhance
7977         readablity of the source code. Fix memory leak.
7978         (is_loop_exit): Fix memory leak.
7979
7980 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7981
7982         * graphite.c (first_loop_in_scop): Deleted.
7983         (setup_cloog_loop): Only walk the loop chain for inner loops.
7984         (build_scop_iteration_domain): Execute setup_cloog_loop for
7985         all loops in the first layer.
7986
7987 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7988
7989         * graphite.c (scan_tree_for_params): Change the way params are
7990         added to be indepenent of the number of loops.
7991         (setup_cloog_loop): Revert to short matrix format. Fix parameter
7992         handling.
7993         (build_cloog_prog): Revert to short matrix format.
7994
7995 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7996             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7997
7998         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7999         warning.
8000
8001 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
8002
8003         * graphite.c (nb_data_refs_in_scop): New.
8004         (graphite_transform_loops): Print more stats: number of
8005         loops, basic blocks and data references per scop.
8006
8007 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
8008             Jan Sjodin  <jan.sjodin@amd.com>
8009
8010         * graphite.c (loop_affine_expr, idx_record_params,
8011         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
8012         instead of instantiate_parameters.
8013
8014 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
8015
8016         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
8017         add support for parameters, add STATIC_SCHEDULE at the right places,
8018         cleanup.
8019
8020 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
8021
8022         * graphite.c (build_scop_loop_nests): Only add the loops, that
8023         are contained completely in the SCoP.
8024         (build_cloog_prog): Disable scattering, until schedule_to_scattering
8025         and the domains are fixed.
8026         (build_scop_canonical_schedules): Add support for bbs not contained
8027         in any SCoP.
8028
8029 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
8030
8031         * graphite.h (scop_contains_loop): Update comments to match
8032         the actual behavior.
8033         (scop_contains_loop): New.
8034         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
8035
8036 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
8037
8038         * graphite.c (get_bb_type): On function body, i.e. loop_0,
8039         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
8040         as GBB_COND_HEADER.
8041
8042 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
8043             Tobias Grosser  <grosser@fim.uni-passau.de>
8044
8045         * graphite.c (graphite_transform_loops): Early return when
8046         there are no loops in the function.
8047
8048 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8049             Jan Sjodin  <jan.sjodin@amd.com>
8050
8051         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
8052         offset of the last loop.
8053         (setup_cloog_loop): Copy the entire outer constraint matrix.
8054
8055 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8056             Jan Sjodin  <jan.sjodin@amd.com>
8057
8058         * graphite.c (stmt_in_scop_p, function_parameter_p,
8059         invariant_in_scop_p): Removed.
8060         (scan_tree_for_params): Can be used with no constraint
8061         matrix for gathering parameters.
8062         (idx_record_params): Don't use idx_record_param, instead use
8063         scan_tree_for_params.
8064         (find_scop_parameters): Same.
8065         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
8066         Fix the size of loop domains.
8067         (schedule_to_scattering): Exit when the outer loop is not in scop.
8068         (find_transform): Enable build_cloog_prog.
8069
8070 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8071             Jan Sjodin  <jan.sjodin@amd.com>
8072
8073         * graphite.c (schedule_to_scattering): Make scattering domains
8074         uniformly of the same size, as required by CLooG 0.14.0 and before.
8075
8076 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
8077             Jan Sjodin  <jan.sjodin@amd.com>
8078
8079         * graphite.c (schedule_to_scattering): Rewrite, correct the
8080         translation of the scheduling function to scattering.
8081         (build_cloog_prog): Call schedule_to_scattering only once.
8082         * graphite.h (scop_loop_index): Do not fail for loops not
8083         in the scop: return -1.
8084
8085 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
8086
8087         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
8088         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
8089         (setup_cloog_loop): Export GBB_DOMAIN.
8090         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
8091         able to rebuild the original control flow.
8092         * graphite.h (graphite_bb): Add domain field and access macro.
8093         (GBB_DOMAIN): New.
8094
8095 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
8096
8097         * graphite.c (debug_gbb): New.
8098         (print_scop, build_graphite_bb): Use SCOP_BBS.
8099         (build_scop_bbs): Reimplemented.
8100         (dfs_bb_in_scop_p): Removed.
8101         (build_scop_loop_nests): Reorder loops inserted in
8102         SCOP_LOOP_NEST: outer loops should come first.
8103         (build_scop_canonical_schedules): Reinitialize at zero
8104         the components of the SCOP_STATIC_SCHEDULE for the loops
8105         that have already been parsed.
8106
8107         * graphite.h (debug_gbb): Declared.
8108
8109 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
8110             Jan Sjodin  <jan.sjodin@amd.com>
8111
8112         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
8113         (graphite_loop_to_gcc_loop): Removed.
8114         (remove_all_edges): New.
8115         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
8116         (gloog): Remove useless code.
8117
8118 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8119
8120         * graphite.c (get_bb_type): Reworked. We distinguish between
8121         loops with one or multiple exits.
8122         (is_loop_exit): New.
8123         (is_pred): New.
8124         (is_bb_addable): Rework condition handling, now support for case
8125         case statements and loops with multiple exits.
8126
8127         * gcc.dg/graphite/scop-11.c: New.
8128         * gcc.dg/graphite/scop-12.c: New.
8129         * gcc.dg/graphite/scop-13.c: New.
8130
8131 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8132
8133         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
8134         we have too many colors.
8135
8136 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
8137
8138         * doc/invoke.texi (-ftree-loop-fusion): Document.
8139         * tree-pass.h (pass_loop_fusion): Declared.
8140         * tree-loop-fusion.c: New.
8141         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
8142         * tree-data-ref.c (find_data_references_in_loop): Make extern.
8143         * tree-data-ref.h (find_data_references_in_loop): Declared.
8144         * common.opt (ftree-loop-fusion): Declared.
8145         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
8146
8147 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
8148
8149         * graphite.c (build_access_matrix): Fix typo from the merge.
8150
8151 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
8152
8153         * Merge from mainline (130800:135673).
8154
8155 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
8156
8157         * graphite.c (end_scop): The exit of the scop is not part of the scop.
8158         Update dominators after splitting.
8159
8160 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
8161
8162         * graphite.c (is_bb_addable): Return the harmful statement.
8163         Factor up some code.
8164         (end_scop): New.  Splits end of scope bbs on a harmful statement.
8165         (build_scops_1): Call end_scop.
8166
8167 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
8168
8169         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
8170         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
8171         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
8172         build_scops_1): Removed.
8173         (build_scops_2): Renamed build_scops_1.
8174
8175 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
8176
8177         * graphite.c: Fix formatting.
8178
8179 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8180
8181         * graphite.c (get_bb_type): New.
8182         (move_scops): New.
8183         (build_scops_2): New.
8184         (is_bb_addable): New.
8185         (build_scops): Switch the scop detection.
8186         (build_scop_bbs): Add entry bb to scop.
8187         * graphite.h (struct scop): Update comment.
8188
8189 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8190
8191         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
8192         more colors.
8193
8194 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8195
8196         * gcc.dg/graphite/scop-1.c: Update.
8197         * gcc.dg/graphite/scop-2.c: Update.
8198         * gcc.dg/graphite/scop-4.c: Update.
8199         * gcc.dg/graphite/scop-5.c: Add.
8200         * gcc.dg/graphite/scop-6.c: Add.
8201
8202 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
8203
8204         * gcc.dg/graphite/scop-0.c: Add.
8205         * gcc.dg/graphite/scop-7.c: Add.
8206         * gcc.dg/graphite/scop-8.c: Add.
8207         * gcc.dg/graphite/scop-9.c: Add.
8208         * gcc.dg/graphite/scop-10.c: Add.
8209
8210 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
8211
8212         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
8213         Check affine expressions depending on the outermost loop
8214         instead of a scop.
8215         (stmt_simple_for_scop_p): Same.
8216         (harmfule_stmt_in_scop): Same.
8217
8218 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
8219
8220         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
8221         mark entry and exit, that are not part of the SCoP and update HTML
8222         formatting.
8223
8224 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
8225
8226         * graphite.c (basic_block_simple_for_scop_p): Renamed
8227         harmful_stmt_in_bb.
8228         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
8229         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
8230         (all_preds_visited_p, all_succs_visited_p,
8231         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
8232         scop_end_loop): New.
8233         (build_scops): Do not use dfs_enumerate_from.
8234
8235         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
8236
8237 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
8238
8239         * graphite.c: Add comments to functions that are missing a
8240         description.
8241         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
8242
8243 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
8244
8245         * graphite.c (nb_params_in_scop): Moved...
8246         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
8247         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
8248         (clast_to_gcc_expression): Reduce column size to less than 80.
8249         (graphite_create_iv): Return the new name of the IV.
8250         (find_transform): Set options->esp and options->cpp.
8251         (gloog): Comment out the invalidation of the old loop code.
8252         (initialize_dependence_polyhedron): Replace scop_nb_params with
8253         nb_params_in_scop.
8254
8255         * graphite.h (nb_params_in_scop): ... here.
8256         (scop_nb_params): Removed.
8257         (loop_domain_dim): Return something even when the loop was not
8258         found in the hash table: avoid ICEing on all the graphite.exp
8259         testcases.
8260
8261 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8262
8263         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
8264
8265         * graphite.c (build_scop_dynamic_schedules): Schedule is built
8266         according to nesting level.
8267         (find_scop_parameters): Call instantiate_parameters.
8268         (scan_tree_for_params): Extend it to handle general affine bounds.
8269         Inner loop bound can depend on outer loop induction variable.
8270         (setup_cloog_loop): tmp variable is allocated on stack. Call
8271         instantiate_parameters with respect to outermost_loop_in_scop.
8272         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
8273         graphite.h.
8274         (create_empty_loop): Function loopify should be given edge
8275         probability, instead of edge frequency. Dominance relation from
8276         switch_bb to loop_header.
8277         (clast_to_gcc_expression): Added handling of clast_reduction node.
8278         (gloog): New functionality for removing old loop.
8279         (test_dependence): Factored out from build_rdg_all_levels.
8280         (build_rdg_all_levels): Dependence testing factored out to
8281         test_dependence function.
8282
8283         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
8284         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
8285         from graphite.c
8286
8287 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
8288
8289         * graphite.c (free_scop, param_index, initialize_cloog_names,
8290         nb_params_in_scop): Use name_tree map instead of just a tree
8291         for keeping track of the variable name associated to that tree.
8292         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
8293         clast_to_gcc_expression, graphite_create_iv,
8294         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
8295         graphite_stmt_to_gcc_stmt): New.
8296         (gloog): Call these.
8297         * graphite.h (struct name_tree): New.
8298         (struct scop): Use name_tree instead of tree for params.
8299         Store a vector of name_tree for new_ivs.
8300         (SCOP_NEWIVS): New.
8301         (scop_nb_params): Use name_tree instead of tree.
8302
8303 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
8304             Sebastian Pop  <sebastian.pop@amd.com>
8305
8306         * tree-bounds.c: New.
8307         * tree-bounds.h: New.
8308         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
8309         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
8310         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
8311         flag_mudflap.
8312         * gcc.c: Same.
8313         * toplev.c: Same.
8314         * c-cppbuiltin.c: Same.
8315         * c-pragma.c: Same.
8316         * common.opt: Same.
8317         * varasm.c: Same.
8318         * tree-outof-ssa.c: Same.
8319         * c-common.c: Same.
8320         * Makefile.in: Same.
8321
8322 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
8323             Sebastian Pop  <sebastian.pop@amd.com>
8324
8325         * tree-loop-distribution.c (remaining_stmts,
8326         upstream_mem_writes): Removed static variables.
8327         (copy_loop_before, create_bb_after_loop,
8328         mark_nodes_having_upstream_mem_writes, free_rdg_components,
8329         rdg_build_components, rdg_build_partitions,
8330         dump_rdg_partitions): Extern.
8331         (generate_loops_for_partition, generate_code_for_partition): Do not
8332         return a bool.
8333         (already_processed_vertex_p, predecessor_has_mem_write,
8334         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
8335         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
8336         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
8337         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
8338         Pass remaining_stmts and upstream_mem_writes as parameters.
8339         (rdg_component): Moved...
8340         (build_rdg_partition_for_component): Do not aggregate components when
8341         flag_streamize_loops is set.
8342         (gen_sequential_loops): New.
8343         (ldist_gen): Call gen_sequential_loops.
8344
8345         * tree-pass.h (pass_loop_streamization): Declared.
8346
8347         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
8348         basic blocks when loops structures exist.
8349
8350         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
8351
8352         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
8353
8354         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
8355         eliminate_local_variables_stmt, eliminate_local_variables,
8356         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
8357         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
8358         of code delimited by two edges in the CFG.
8359         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
8360         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
8361         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
8362         the case of parallelisation of reductions.
8363         (create_loop_fn): Extern.
8364         (create_omp_parallel_region): New.
8365
8366         * tree-data-ref.c (dump_data_dependence_relation): Don't call
8367         dump_data_reference for printing dra and drb.
8368         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
8369         RDGE_RELATION.
8370         (build_rdg): Don't call free_dependence_relations for the moment, as
8371         we attach dependence relations on each edge of the RDG.
8372         To be fixed later.
8373
8374         * tree-data-ref.h (rdg_component): ...here.
8375         (struct rdg_edge): New field ddr_p relation.
8376         (RDGE_RELATION): New.
8377         (create_bb_after_loop, copy_loop_before,
8378         mark_nodes_having_upstream_mem_writes, rdg_build_components,
8379         rdg_build_partitions, dump_rdg_partitions,
8380         free_rdg_components): Declared.
8381
8382         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
8383         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
8384
8385         * tree-loop-streamization.c: New.
8386
8387         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
8388         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
8389
8390         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
8391
8392         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
8393
8394         * passes.c: Schedule pass_loop_streamization.
8395
8396 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
8397
8398         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
8399         update comment.
8400
8401 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
8402
8403         * graphite.c (dot_all_scops): Update formatting.
8404         Bbs can now be part of more than one SCoP.
8405
8406 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
8407
8408         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
8409         malloc problems.
8410         (loop_domain_dim): Check for unregistered toplev SCOP loop.
8411         * graphite.h (loop_to_cloog_loop): New.
8412
8413 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8414
8415         * graphite.c (loop_domain_dim, ref_nb_loops,
8416         loop_iteration_vector_dim): New.
8417         (build_access_matrix_with_af, build_access_matrix,
8418         initialize_dependence_polyhedron): Fixed for new matrix layout.
8419         No longer assume that all iteration domains are of the same
8420         dimensionality.
8421
8422 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
8423
8424         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
8425         defined in a loop at depth 0 is invariant.
8426         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
8427         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
8428         be called at loop depth 0.
8429
8430         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
8431         a parameter.
8432         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
8433         (down_open_scop): Removed.
8434         (loop_in_scop_p): Redefined.
8435         (scop_affine_expr): New argument: scop.
8436         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
8437         a harmful statement ending a scop.
8438         (basic_block_simple_for_scop_p): New argument: scop.
8439         (get_loop_start): Removed.
8440         (new_scop): Initialize SCOP_LOOPS.
8441         (free_scop): Free SCOP_LOOPS.
8442         (succs_at_same_depth, preds_at_same_depth): New.
8443         (end_scop): Test the validity of a scop.
8444         (add_dominators_to_open_scops): New.
8445         (test_for_scop_bound): Call add_dominators_to_open_scops.
8446         Add cases for opening and closing multiple scops.
8447         (build_scops, build_scop_bbs): Iterate over basic blocks in
8448         depth first order.
8449         (build_graphite_bb): Pass scop directly.
8450         (dfs_bb_in_scop_p): New.
8451         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
8452         several times.
8453         (nb_loops_around_gb): Use loop_in_scop_p.
8454         (schedule_to_scattering): Disabled for the moment the code computing
8455         the "textual order for outer loop".
8456
8457         * graphite.h (struct scop): New field loops.
8458         (SCOP_LOOPS): New.
8459         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
8460
8461         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
8462
8463 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
8464             Sebastian Pop  <sebastian.pop@amd.com>
8465
8466         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
8467         * common.opt (fstreamize-loops): New.
8468         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
8469         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
8470         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
8471         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
8472
8473 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8474
8475         * tree-data-ref.c (build_empty_rdg): New.
8476         (build_rdg): Use it.
8477         * tree-data-ref.h (build_empty_rdg): Declared.
8478         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
8479         (find_vertex_for_stmt): Removed.
8480         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
8481
8482 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
8483
8484         * tree-loop-distribution.c (generate_builtin): After cancelling the
8485         loop tree, also delete basic blocks.
8486         (rdg_flag_uses): Stop recursion when a vertex has already been
8487         processed.
8488
8489 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8490
8491         * graphite.c (build_scop_alpha): Removed.
8492         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
8493         and dump_dependence_graph to avoid compiler warnings.
8494
8495 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8496
8497         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
8498         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
8499         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
8500         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
8501         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
8502         (initialize_dependence_polyhedron, find_vertex_for_stmt,
8503         initialize_data_dependence_polyhedron, is_empty_polyhedron,
8504         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
8505         dump_dependence_graph): New.
8506         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
8507         (GBB_ALPHA): New.
8508         (struct scop): New field loop2cloog_loop.
8509         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
8510         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
8511
8512 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8513
8514         * graphite.c (build_graphite_bb): Fix initialization
8515         of the graphite basic block.
8516
8517 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
8518
8519         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
8520         loop domain matrix.  Pass in the number of loops contained in the
8521         constraint matrix.
8522         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
8523         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
8524         loops that are not surrounding the current loop are not represented
8525         in the domain constraint matrix.
8526         (build_scop_iteration_domain): Initial domain constraint matrix
8527         contains only the eq/ineq, cst, and scop parameters columns.
8528
8529 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8530
8531         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
8532         (print_graphite_bb): Print scattering.
8533
8534 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8535
8536         * graphite.c (initialize_cloog_names): Initialize names of
8537         scattering variables.
8538
8539 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8540
8541         * graphite.c (dot_all_scops_1): Disable debug output while
8542         printing graph.
8543
8544 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
8545
8546         * graphite.c (find_transform): Change cloog output language to C.
8547
8548 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
8549
8550         * tree-loop-distribution.c (generate_memset_zero,
8551         generate_builtin, generate_code_for_partition,
8552         rdg_flag_all_uses): New.
8553         (rdg_flag_uses): Gather in the same partition the statements defining
8554         the VUSES of the current statement.
8555         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8556         Gather in the same partition not only the stores to the same memory
8557         access, but also the reads.
8558         (ldist_generate_loops): Renamed ldist_gen.
8559
8560 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
8561             Tobias Grosser  <grosser@fmi.uni-passau.de>
8562
8563         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8564         next pointer, don't use the inner pointer.
8565
8566 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
8567
8568         * graphite.c (dot_all_scops, dot_all_scops_1): New.
8569         (find_transform): Call dot_all_1.
8570         * graphite.h (dot_all_scops): Declared.
8571
8572 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
8573
8574         * tree-loop-distribution.c: Fix apsi.f ICE.
8575         (create_bb_after_loop): New.
8576         (generate_loops_for_partition): Use it.
8577         * gfortran.dg/ldist-1.f90: New.
8578
8579         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8580         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8581
8582 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8583
8584         * graphite.c (find_transform): Dump cloog program sent to cloog.
8585
8586 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8587
8588         * graphite.c (initialize_cloog_names): Initialize cloog
8589         iterator names.
8590
8591 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8592
8593         * graphite.c (build_scop_context): Fix typo, for the matrix
8594         format: insert '0 >= 0' instead of '-1 >= 0'.
8595
8596 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8597
8598         * Fix merge problems.
8599
8600 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8601
8602         * graphite.c (setup_cloog_loop): Fix typo.
8603
8604 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8605
8606         * doc/invoke.texi (-ftree-loop-distribution): Documented.
8607         * tree-loop-distribution.c: Reimplemented.
8608         * tree-pass.h (pass_loop_distribution): New.
8609         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8610         print_loops.
8611         * graphds.h (struct graph): New field indexes.
8612         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8613
8614         * tree-vect-analyze.c: Remove declaration of static functions when not
8615         needed.
8616         * tree-vectorizer.c: Same.
8617         (rename_variables_in_loop): Now extern.
8618         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8619         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
8620         calling redirect_edge_and_branch_force.
8621
8622         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8623
8624         * tree-data-ref.c: Don't include tree-chrec.h.
8625         (debug_data_dependence_relations): New.
8626         (dump_data_dependence_relation): Call dump_data_reference on data refs
8627         in the relation.
8628         (same_access_functions): Moved...
8629         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8630         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8631         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8632         struct rdg_vertex_info, ): New.
8633         (create_rdg_edge_for_ddr): Compute the dependence level before looking
8634         at DDR_REVERSED_P.
8635         (create_rdg_vertices): Initialize the htab of graph->indexes.
8636         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8637         (stmts_from_loop): Don't save LABEL_EXPR.
8638         (hash_stmt_vertex_info, eq_stmt_vertex_info,
8639         hash_stmt_vertex_del): New.
8640         (build_rdg): Initialize rdg->indexes.
8641         (free_rdg, stores_from_loop, ref_base_address,
8642         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8643         have_similar_memory_accesses_1, ref_base_address_1,
8644         remove_similar_memory_refs): New.
8645
8646         * tree-data-ref.h: Include tree-chrec.h.
8647         (debug_data_dependence_relations): Declared.
8648         (same_access_functions): ...here.  Now static inline.
8649         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8650         ddr_dependence_level): New.
8651         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8652         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8653         RDG_MEM_READS_STMT): New.
8654         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8655         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8656         rdg_vertex_for_stmt): Declared.
8657         (struct rdg_edge): New field level.
8658         (RDGE_LEVEL, free_rdg): New.
8659         (stores_from_loop, remove_similar_memory_refs,
8660         rdg_defs_used_in_other_loops_p,
8661         have_similar_memory_accesses): Declared.
8662         (rdg_has_similar_memory_accesses): New.
8663
8664         * lambda.h (dependence_level): New.
8665         * common.opt (ftree-loop-distribution): New.
8666         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8667         (print_loop_ir): Renamed print_loops.
8668         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8669         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8670         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8671         (tree-loop-distribution.o): Added.
8672         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8673         (mark_virtual_ops_in_bb): New.
8674         (print_loops_bb, debug_loop_num, debug_loop): New.
8675         * passes.c: Scheduled pass_loop_distribution.
8676
8677 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8678
8679         * graphite.c (scan_tree_for_params): Correct the number of columns
8680         for polylib format.
8681         (nb_flat_iterator): New.
8682         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8683         (build_scop_iteration_domain): Correct the number of columns for
8684         polylib format.
8685
8686 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8687
8688         * Merge from mainline (129697:130800).
8689
8690 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8691
8692         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8693         dominated by SCoP's exit.
8694         (graphite_transform_loops): Compute post dominators.
8695
8696 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8697
8698         * Merge from mainline (127169:129697).
8699
8700 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8701
8702         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8703         parameter for the basic block that contains the expression.  Use
8704         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8705         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8706         the expression.
8707         * graphite.h (gbb_loop): New.
8708         (GBB_LOOP): Removed.
8709
8710 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8711
8712         * Makefile.in: Fix merge problem.
8713
8714 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8715
8716         * Merge from mainline (125309:127169).
8717         * tree-loop-distribution.c: Disabled.
8718
8719 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8720
8721         * Merge from mainline (r123693:125309).
8722
8723 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8724
8725         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8726         correct_modify_p
8727         (correct_modify_p, check_statements, number_of_lvalue_uses,
8728         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8729         instead of MODIFY_EXPR.
8730         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8731         and push new edges.
8732
8733 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8734
8735         * tree-loop-distribution.c (struct rdg): Replace arrays by
8736         VECs for edges and vertices.
8737         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8738         (RDGV_NB_PARTITIONS): New.
8739         (PRDG_NBV, PRDG_NBE): Removed.
8740         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8741         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8742         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8743
8744 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8745             Sebastian Pop  <sebpop@gmail.com>
8746
8747         * doc/invoke.texi (-ftree-loop-distribution): Document.
8748         * tree-loop-distribution.c: New file.
8749         * tree-pass.h (pass_loop_distribution): Declared.
8750         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8751         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8752         and set reversed_p.
8753         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8754         (DDR_REVERSED_P): New.
8755         * common.opt (-ftree-loop-distribution): New.
8756         * tree-flow.h (distribute_loops): Declared.
8757         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8758         * passes.c (init_optimization_passes): Schedule loop distribution.
8759
8760 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8761
8762         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8763         (print_scop): Don't print when scop is NULL.
8764         (build_scop_context, find_transform): Don't output to stderr.
8765
8766 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8767
8768         * tree-data-ref.c: Don't include graphite.h.
8769         Comment out the code for printing data reference's scop.
8770         (build_access_matrix_with_af): Moved...
8771         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8772         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8773         (print_graphite_bb): Print basic block's schedule.
8774         (print_scop): Don't print the schedule, call cloog's pretty printer.
8775         (bb_in_scop_p): A basic block is in a scop only if it is both
8776         dominated and postdominated by the scop's entry and exit basic blocks.
8777         (function_parameter_p): New.
8778         (invariant_in_scop_p): Use function_parameter_p.
8779         (new_scop, save_scop): New.
8780         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8781         save_scop.
8782         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8783         (loop_in_scop_p): New.
8784         (scop_record_loop): Use loop_in_scop_p.
8785         (build_scop_domain): Renamed build_scop_iteration_domain.
8786         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8787         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8788         setup_cloog_loop, dot_scop_1, dot_scop): New.
8789         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8790         (struct scop): Add a pointer to cloog's representation of a program.
8791
8792 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8793
8794         * doc/invoke.texi (-ftree-check-verbose): Renamed
8795         -ftree-checks-verbose.
8796         * common.opt (flag_tree_check_verbose): Renamed
8797         flag_tree_checks_verbose.
8798         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8799
8800 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8801
8802         * configure: Regenerated.
8803         * config.in: Regenerated.
8804         * tree-ssa-loop.c (graphite_transforms): Execute
8805         graphite_transform_loops only when HAVE_cloog.
8806         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8807         * graphite.c: Include polylibgmp.h and cloog.h.
8808         (graphite_transform_loops): Removed loops parameter.
8809         * tree-flow.h (graphite_transform_loops): Update declaration.
8810         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8811         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8812         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8813         (OBJS-common): Remove dependence on graphite.o.
8814         (BACKEND): Depend on @GRAPHITE@.
8815
8816 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8817
8818         * doc/invoke.texi (-ftree-check-verbose): Documented.
8819         * gcc.dg/tree-checker/tree-checks-1.c: New.
8820         * gcc.dg/tree-checker/tree-checks-2.c: New.
8821         * gcc.dg/tree-checker/tree-checks-3.c: New.
8822         * gcc.dg/tree-checker/tree-checks-4.c: New.
8823         * gcc.dg/tree-checker/tree-checks.exp: New.
8824         * gcc.dg/tree-checker/condates.crp: New.
8825         * common.opt (ftree-checks-verbose): New.
8826         * tree-check.c (tree_check_warning): Move extra stderr output
8827         under control of flag_tree_check_verbose.
8828
8829 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8830
8831         * tree-match.c: Fix comments formatting.
8832         * tree-match.h: Fix comments formatting.
8833         * tree-check.c: Fix comments formatting.
8834         (tree_check_init): Restructure.
8835
8836 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8837
8838         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8839
8840 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8841
8842         * Merge from mainline (r120733:123693).
8843
8844 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8845
8846         * condate.y: New file.
8847         * tree-match.h (struct patt_info_s): New field sign.
8848         (struct condate_s): New field msg.
8849         (normalize_condate, name_condate, add_condate): New.
8850         (conds[], condate_parse): Made extern.
8851         * tree-check.c (tree_check_warning): First arg changed to cond;
8852         warning reformatted.
8853         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8854         (tree_scan): New.
8855         (tree_check): Process trivial condates.
8856         (read_delimited_string): Removed.
8857         (print_cond): Print name and msg.
8858         (conds[]): Made extern.
8859         (parse_tree_check_file_once): Rewritten to use the parser in
8860         condate.y.
8861         Processing of option --tree_check_string moved to tree_scan().
8862         * Makefile.in: Added condate.y
8863
8864 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8865
8866         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8867         Use VECs instead of varrays.
8868         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8869         * Makefile.in (pretty-print.o): Depend on vec.h.
8870         * pretty-print.c: Include tree.h and vec.h.
8871         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8872         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8873         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8874         pp_free_list): Use VECs instead of varrays.
8875         * pretty-print.h: Do not include varray.h.
8876         (struct tree_chunk_s): Declaration moved before its use.
8877         (output_buffer): Rename varray field to chunks.
8878         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8879         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8880         save_global_holes): Use VECs instead of varrays.
8881         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8882         * tree-check.c (scan_cfg_stmts, push_node,
8883         print_matching_stmt): Removed.
8884         (tree_check_instance, push_global_holes_if_new, tree_check,
8885         execute_tree_check): Use VECs instead of varrays.
8886         (gate_tree_check): Don't execute the CFG check when basic_block_info
8887         is not available.
8888
8889 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8890
8891         * Merge from mainline (r115016:120733).
8892
8893 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8894
8895         * Merge from mainline (r117632:117661).
8896
8897 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8898
8899         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8900         * tree-pass.h (TDF_DEBUG, debug_p): New.
8901         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8902         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8903         get_loop_exit_condition, analyze_evolution_in_loop,
8904         analyze_initial_condition, analyze_scalar_evolution,
8905         instantiate_parameters, number_of_latch_executions): Use debug_p.
8906         * tree-chrec.c (chrec_apply): Use debug_p.
8907         * tree-data-ref.c: Include graphite.h.
8908         (dump_data_reference): Print also the access matrix.
8909         (analyze_array, analyze_indirect_ref, init_data_ref,
8910         analyze_offset_expr, address_analysis, object_analysis,
8911         create_data_ref, finalize_ddr_dependent,
8912         non_affine_dependence_relation, analyze_ziv_subscript,
8913         analyze_siv_subscript_cst_affine,
8914         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8915         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8916         analyze_miv_subscript, analyze_overlapping_iterations,
8917         build_classic_dist_vector, subscript_dependence_tester,
8918         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8919         (build_access_matrix_with_af): No longer static.
8920         * tree-data-ref.h (scop_p): ... declaration here.
8921         (data_reference.scop): New field.
8922         (DR_SCOP, DR_ACCESS_MATRIX): New.
8923         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8924         * graphite.c (print_graphite_bb): Call dump_data_references.
8925         (print_scop): Use scop_nb_loops and scop_dim_domain.
8926         (test_for_scop_bound): Use debug_p.
8927         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8928         scop_nb_params.
8929         (scop_loop_index): Moved...
8930         (scop_record_loop): New.
8931         (build_scop_loop_nests): Use scop_record_loop.
8932         (build_scop_domain): Use scop_dim_domain.
8933         (build_access_matrix): Implemented.
8934         (build_scop_canonical_schedules): Use scop_nb_loops.
8935         (build_graphite_bb): Initialize GBB_SCOP.
8936         * graphite.h (scop_p): Moved...
8937         (graphite_bb.scop): New field.
8938         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8939         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8940         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8941         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8942         scop_loop_index): New.
8943         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8944
8945 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8946
8947         * Merge from mainline (r117661:120450).
8948
8949 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8950
8951         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8952         at the first declaration outside the varying loop, instantiate as
8953         far as possible.
8954         * tree-chrec.c (for_each_scev_op): New.
8955         * tree-chrec.h (for_each_scev_op): Declared.
8956         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8957         * tree-data-ref.c (get_references_in_stmt,
8958         find_data_references_in_stmt): New, from trunk.
8959         (find_data_references_in_loop): Use get_references_in_stmt
8960         and find_data_references_in_loop, modified as in trunk.
8961         (build_access_matrix_with_af): New.
8962         * tree-data-ref.h (data_reference): Add a field access_matrix.
8963         (data_ref_loc): New, as in trunk.
8964         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8965         invariant_in_scop_p, param_index, scan_tree_for_params,
8966         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8967         idx_record_param, idx_record_params, build_access_matrix,
8968         build_scop_data_accesses, build_scop_canonical_schedules,
8969         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8970         build_scop_params): New.
8971         * graphite.h (graphite_bb): New.
8972         (scop): Add fields static_schedule, params, loop_nest,
8973         iteration_domain.
8974         * lambda.h: Declare vecs of lambda_matrix.
8975         * tree-flow.h (print_loop_ir_bb): Declared.
8976         * tree-cfg.c (print_loop_ir_bb): New.
8977         (print_loop): Use print_loop_ir_bb.
8978
8979 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8980
8981         * Merge from mainline (r115016:117632).
8982
8983 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8984
8985         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8986         break due to a warning.
8987
8988 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
8989
8990         * graphite.c (print_scops, debug_scops): New.
8991         (graphite_transform): Renamed graphite_find_transform.
8992         * graphite.h (debug_scops): Declared.
8993
8994 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
8995
8996         * tree-match.c: Reformat following the GNU style.
8997         * tree-match.h: Reformat following the GNU style.
8998         * tree-pattern.h: Removed empty file.
8999         * Makefile.in: Remove references to tree-pattern.h.
9000         * tree-check.c: Reformat following the GNU style.
9001         (execute_tree_check): Move gate condition code to...
9002         (gate_tree_check): ...here.  New function.
9003         (pass_check): Use the gate function.
9004
9005 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
9006
9007         * tree-pattern.h: New. Tree pattern matching and checking using
9008         concrete syntax.
9009         * tree-check.c: New. Tree/CFG checking pass.
9010         * tree-match.c: New. Library for tree pattern matching.
9011         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
9012         * toplev.c, flags.h: Add globals for tree-check pass.
9013         * Makefile.in: Integrate the files in tree-check pass.
9014         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
9015         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
9016         Introduce a "lazy" pretty-print mode.
9017         * tree.c, tree.h: Add tree_name.
9018
9019 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
9020
9021         * doc/invoke.texi (-fgraphite): Correct typo.
9022         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
9023         use of print_loop_ir.
9024         * gcc.dg/graphite/scop-1.c: New.
9025         * gcc.dg/graphite/scop-2.c: New.
9026         * gcc.dg/graphite/graphite.exp: New.
9027         * graphite.c: Include domwalk.h.
9028         (print_scop): Print only the entry and exit blocks.
9029         (debug_scop): No longer static.
9030         (affine_expr): Fix formating.  Return also true when the expression is
9031         constant.
9032         (stmt_simple_for_scop_p): Fix formating.
9033         (build_scops): Use domwalk.
9034         (get_loop_start, end_scop, test_for_scop_bound): New.
9035         (graphite_transform_loops): Avoid printing on stderr.
9036         * graphite.h (debug_scop): Declared.
9037         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
9038         * Makefile.in (graphite.o): Depend on domwalk.h.
9039         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
9040         declarations for static functions.
9041         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
9042         controlling output verbosity.
9043
9044 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
9045             Plesco Alexandru  <shurikx@gmail.com>
9046
9047         * doc/invoke.texi (-fgraphite): Document.
9048         * tree-pass.h (pass_graphite_transforms): Declared.
9049         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
9050         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
9051         (pass_graphite_transforms): Defined.
9052         * tree-data-ref.c (free_data_ref, data_reference): Extern.
9053         * tree-data-ref.h (free_data_ref, data_reference): Declared.
9054         * graphite.c, graphite.h: New.
9055         * common.opt (fgraphite): Declared.
9056         * tree-flow.h (graphite_transform_loops): Declared.
9057         * Makefile.in (OBJS-common): Add graphite.o.
9058         (graphite.o): New rule.
9059         * passes.c (pass_graphite_transforms): Scheduled.
9060