OSDN Git Service

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