OSDN Git Service

Add a stride parameter to scop_do_strip_mine.
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
4         for the stride.
5         (lst_do_strip_mine): Same.
6         (scop_do_strip_mine): Same.
7         * graphite-poly.c (apply_poly_transforms): Update call to
8         scop_do_strip_mine.
9         * graphite-poly.h (scop_do_strip_mine): Update declaration.
10
11 2010-09-24  Sebastian Pop  <sebastian.pop@amd.com>
12
13         PR middle-end/45758
14         * graphite.c (graphite_initialize): Call scev_reset.
15
16 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
17
18         * sese.h (scev_analyzable_p): Return false for real or floating
19         point.  Only handle INTEGRAL_TYPE_P and POINTER_TYPE_P.
20
21 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
22
23         PR middle-end/45758
24         * gfortran.dg/graphite/pr45758.f90: New.
25
26 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
27
28         * graphite-scop-detection.c (is_scop_p): Free bblist.
29
30 2010-09-23  Sebastian Pop  <sebastian.pop@amd.com>
31
32         * graphite-clast-to-gimple.c (compute_bounds_for_level): Free le
33         and ps.
34         * graphite-poly.c (pbb_number_of_iterations_at_time): Free le and
35         domain.
36         * graphite-sese-to-poly.c (add_upper_bounds_from_estimated_nit):
37         Do not allocate ub_expr, it is passed in initialized.
38
39 2010-09-21  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
40
41         * common.opt (fgraphite-dump-cloog): New flag.
42         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
43         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
44         (build_cloog_prog): Dump CLooG input file when
45         flag_graphite_dump_cloog is set.
46         * graphite-cloog-compat.h (cloog_program_dump_cloog): New.
47
48 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
49
50         Revert previous patch "New flag: -fgraphite-dump-cloog."
51
52 2010-09-20  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
53
54         * common.opt (fgraphite-dump-cloog): New flag.
55         * doc/invoke.texi (-fgraphite-dump-cloog): Documented.
56         * graphite-clast-to-gimple.c (init_cloog_input_file): New.
57         (build_cloog_prog): Dump CLooG input file when
58         flag_graphite_dump_cloog is set.
59
60 2010-09-20  Sebastian Pop  <sebastian.pop@amd.com>
61
62         * graphite-clast-to-gimple.c (graphite_verify): Remove call to
63         verify_dominators for CDI_POST_DOMINATORS.
64         * sese.h: Remove comment about CDI_POST_DOMINATORS.
65         (recompute_all_dominators): Remove call to free_dominance_info
66         for CDI_POST_DOMINATORS.  Remove call to calculate_dominance_info
67         for CDI_POST_DOMINATORS.
68
69 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
70
71         * graphite-poly.c (pbb_number_of_iterations_at_time): Only iterate
72         over pbb_dim_iter_domain.
73
74 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
75
76         * graphite-flattening.c: Fix comments.
77
78 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
79
80         * Makefile.in (OBJS-common): Add graphite-flattening.o.
81         (graphite-flattening.o): New rule.
82         * common.opt (floop-flatten): New flag.
83         * doc/invoke.texi (-floop-flatten): Documented.
84         * graphite-flattening.c: New.
85         * graphite-poly.c (apply_poly_transforms): Call flatten_all_loops.
86         * graphite-poly.h (flatten_all_loops): Declared.
87         (lst_remove_loop_and_inline_stmts_in_loop_father): New.
88         * tree-ssa-loop.c (gate_graphite_transforms): When flag_loop_flatten
89         is set, also set flag_graphite.
90
91 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
92
93         * graphite-poly.c (cloog_checksum): New.
94         * graphite-poly.h (cloog_checksum): Declared.
95
96 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
97
98         * graphite-poly.c (pbb_number_of_iterations): Removed.
99         (pbb_number_of_iterations_at_time): Correctly compute the number
100         of iterations in the transformed loop.
101         * graphite-poly.h (pbb_number_of_iterations): Removed.
102
103 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
104
105         * graphite-poly.h (lst_update_scattering_seq): Removed.
106         (lst_update_scattering): Correctly handle outermost loop dewey
107         renumbering.
108
109 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
110
111         * graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
112         lst_strip_mine_profitable_p.  Call lst_niter_for_loop.
113         * graphite-poly.h (lst_niter_for_loop): New.
114
115 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
116
117         * graphite-poly.c (apply_poly_transforms): Do not abort when the
118         transform read from disk is not legal.  Call fatal_error instead.
119
120 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
121
122         * graphite-poly.c (print_pbb_body): Add missing closing parenthesis.
123         (print_scop_header): Removed.  Inlined in the only call place...
124         (print_scop): ... here.
125
126 2010-09-09  Sebastian Pop  <sebastian.pop@amd.com>
127
128         * graphite-poly.h (lst_dewey_number): Use FOR_EACH_VEC_ELT.
129
130 2010-09-02  Vladimir Kargov  <kargov@gmail.com>
131
132         * graphite-scop-detection.c (is_valid_expr_p, is_valid_loop_p): New.
133         (is_valid_stmt_p): Add data reference and operation-specific checks.
134         (is_valid_bb_p): Change structure, add loop validity check.
135         (is_scop_p): Move the TODO list
136         (find_scops_new): New.
137         (build_scops_new): Move part of functionality to find_scops_new and
138         build_scops.  Add necessary steps for successful SCoP construction.
139         (build_scops): Compute SCoP sets for both detection algorithms, choose
140         the resulting one depending on static condition.
141
142 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
143
144         * graphite-poly.c (graphite_read_scop_file): Fix uninitialize warning.
145
146 2010-08-24  Sebastian Pop  <sebastian.pop@amd.com>
147
148         * graphite-dependences.c (dot_deps): Avoid set but not used warning.
149         (dot_deps_stmt): Same.
150         * graphite-poly.c (dot_lst): Same.
151
152 2010-08-23  Sebastian Pop  <sebastian.pop@amd.com>
153
154         * graphite-blocking.c (scop_do_strip_mine): Do not call
155         graphite_legal_transform.
156         (scop_do_block): Same.
157
158 2010-08-20  Vladimir Kargov  <kargov@gmail.com>
159
160         * graphite-scop-detection.c (graphite_can_represent_loop): Correct the
161         description.
162
163 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
164
165         PR middle-end/45230
166         * gcc.dg/graphite/id-pr45230.c: New.
167
168 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
169
170         * tree-scalar-evolution.c (instantiate_array_ref): New.
171         (instantiate_scev_r): Also handle ARRAY_REFs.
172
173 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
174
175         * tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
176         Do not check for VAR_DECL, PARM_DECL, FUNCTION_DECL, LABEL_DECL,
177         RESULT_DECL, and FIELD_DECL.  Return false for an
178         SSA_NAME_IS_DEFAULT_DEF.
179         (compute_scalar_evolution_in_loop): Do not further analyze the
180         scalar evolution when no_evolution_in_loop_p returns true.
181
182 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
183
184         * tree-chrec.h (evolution_function_is_affine_p): Do not check
185         whether CHREC_LEFT is invariant.  A function is affine when
186         CHREC_RIGHT is invariant.
187
188 2010-08-20  Sebastian Pop  <sebastian.pop@amd.com>
189
190         * graphite-sese-to-poly.c (reduction_phi_p): Remove check for
191         is_gimple_reg.
192         (rewrite_degenerate_phi): Same.
193         (rewrite_reductions_out_of_ssa): Add check for is_gimple_reg.
194
195 2010-08-18  Vladimir Kargov  <kargov@gmail.com>
196
197         * graphite-scop-detection.c (graphite_can_represent_scev,
198         graphite_can_represent_expr, stmt_has_simple_data_refs_p,
199         graphite_can_represent_loop): Remove outermost_loop.
200
201 2010-08-17  Sebastian Pop  <sebastian.pop@amd.com>
202
203         PR middle-end/45229
204         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Do not
205         handle GIMPLE_CALLs with no LHS.
206
207 2010-08-17  Riyadh Baghdadi  <baghdadi.mr@gmail.com>
208             Sebastian Pop  <sebastian.pop@amd.com>
209
210         * gcc.dg/graphite/graphite.exp: Add test rules for openscop read/write.
211         Call remove-build-file to clean up the generated *.graphite files.
212
213 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
214
215         * doc/invoke.texi (debugging options): Update documentation.
216         (-floop-interchange): Same.
217         (-flopp-strip-mine): Same.
218         (-floop-block): Same.
219         (-fgraphite-read): Add documentation.
220         (-fgraphite-write): Same.
221
222 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
223
224         * toplev.c (process_options): Disable graphite loop optimization
225         options when -fgraphite-read flag is used.
226
227 2010-08-17  Riyadh Baghdadi <baghdadi.mr@gmail.com>
228
229         * graphite-poly.c (init_graphite_out_file): New.
230         (init_graphite_in_file): New.
231         (apply_poly_transforms): Updated to enable reading and writing of
232         multiple scop files.
233         * toplev.c (init_asm_output): Remove graphite in/out file initialization.
234
235 2010-08-17  Tobias Grosser  <grosser@fim.uni-passau.de>
236
237         * graphite-scop-detection.c (graphite_can_represent_scev): Remove
238         redundant checks.
239
240 2010-08-12  Sebastian Pop  <sebastian.pop@amd.com>
241
242         * graphite-clast-to-gimple.c (precision_for_value): Adjust
243         computation of precision by 1.
244
245 2010-08-12  Riyadh Baghdadi <baghdadi.mr@gmail.com>
246
247         * graphite-cloog-util.c (openscop_read_cloog_matrix): New.
248         (openscop_read_polyhedron_matrix): New.
249         * graphite-cloog-util.h (openscop_read_polyhedron_matrix): Declared.
250         (openscop_read_N_int): Same.
251         * graphite-poly.c (openscop_read_N_int): New.
252         (openscop_read_one_int): New.
253         (openscop_read_N_string): New.
254         (openscop_read_one_string): New.
255         (openscop_read_powerset_matrix): New.
256         (graphite_read_transforms): Remove.
257         (graphite_read_scatt): New.
258         (graphite_read_scop_file): New.
259         (apply_poly_transforms): Updated to call graphite_read_scop_file.
260
261 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
262
263         * graphite-poly.c: Change include order.
264
265 2010-08-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
266
267         * graphite-cloog-compat.h (cloog_matrix_ncolumns): New.
268         (cloog_matrix_nrows): New.
269
270 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
271
272         * graphite-cloog-util.c (openscop_print_cloog_matrix): Remove spaces
273         from matrix lines.
274         * graphite-poly.c (openscop_print_scattering_function_1): Same.
275         (print_scattering_function_1): Same.
276         (openscop_print_pbb_domain): Same.
277         (openscop_print_scop_context): Same.
278         (print_scop_context): Same.
279
280 2010-08-11  Riyadh Baghdadi <baghdadi.mr@gmail.com>
281
282         * graphite-poly.c (openscop_print_pdr_polyhedron): Fix indentation.
283         (openscop_print_pdr_polyhedron): Print pph.
284
285 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
286
287         * gcc.dg/graphite/graphite.exp: Add compile rules for vect-* files.
288         * gfortran.dg/graphite/graphite.exp: Same.
289         * gcc.dg/graphite/vect-pr43423.c: New.
290
291 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
292
293         * graphite-clast-to-gimple.c (gcc_type_for_interval): Generate in
294         priority signed types.
295
296 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
297
298         * graphite-clast-to-gimple.c (max_signed_precision_type): Remove the call
299         to lang_hooks.types.type_for_size.  Call build_nonstandard_integer_type.
300
301 2010-07-29  Riyadh Baghdadi <baghdadi.mr@gmail.com>
302
303         * graphite-cloog-util.c (openscop_print_cloog_matrix): New.
304         (openscop_print_polyhedron_matrix): New.
305         * graphite-cloog-util.h (openscop_print_polyhedron_matrix): Declared.
306         * graphite-poly.c (openscop_print_pdr_polyhedron): Same.
307         (openscop_print_pdr_powerset): New.
308         (openscop_print_powerset_matrix): New.
309         (openscop_print_scattering_function_1): New.
310         (print_scattering_function): Add support for scattering names and
311         OpenScop format.
312         (graphite_write_transforms): Remove.
313         (apply_poly_transforms): Updated to call print_scop.
314         (print_pdr_access_layout): Updated to support OpenScop format.
315         (print_pdr): Same.
316         (openscop_print_pbb_domain): New.
317         (print_pbb_body): Added a parameter to allow indicating that pbb_body is
318         not provided.
319         (print_pbb): Updated to call the new print_pbb_body.
320         (openscop_print_scop_context): New.
321         (print_scop_header): New.
322         (print_scop): Updated to call print_scop_header.
323         * graphite-poly.h: Document OpenScop format.
324
325 2010-07-29  Sebastian Pop  <sebastian.pop@amd.com>
326
327         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add back
328         the case removed in the previous patch, when the only phi argument
329         is defined in the same loop as the phi node itself.  Handle it
330         separately from the invariant case by both propagating it outside
331         the region and replacing the phi node with an assign.
332
333 2010-07-28  Sebastian Pop  <sebastian.pop@amd.com>
334
335         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): The only
336         constant phi nodes with one argument are is_gimple_min_invariant
337         and SSA_NAME_IS_DEFAULT_DEF.
338
339         * gfortran.dg/graphite/id-22.f: New.
340
341 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
342
343         * graphite.c (graphite_initialize): Do not initialize
344         CLooG and initialize the Parma Polyhedra Library
345         manually when using CLOOG_ORG.
346         (graphite_finalize): Do not finalize CLooG and finalize
347         the Parma Polyhedra Library manually when using CLOOG_ORG.
348         * graphite-cloog-compat.h (cloog_initialize): Hide function
349         when using CLOOG_ORG.
350         (cloog_finalize): Same.
351
352 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
353
354         * graphite-clast-to-gimple.c (free_scattering): Change
355         CloogDomainList/CloogDomain to CloogScatteringList/CloogScattering
356         (CLOOG_ORG).
357         (build_cloog_prog): Same.
358         * graphite-cloog-compat.h (cloog_domain): Removed.
359         (cloog_scattering): New.
360         (cloog_set_domain): Removed.
361         (cloog_set_scattering): New.
362         (cloog_next_domain): Removed.
363         (cloog_next_scattering): New.
364         (cloog_set_next_domain): Removed.
365         (cloog_set_next_scattering): New.
366         (CloogScatteringList): New.
367         (CloogScattering): New.
368         (cloog_scattering_free): New.
369         (new_Cloog_Scattering_from_ppl_Polyhedron): New.
370         * graphite-cloog-util.c (new_Cloog_Scattering_from_ppl_Polyhedron):
371         New.
372
373 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
374
375         * graphite-clast-to-gimple.c (build_cloog_prog): Extend with
376         CloogState.
377         (set_cloog_options): Same.
378         (print_clast_stmt): Same.
379         (scop_to_clast): Same.
380         (print_generated_program): Same.
381         (gloog): Same.
382         * graphite-clast-to-gimple.h: Include graphite-cloog-util.h.
383         (scop_to_clast): Extend with CloogState.
384         * graphite-cloog-util.c: Include graphite-cloog-compat.h
385         (new_Cloog_Domain_from_ppl_Polyhedron):
386         Extend with CloogState.  Use cloog_domain_from_cloog_matrix (CLOOG_ORG).
387         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Extend with CloogState.
388         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
389         * graphite-cloog-util.h (build_cloog_prog): Same.
390         * graphite-cloog-copat.h (build_cloog_prog): New.
391         (CloogState): New.
392         (cloog_state_malloc): New.
393         (cloog_state_free): New.
394         (cloog_loop_malloc): New.
395         (cloog_options_malloc): New.
396         (cloog_statement_alloc): New.
397         (cloog_domain_from_cloog_matrix): New.
398         (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
399         (new_Cloog_Domain_from_ppl_Polyhedron): New.
400
401 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
402
403         * graphite-clast-to-gimple.c (clast_name_to_gcc): Parameter
404         type of NAME now depends on used CLooG version.
405         (clast_to_gcc_expression): Replace expr_* with clast_expr_*.
406         (gcc_type_for_clast_expr): Same.
407         (print_clast_stmt): Replace pprint with clast_pprint.
408         * graphite-cloog-compat.h: Provide compatibility macros for
409         CLooG Legacy.
410         (clast_name_p): New.
411         (clast_expr_term): New.
412         (clast_expr_red): New.
413         (clast_expr_bin): New.
414         (clast_pprint): New.
415
416 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
417
418         * graphite-clast-to-gimple.c (set_cloog_options): Make CLooG options
419         compatible to newer CLooG releases (CLOOG_ORG).
420         (build_cloog_prog): Pass CloogOptions to more functions (CLOOG_ORG).
421         (scop_to_clast): Pass CloogOptions to build_cloog_prog (CLOOG_ORG).
422         * graphite-cloog-compat.h: Add compatibility macros for CLooG Legacy.
423         (build_cloog_prog) : New.
424         (cloog_program_extract_scalars): New.
425         (cloog_program_scatter): New.
426
427 2010-07-27  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
428
429         * graphite-clast-to-gimple.c: Include graphite-cloog-compat.h
430         conditionally (CLOOG_ORG).
431         * graphite-cloog-compat.h: New.  Include graphite-cloog-compat.h.
432         (cloog_statement_usr): New.
433         (cloog_domain): Same.
434         (cloog_set_domain): Same.
435         (cloog_next_domain): Same.
436         (cloog_set_next_domain): Same.
437         (cloog_program_nb_scattdims): Same.
438         (cloog_program_set_nb_scattdims): Same.
439         (cloog_program_names): Same.
440         (cloog_program_set_names): Same.
441         (cloog_program_set_context): Same.
442         (cloog_program_set_loop): Same.
443         (cloog_program_blocklist): Same.
444         (cloog_program_set_blocklist): Same.
445         (cloog_program_scaldims): Same.
446         (cloog_program_set_scaldims): Same.
447         (cloog_names_nb_parameters): Same.
448         (cloog_names_set_nb_parameters): Same.
449         (cloog_names_parameters): Same.
450         (cloog_names_set_parameters): Same.
451         (cloog_names_set_nb_iterators): Same.
452         (cloog_names_set_iterators): Same.
453         (cloog_names_set_nb_scattering): Same.
454         (cloog_names_set_scattering): Same.
455         (cloog_statement_set_usr): Same.
456         (cloog_loop_set_next): Same.
457         (cloog_loop_set_domain): Same.
458         (cloog_loop_set_block): Same.
459         (cloog_block_list_next): Same.
460         (cloog_block_list_set_next):
461         (cloog_block_list_set_block): Same.
462
463 2010-07-27  Sebastian Pop  <sebastian.pop@amd.com>
464
465         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Returns
466         a bool.
467         (rewrite_commutative_reductions_out_of_ssa_close_phi): Same.
468         (rewrite_commutative_reductions_out_of_ssa_loop): Same.
469         (rewrite_cross_bb_scalar_deps_out_of_ssa): Call scev_reset_htab
470         when something has been changed.
471         (rewrite_commutative_reductions_out_of_ssa): Same.
472
473         * gcc.dg/graphite/id-26.c: New.
474
475 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
476
477         * graphite-sese-to-poly.c (propagate_expr_outside_region): Also
478         handle the case when def is in the sese region.
479         (rewrite_close_phi_out_of_ssa): Call propagate_expr_outside_region
480         for invariant expressions.
481         (rewrite_cross_bb_phi_deps): Removed.
482         (rewrite_cross_bb_scalar_deps): Also handle GIMPLE_PHI nodes.
483         (rewrite_cross_bb_scalar_deps_out_of_ssa): Do not call
484         rewrite_cross_bb_phi_deps.
485
486 2010-07-26  Sebastian Pop  <sebastian.pop@amd.com>
487
488         * graphite-sese-to-poly.c
489         (rewrite_commutative_reductions_out_of_ssa_loop): Call
490         scev_analyzable_p only on is_gimple_reg
491
492         * gcc.dg/graphite/id-25.c: New.
493
494 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
495
496         * graphite-sese-to-poly.c (propagate_expr_outside_region): New.
497         (rewrite_close_phi_out_of_ssa): Propagate constant values or
498         parametric expressions outside the scop region.
499         (rewrite_cross_bb_scalar_deps): Same.
500         * sese.c (rename_uses): Use NULL_TREE instead of NULL for trees.
501
502         * gcc.dg/graphite/run-id-5.c: New.
503         * gcc.dg/graphite/run-id-6.c: New.
504         * gfortran.dg/graphite/id-21.f: New.
505
506 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
507
508         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Use
509         SSA_NAME_DEF_STMT only on SSA_NAMEs.
510
511         * gcc.dg/graphite/id-24.c: New.
512
513 2010-07-22  Sebastian Pop  <sebastian.pop@amd.com>
514
515         * tree-scalar-evolution.c (instantiate_scev_name): Do not
516         instantiate default definitions.
517
518 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
519
520         * graphite-scop-detection.c (is_valid_stmt_p): New.
521         (is_valid_bb_p): New.
522
523 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
524             Sebastian Pop  <sebastian.pop@amd.com>
525
526         * cfgloop.c (is_loop_exit): Renamed loop_exits_to_bb_p.
527         (loop_exits_from_bb_p): New.
528         * cfgloop.h (is_loop_exit): Renamed loop_exits_to_bb_p.
529         (loop_exits_from_bb_p): Declared.
530         * graphite-scop-detection.c (scopdet_basic_block_info): Call
531         loop_exits_to_bb_p.
532
533 2010-07-20  Vladimir Kargov  <kargov@gmail.com>
534
535         * refined-regions.c: Include tree-pass.h, cfgloop.h, gimple.h, and
536         tree-data-ref.h.
537         (dot_regions_1): New.
538         (dot_regions): New.
539         * refined-regions.h (dot_regions): Declared.
540         * Makefile.in (refined-regions.o): Update dependences.
541
542 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
543
544         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Add an
545         extra parameter for the region.  Call scev_analyzable_p.
546         (rewrite_reductions_out_of_ssa): Update call to
547         rewrite_close_phi_out_of_ssa.
548         (rewrite_cross_bb_phi_deps): Same.
549         (rewrite_commutative_reductions_out_of_ssa_loop): Add an extra
550         parameter for the region.  Call scev_analyzable_p.
551         (rewrite_commutative_reductions_out_of_ssa): Update call to
552         rewrite_commutative_reductions_out_of_ssa_loop.
553
554 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
555
556         * gcc.dg/tree-ssa/pr20742.c: New.
557
558 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
559
560         * sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
561
562         * gcc.dg/graphite/id-23.c: New.
563
564 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
565
566         * graphite-sese-to-poly.c (reduction_phi_p): Do not rewrite out of
567         SSA scalar phi nodes that can be scev_analyzable_p.
568
569         * gfortran.dg/graphite/id-20.f: Adjust testcase.
570
571 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
572
573         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Correctly
574         handle SSA_NAME_IS_DEFAULT_DEF.
575
576 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
577
578         * sese.c (rename_uses): Handl unconditionally gimple_debug statements.
579
580         * gcc.dg/graphite/pr42729.c: New.
581
582 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
583
584         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Special
585         case non close-phi nodes with one argument.
586
587 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
588
589         * sese.h (scev_analyzable_p): Scevs could be expressions without
590         chrecs and still be scev_analyzable_p.
591
592 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
593
594         * params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
595
596 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
597
598         * cfgloop.c (alloc_loop): Remove initialization of loop->single_iv.
599         * cfgloop.h (struct loop): Remove single_iv field.
600         * graphite-sese-to-poly.c (graphite_loop_normal_form): Removed.
601         (scop_canonicalize_loops): Removed.
602         (scop_ivs_can_be_represented): Do not use loop->single_iv.  Iterate
603         over all the loop phi nodes in loop->header.
604         (build_poly_scop): Remove use of scop_canonicalize_loops.
605
606 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
607
608         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): Also
609         handle GIMPLE_CALL.
610
611 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
612
613         * tree-chrec.c (chrec_apply): Should only apply to the specified
614         variable.  Also handle multivariate chains of recurrences that
615         satisfy evolution_function_is_affine_p.  Also handle CASE_CONVERT.
616
617 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
618
619         * graphite-clast-to-gimple.c (debug_clast_name_index): Removed.
620         (debug_clast_name_indexes_1): Removed.
621         (debug_clast_name_indexes): Removed.
622         (pbb_to_depth_to_oldiv): Removed.
623         (build_iv_mapping): Replace the use of rename_map with iv_map.
624         (translate_clast_user): Remove uses of rename_map.  Allocate and
625         free iv_map.
626         (translate_clast_for_loop): Remove uses of rename_map.
627         (translate_clast_for): Same.
628         (translate_clast_guard): Same.
629         (translate_clast): Same.
630         (gloog): Same.
631         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Removed.
632         * graphite-sese-to-poly.c (scev_analyzable_p): Moved...
633         * sese.c (set_rename): Now static.
634         (rename_variables_in_stmt): Removed.
635         (rename_uses): New.
636         (is_parameter): Removed.
637         (is_iv): Removed.
638         (expand_scalar_variables_call): Removed.
639         (expand_scalar_variables_ssa_name): Removed.
640         (expand_scalar_variables_expr): Removed.
641         (expand_scalar_variables_stmt): Removed.
642         (expand_scalar_variables): Removed.
643         (rename_variables): Removed.
644         (remove_condition): Removed.
645         (get_true_edge_from_guard_bb): Removed.
646         (get_false_edge_from_guard_bb): Removed.
647         (struct igp): Removed.
648         (default_before_guard): Removed.
649         (convert_for_phi_arg): Removed.
650         (add_guard_exit_phis): Removed.
651         (insert_guard_phis): Removed.
652         (graphite_copy_stmts_from_block): Now also uses iv_map and a
653         region.  Do not copy conditions.  Do not copy induction variables.
654         Call rename_uses.
655         (copy_bb_and_scalar_dependences): Allocate a local rename_map for
656         the translated statement.  Use the iv_map for the induction
657         variable renaming.
658         * sese.h (copy_bb_and_scalar_dependences): Update declaration.
659         (set_rename): Removed declaration.
660         (scev_analyzable_p): ...here.
661         * tree-chrec.c (chrec_apply_map): New.
662         * tree-chrec.h (chrec_apply_map): Declared.
663
664 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
665
666         * graphite-clast-to-gimple.c (translate_clast_for_loop): Do not call
667         insert_loop_close_phis.
668         * sese.c (name_defined_in_loop_p): Removed.
669         (expr_defined_in_loop_p): Removed.
670         (alive_after_loop): Removed.
671         (close_phi_not_yet_inserted_p): Removed.
672         (struct alep): Removed.
673         (add_loop_exit_phis): Removed.
674         (insert_loop_close_phis): Removed.
675
676 2010-07-15  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
677
678         * graphite-cloog-util.c (cloog_matrix_to_ppl_constraint): Fix flipped
679         condition.
680         * graphite-poly.c (psct_scattering_dim_for_loop_depth): Same.
681
682 2010-07-07  Sebastian Pop  <sebastian.pop@amd.com>
683
684         * gfortran.dg/graphite/id-20.f: New.
685
686 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
687
688         * graphite-cloog-util.h: Added cloog.h.
689         * graphite-blocking.c: Removed cloog.h.
690         * graphite-dependences.c: Same.
691         * graphite-interchange.c: Same.
692         * graphite-poly.c: Same.
693         * graphite-ppl.c: Same.
694         * graphite-scop-detection.c: Same.
695         * graphite-sese-to-poly.c:
696         Removed cloog.h.
697         Removed graphite-clast-to-gimple.h.
698         (check_poly_representation): Removed (unused).
699         * graphite-sese-to-poly.h
700         (check_poly_representation): Removed (unused).
701
702 2010-07-05  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
703
704         * Makefile.in
705         (OBJS-common): Added graphite-cloog-util.o.
706         (graphite-clast-to-gimple.o): Added graphite-cloog-util.h.
707         (graphite-cloog-util.o): New.
708         (graphite-ppl.o): Added graphite-cloog-util.h.
709         * graphite-clast-to-gimple.c:
710         Added graphite-cloog-util.h to include statements.
711         * graphite-cloog-util.c: New.
712         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.c.
713         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
714         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
715         (new_C_Polyhedron_from_Cloog_Matrix): Same.
716         (ppl_Constrain_System_number_of_constraints): Same.
717         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
718         (oppose_constraint): Same.
719         (cloog_matrix_to_ppl_constraint): Same.
720         (new_Constraint_System_from_Cloog_Matrix): Same.
721         (insert_constraint_into_matrix): Same. Declared static.
722         * graphite-cloog-util.h: New.
723         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved from graphite-ppl.h.
724         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
725         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
726         (new_C_Polyhedron_from_Cloog_Matrix): Same.
727         (insert_constraint_into_matrix): Same.
728         * graphite-ppl.c:
729         Added graphite-cloog-util.h to include statements.
730         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to graphite-cloog-util.c.
731         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
732         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
733         (new_C_Polyhedron_from_Cloog_Matrix): Same.
734         (insert_constraint_into_matrix): Same.
735         (ppl_Constrain_System_number_of_constraints): Same.
736         (new_Cloog_Matrix_from_ppl_Constraint_System): Same.
737         (oppose_constraint): Same.
738         (cloog_matrix_to_ppl_constraint): Same.
739         (new_Constraint_System_from_Cloog_Matrix): Same.
740         * graphite-ppl.h:
741         (new_Cloog_Matrix_from_ppl_Polyhedron): Moved to
742         graphite-cloog-util.h.
743         (new_Cloog_Domain_from_ppl_Polyhedron): Same.
744         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
745         (new_C_Polyhedron_from_Cloog_Matrix): Same.
746         (insert_constraint_into_matrix): Removed.
747
748 2010-07-04  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
749
750         * graphite-clast-to-gimple.c
751         (precision_for_value): Resolve value_* calls to matching mpz_* calls.
752         (precision_for_interval): Same.
753         (gcc_type_for_interval): Same.
754         (compute_type_for_level): Same.
755         * graphite-interchange.c
756         (lst_interchange_profitable_p): Same.
757         * graphite-poly.c
758         (psct_scattering_dim_for_loop_depth): Same.
759         * graphite-ppl.c
760         (ppl_max_for_le_pointset): Same.
761         (ppl_min_for_le_pointset): Same.
762
763 2010-06-25  Vladimir Kargov  <kargov@gmail.com>
764
765         * refined-regions.c (bb_index_compare): New.
766         (get_bbs_in_region): New.
767         (print_bbs_in_region): New.
768         (print_refined_region): Add an argument that allows to print
769         all basic blocks contained in regions.
770         (debug_refined_region): Update call to print_refined_region.
771         * refined-regions.h (print_refined_region): Update declaration.
772         (get_bbs_in_region): Declared.
773         * graphite-scop-detection.c (build_scops_new): Print the refined
774         region tree into the Grahite dump file.
775
776 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
777
778         * graphite-sese-to-poly.c (rewrite_degenerate_phi): New.
779         (rewrite_reductions_out_of_ssa): Call it for degenerate_phi_result.
780
781 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
782
783         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Call
784         rewrite_close_phi_out_of_ssa.
785
786         * gcc.dg/graphite/id-22.c: New.
787
788 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
789
790         * graphite-sese-to-poly.c (rewrite_cross_bb_phi_deps): Remove dead code.
791
792 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
793
794         * graphite-clast-to-gimple.c (build_iv_mapping): Rename map with
795         rename_map.
796         * sese.c (debug_rename_map): Same.
797         (get_rename): Same.
798         (set_rename): Same.
799         (rename_variables_in_stmt): Same.
800         (expand_scalar_variables_call): Same.
801         (expand_scalar_variables_ssa_name): Same.
802         (expand_scalar_variables_expr): Same.
803         (expand_scalar_variables_stmt): Same.
804         (expand_scalar_variables): Same.
805         (rename_variables): Same.
806         (graphite_copy_stmts_from_block): Same.
807         (copy_bb_and_scalar_dependences): Same.
808
809 2010-06-24  Sebastian Pop  <sebastian.pop@amd.com>
810
811         * graphite-clast-to-gimple.c (copy_renames): Removed.
812         (translate_clast_for): Do not call copy_renames.
813         (translate_clast_guard): Same.
814
815 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
816
817         * graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Moved up.
818         (rewrite_cross_bb_phi_deps): Split out of rewrite_cross_bb_scalar_deps.
819         (rewrite_cross_bb_scalar_deps_out_of_ssa): Run rewrite_cross_bb_phi_deps
820         before rewrite_cross_bb_scalar_deps.
821
822 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
823
824         * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa):
825         Early return in when flag_associative_math is not set.
826
827 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
828
829         * gcc.dg/graphite/run-id-2.c: Call abort.
830
831 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
832
833         * graphite-sese-to-poly.c (rewrite_phi_out_of_ssa): Always insert out
834         of SSA copies on edges except for loop->latch.
835
836 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
837
838         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps_out_of_ssa):
839         Split out of rewrite_reductions_out_of_ssa.
840         * graphite-sese-to-poly.h (rewrite_cross_bb_scalar_deps_out_of_ssa):
841         Declared.
842         * graphite.c (graphite_transform_loops): Call it.
843
844 2010-06-23  Sebastian Pop  <sebastian.pop@amd.com>
845
846         * graphite.c (graphite_transform_loops): Add two more dbg_cnt calls.
847
848 2010-06-15  Sebastian Pop  <sebastian.pop@amd.com>
849
850         * passes.c (init_optimization_passes): Add pass_graphite.
851         Schedule a pass_copy_prop before pass_graphite_transforms.
852         * timevar.def (TV_GRAPHITE): Declared.
853         * tree-pass.h (pass_graphite): Declared.
854         * tree-ssa-loop.c (pass_graphite): New.
855
856         * gcc.dg/graphite/id-20.c: New.
857
858 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
859
860         * graphite-clast-to-gimple.c (gloog): Do not pass scops in parameter.
861         Remove calls to rename_nb_iterations and rename_sese_parameters.
862         * graphite-clast-to-gimple.h (gloog): Update declaration.
863         * graphite.c (graphite_transform_loops): Update call to gloog.
864         * sese.c (rename_variables_in_expr): Removed.
865         (rename_nb_iterations): Removed.
866         (rename_sese_parameters): Removed.
867         * sese.h (rename_nb_iterations): Removed.
868         (rename_sese_parameters): Removed.
869
870 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
871
872         * graphite-clast-to-gimple.c (gloog): Remove call to
873         sese_adjust_liveout_phis.
874         * graphite-sese-to-poly.c (scev_analyzable_p): When scev returns an
875         SSA_NAME, allow it to be handled by rewrite_cross_bb_scalar_deps.
876         (rewrite_cross_bb_scalar_deps): Handle GIMPLE_PHI nodes: call
877         rewrite_phi_out_of_ssa.
878         * sese.c (get_vdef_before_sese): Removed.
879         (sese_adjust_vphi): Removed.
880         (sese_adjust_liveout_phis): Removed.
881         * sese.h (sese_adjust_liveout_phis): Removed.
882
883 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
884
885         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Pass an extra
886         argument for the place after which to insert the out of SSA copy.
887         (rewrite_close_phi_out_of_ssa): Update calls to insert_out_of_ssa_copy.
888         (rewrite_phi_out_of_ssa): Same.
889         (rewrite_cross_bb_scalar_deps): Same.
890         (insert_copyout): Removed.
891         (insert_copyin): Removed.
892         (translate_scalar_reduction_to_array): Call insert_out_of_ssa_copy and
893         insert_out_of_ssa_copy_on_edge instead of insert_copyout and
894         insert_copyin.
895
896 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
897
898         * graphite-sese-to-poly.c (build_scop_bbs): Not static anymore.
899         (rewrite_reductions_out_of_ssa): Same.
900         (rewrite_commutative_reductions_out_of_ssa): Same.
901         (build_poly_scop): Do not call these functions.
902         * graphite-sese-to-poly.h (build_poly_scop): Declared.
903         (rewrite_reductions_out_of_ssa): Declared.
904         (rewrite_commutative_reductions_out_of_ssa): Declared.
905         * graphite.c (graphite_transform_loops): Call on every scop
906         rewrite_commutative_reductions_out_of_ssa before calling
907         rewrite_reductions_out_of_ssa and build_scop_bbs.
908
909 2010-06-12  Sebastian Pop  <sebastian.pop@amd.com>
910
911         * graphite-dependences.c (dot_deps): Make system call to dotty run
912         in background.
913         (dot_deps_stmt): Same.
914         * graphite-poly.c (dot_lst): Same.
915
916 2010-06-11  Sebastian Pop  <sebastian.pop@amd.com>
917
918         * graphite-clast-to-gimple.c (gcc_type_for_interval): Do not pass
919         old_type in parameter.
920         (gcc_type_for_value): Update call to gcc_type_for_interval.
921         (compute_type_for_level_1): Renamed compute_type_for_level.
922         Update call to gcc_type_for_interval.
923
924 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
925
926         * tree-scalar-evolution.c (instantiate_scev_name): Do not fail
927         the scev analysis when the variable is not used outside the loop
928         in a close phi node: call compute_overall_effect_of_inner_loop.
929
930 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
931
932         * graphite-sese-to-poly.c (single_pred_cond): Renamed
933         single_pred_cond_non_loop_exit.  Return NULL for loop exit edges.
934         (build_sese_conditions_before): Renamed call to single_pred_cond.
935         (build_sese_conditions_after): Same.
936
937 2010-06-09  Sebastian Pop  <sebastian.pop@amd.com>
938
939         * graphite-poly.h: Fix comments and indentation.
940         * graphite-sese-to-poly.c: Same.
941         (build_sese_conditions_before): Compute stmt and gbb only when needed.
942         * tree-chrec.c: Fix comments and indentation.
943         (tree-ssa-loop-niter.c): Same.
944
945 2010-06-08  Tobias Grosser  <grosser@fim.uni-passau.de>
946
947         * refined-regions.c (create_region): Only initialize the region.
948         (find_regions_with_entry): Initialize parent relation and bbmap
949         correctly.
950         (build_regions_tree): Set outermost_region to region instead of
951         topmost_region.
952         (calculate_region_tree): Remove unneeded parameters.
953
954 2010-06-02  Tobias Grosser  <grosser@fim.uni-passau.de>
955
956         * graphite-scop-detection.c (is_scop_p): New.
957         (build_scops_new): New. A skeleton for the new scop detection.
958         (build_scops_old): Renamed from build_scops.
959         (build_scops): New version. Call the new and the old scop
960         detection.
961
962 2010-05-27  Tobias Grosser  <grosser@fim.uni-passau.de>
963             Antoniu Pop  <antoniu.pop@gmail.com>
964
965         * Makefile.in (OBJS-common): Add refined-regions.o.
966         (refined-regions.o): New.
967         (graphite-scop-detection.o): Use refined-regions.h.
968         * graphite-scop-detection.c: Include refined-regions.h
969         (build_scops): Also build the refined region tree.
970         * refined-regions.c: New. Adds an algorithm to detect refined
971         regions.
972         (print_refined_region): New.
973         (debug_refined_region): New.
974         (refined_region_contains_bb_p): New.
975         (refined_region_contains_region_p): New.
976         (is_common_df): New.
977         (struct find_regions_global_data): New.
978         (is_region): New.
979         (typedef struct bb_bb_def): New.
980         (new_bb_bb_def): New.
981         (bb_bb_map_hash): New.
982         (eq_bb_bb_map): New.
983         (find_new_bb): New.
984         (bb_reg_def): New.
985         (new_bb_reg_def): New.
986         (bb_reg_map_hash): New.
987         (eq_bb_reg_map): New.
988         (find_new_region): New.
989         (insert_new_reg): New.
990         (insert_new_bb): New.
991         (insert_shortcut): New.
992         (get_next_postdom): New.
993         (create_region): New.
994         (find_regions_with_entry): New.
995         (find_regions_adc): New.
996         (find_regions): New.
997         (get_topmost_parent): New.
998         (build_regions_tree): New.
999         (calculate_region_tree): New.
1000         (free_region_tree): New.
1001         * refined-regions.h: New.
1002         (struct refined_region): New.
1003         (calculate_region_tree): New.
1004         (free_region_tree): New.
1005         (refined_region_contains_bb_p): New.
1006         (refined_region_contains_region_p): New.
1007         (print_refined_region): New.
1008         (debug_refined_region): New.
1009
1010 2010-05-26  Sebastian Pop  <sebastian.pop@amd.com>
1011
1012         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1013         size_one_node.
1014
1015 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1016
1017         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Fix
1018         type of integer_one_node for fold_build of POINTER_PLUS_EXPR.
1019
1020 2010-05-07  Sebastian Pop  <sebastian.pop@amd.com>
1021
1022         * graphite-sese-to-poly.c (loop_entry_phi_arg): Renamed
1023         phi_arg_in_outermost_loop.
1024         (remove_simple_copy_phi): Call phi_arg_in_outermost_loop.
1025         (remove_invariant_phi): Same.
1026
1027 2010-04-12  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1028
1029         * graphite-blocking.c
1030         (pbb_strip_mine_profitable_p): Replace Value with mpz_t.
1031         * graphite-clast-to-gimple.c
1032         (clast_to_gcc_expression): Same.
1033         (precision_for_value): Same.
1034         (precision_for_interval): Same.
1035         (gcc_type_for_interval): Same.
1036         (graphite_create_new_guard): Same.
1037         (compute_bounds_for_level): Same.
1038         (graphite_create_new_loop_guard): Same.
1039         * graphite-interchange.c
1040         (build_linearized_memory_access): Same.
1041         (pdr_stride_in_loop): Same.
1042         (memory_strides_in_loop_1): Same.
1043         (memory_strides_in_loop): Same.
1044         (extend_scattering): Same.
1045         (psct_scattering_dim_for_loop_depth): Same.
1046         (pbb_number_of_iterations): Same.
1047         * graphite-poly.h
1048         (debug_iteration_domains): Same.
1049         * graphite-ppl.c
1050         (new_Cloog_Domain_from_ppl_Pointset_Powerset): Same.
1051         (ppl_set_inhomogeneous_gmp): Same.
1052         (ppl_strip_loop): Same.
1053         (ppl_lexico_compare_linear_expressions): Same.
1054         (ppl_read_polyhedron_matrix): Same.
1055         (ppl_max_for_le_pointset): Same.
1056         * graphite-ppl.h
1057         (ppl_read_polyhedron_matrix): Same.
1058         (tree_int_to_gmp): Same.
1059         (gmp_cst_to_tree): Same.
1060         (ppl_set_inhomogeneous): Same.
1061         (ppl_set_inhomogeneous_tree): Same.
1062         (ppl_set_coef): Same.
1063         (ppl_set_coef_tree): Same.
1064         * graphite-sese-to-poly.c
1065         (build_pbb_scattering_polyhedrons): Same.
1066         (build_scop_scattering): Same.
1067         (scan_tree_for_params_right_scev): Same.
1068         (scan_tree_for_params): Same.
1069         (find_params_in_bb): Same.
1070         (find_scop_parameters): Same.
1071         (add_upper_bounds_from_estimated_nit): Same.
1072         (build_loop_iteration_domains): Same.
1073         (add_condition_to_domain): Same.
1074         (pdr_add_memory_accesses): Same.
1075
1076 2010-04-11  Andreas Simbuerger  <simbuerg@fim.uni-passau.de>
1077
1078         * graphite-blocking.c (pbb_strip_mine_profitable_p): Resolve
1079         CLooG's value_* macros to their respective mpz_* counterparts.
1080         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Same.
1081         (graphite_create_new_loop_guard): Same.
1082         * graphite-interchange.c (build_linearized_memory_access): Same.
1083         (pdr_stride_in_loop): Same.
1084         (memory_strides_in_loop_1): Same.
1085         (1st_interchange_profitable_p): Same.
1086         * graphite-poly.c (extend_scattering): Same.
1087         (psct_scattering_dim_for_loop_depth): Same.
1088         (pbb_number_of_iterations): Same.
1089         (pbb_number_of_iterations_at_time): Same.
1090         * graphite-poly.h (new_1st_loop): Same.
1091         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Same.
1092         (oppose_constraint): Same.
1093         (insert_constraint_into_matrix): Same.
1094         (ppl_set_inhomogeneous_gmp): Same.
1095         (ppl_set_coef_gmp): Same.
1096         (ppl_strip_loop): Same.
1097         (ppl_lexico_compare_linear_expressions): Same.
1098         (ppl_max_for_le_pointset): Same.
1099         (ppl_min_for_le_pointset): Same.
1100         (ppl_build_realtion): Same.
1101         * graphite-ppl.h (gmp_cst_to_tree): Same.
1102         (ppl_set_inhomogeneous): Same.
1103         (ppl_set_inhomogeneous_tree): Same.
1104         (ppl_set_coef): Same.
1105         (ppl_set_coef_tree): Same.
1106         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Same.
1107         (build_scop_scattering): Same.
1108         (add_value_to_dim): Same.
1109         (scan_tree_for_params_right_scev): Same.
1110         (scan_tree_for_params_int): Same.
1111         (scan_tree_for_params): Same.
1112         (find_params_in_bb): Same.
1113         (find_scop_parameters): Same.
1114         (add_upper_bounds_from_estimated_nit): Same.
1115         (build_loop_iteration_domains): Same.
1116         (create_linear_expr_from_tree): Same.
1117         (add_condition_to_domain): Same.
1118         (pdr_add_memory_accesses): Same.
1119
1120 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1121
1122         PR middle-end/43519
1123         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1124         lang_hooks.types.type_for_size instead of build_nonstandard_integer_type.
1125         When converting an unsigned type to signed, double its precision.
1126         (gcc_type_for_interval): Use lang_hooks.types.type_for_size.
1127         (gcc_type_for_iv_of_clast_loop): Call max_signed_precision_type.
1128         (graphite_create_new_loop_guard): When ub + 1 wraps around, use lb <= ub.
1129
1130 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1131
1132         PR middle-end/43519
1133         * graphite-clast-to-gimple.c (max_signed_precision_type): Use
1134         build_nonstandard_integer_type.
1135         (gcc_type_for_interval): Same.
1136
1137 2010-04-05  Sebastian Pop  <sebastian.pop@amd.com>
1138
1139         PR middle-end/43519
1140         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Use
1141         POINTER_PLUS_EXPR for pointer types.
1142
1143         * gcc.dg/graphite/id-19.c: New.
1144
1145 2010-04-04  Sebastian Pop  <sebastian.pop@amd.com>
1146
1147         PR middle-end/43519
1148         * Makefile.in (graphite-clast-to-gimple.o): Depends on langhooks.h.
1149         * graphite-clast-to-gimple.c: Include langhooks.h.
1150         (max_signed_precision_type): New.
1151         (max_precision_type): Takes two types as arguments.
1152         (precision_for_value): New.
1153         (precision_for_interval): New.
1154         (gcc_type_for_interval): New.
1155         (gcc_type_for_value): New.
1156         (gcc_type_for_clast_term): New.
1157         (gcc_type_for_clast_red): New.
1158         (gcc_type_for_clast_bin): New.
1159         (gcc_type_for_clast_expr): Split up into several functions.
1160         (gcc_type_for_clast_eq): Rewritten.
1161         (compute_bounds_for_level): New.
1162         (compute_type_for_level_1): New.
1163         (compute_type_for_level): New.
1164         (gcc_type_for_cloog_iv): Removed.
1165         (gcc_type_for_iv_of_clast_loop): Rewritten.
1166         (graphite_create_new_loop): Compute the lower and upper bound types
1167         with gcc_type_for_clast_expr.
1168         (graphite_create_new_loop_guard): Same.
1169         (find_cloog_iv_in_expr): Removed.
1170         (compute_cloog_iv_types_1): Removed.
1171         (compute_cloog_iv_types): Removed.
1172         (gloog): Do not call compute_cloog_iv_types.
1173         * graphite-sese-to-poly.c (new_gimple_bb): Do not initialize
1174         GBB_CLOOG_IV_TYPES.
1175         (free_data_refs_aux): Do not free GBB_CLOOG_IV_TYPES.
1176         * sese.h (struct gimple_bb): Removed field cloog_iv_types.
1177         (GBB_CLOOG_IV_TYPES): Removed.
1178
1179         * gcc.dg/graphite/run-id-pr42644.c: Call abort.
1180
1181 2010-04-02  Sebastian Pop  <sebastian.pop@amd.com>
1182
1183         Reverted this commit: as at this point the loop closed SSA form
1184         is under a canonical form respecting the single argument condition.
1185         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1186         close phi nodes may have more than one argument.
1187
1188 2010-04-01  Sebastian Pop  <sebastian.pop@amd.com>
1189
1190         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Assert that
1191         gimple_phi_num_args of the loop close SSA phi node is equal to 1.
1192         (detect_commutative_reduction): Same.
1193
1194 2010-03-31  Sebastian Pop  <sebastian.pop@amd.com>
1195
1196         * graphite-sese-to-poly.c (scalar_close_phi_node_p): Loop
1197         close phi nodes may have more than one argument.
1198
1199 2010-03-30  Richard Guenther  <rguenther@suse.de>
1200             Zdenek Dvorak  <ook@ucw.cz>
1201             Sebastian Pop  <sebastian.pop@amd.com>
1202
1203         PR middle-end/43464
1204         * tree-ssa-copy.c (init_copy_prop): Handle loop close phi nodes
1205         with multiple arguments.
1206         (execute_copy_prop): Remove call to rewrite_into_loop_closed_ssa.
1207
1208 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1209
1210         * graphite-dependences.c (print_pddr): Call print_pdr with an
1211         extra argument.
1212         * graphite-poly.c (debug_pdr): Add an extra argument for the
1213         verbosity level.
1214         (print_pdr): Same.
1215         (print_pbb_domain): Same.
1216         (print_pbb): Same.
1217         (print_scop_context): Same.
1218         (print_scop): Same.
1219         (print_cloog): Same.
1220         (debug_pbb_domain): Same.
1221         (debug_pbb): Same.
1222         (print_pdrs): Same.
1223         (debug_pdrs): Same.
1224         (debug_scop_context): Same.
1225         (debug_scop): Same.
1226         (debug_cloog): Same.
1227         (print_scop_params): Same.
1228         (debug_scop_params): Same.
1229         (print_iteration_domain): Same.
1230         (print_iteration_domains): Same.
1231         (debug_iteration_domain): Same.
1232         (debug_iteration_domains): Same.
1233         (print_scattering_function): Same.
1234         (print_scattering_functions): Same.
1235         (debug_scattering_function): Same.
1236         (debug_scattering_functions): Same.
1237         * graphite-poly.h (debug_pdr): Update declaration.
1238         (print_pdr): Same.
1239         (print_pbb_domain): Same.
1240         (print_pbb): Same.
1241         (print_scop_context): Same.
1242         (print_scop): Same.
1243         (print_cloog): Same.
1244         (debug_pbb_domain): Same.
1245         (debug_pbb): Same.
1246         (print_pdrs): Same.
1247         (debug_pdrs): Same.
1248         (debug_scop_context): Same.
1249         (debug_scop): Same.
1250         (debug_cloog): Same.
1251         (print_scop_params): Same.
1252         (debug_scop_params): Same.
1253         (print_iteration_domain): Same.
1254         (print_iteration_domains): Same.
1255         (debug_iteration_domain): Same.
1256         (debug_iteration_domains): Same.
1257         (print_scattering_function): Same.
1258         (print_scattering_functions): Same.
1259         (debug_scattering_function): Same.
1260         (debug_scattering_functions): Same.
1261
1262 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1263
1264         * graphite-poly.c (print_scattering_function_1): New.
1265         (print_scattering_function): Call it.
1266         (print_scop_params): Remove spaces at the end of lines.
1267         (print_cloog): New.
1268         (debug_cloog): New.
1269         * graphite-poly.h (print_cloog): Declared.
1270         (debug_cloog): Declared.
1271
1272 2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
1273
1274         * tree-ssa-copy.c: Revert this previous change:
1275         (init_copy_prop): Loop closed phi nodes cancontain more than one
1276         argument.
1277         (execute_copy_prop): Revert the previous change: do not call
1278         rewrite_into_loop_closed_ssa.
1279
1280 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1281             Richard Guenther  <rguenther@suse.de>
1282
1283         PR middle-end/43464
1284         * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
1285         contain more than one argument.
1286         (execute_copy_prop): Revert the previous change: do not call
1287         rewrite_into_loop_closed_ssa.
1288
1289         * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
1290         * gcc.dg/graphite/id-pr43464-1.c: New.
1291
1292 2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
1293
1294         PR middle-end/43464
1295         * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
1296         and verify_loop_closed_ssa when copy prop is executed in the LNO.
1297
1298         * gcc.dg/graphite/id-pr43464.c: New.
1299
1300 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1301
1302         * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
1303         in loop->header.
1304         * tree-flow.h (canonicalize_loop_ivs): Updated declaration.
1305         * tree-parloops.c (gen_parallel_loop): Add the IV bump in loop->latch.
1306         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Add a new parameter
1307         to switch between adding the IV bump in loop->latch or in loop->header.
1308
1309 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1310
1311         * passes.c (init_optimization_passes): Add pass_copy_prop
1312         after Graphite.
1313
1314 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
1315
1316         * graphite-poly.c (print_scattering_function): Pretty print following
1317         the scoplib format.
1318         (print_pdr): Same.
1319         (print_pbb_domain): Same.
1320         (dump_gbb_cases): Same.
1321         (dump_gbb_conditions): Same.
1322         (print_pdrs): Same.
1323         (print_pbb): Same.
1324         (print_scop_params): Same.
1325         (print_scop_context): Same.
1326         (print_scop): Same.
1327         (print_pbb_body): New.
1328         (lst_indent_to): New.
1329         (print_lst): Start new lines with a #.
1330         * graphite-poly.h (pbb_bb): New.
1331         (pbb_index): Use pbb_bb.
1332         * graphite-ppl.c (ppl_print_powerset_matrix): Print the number of
1333         disjuncts.
1334         * tree-data-ref.c (dump_data_reference): Start new lines with a #.
1335
1336 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1337
1338         PR middle-end/43351
1339         * gcc.dg/graphite/id-pr43351.c
1340
1341 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1342
1343         PR middle-end/43354
1344         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Do not
1345         call insert_out_of_ssa_copy for default definitions.
1346         * gfortran.dg/graphite/id-pr43354.f: New.
1347
1348 2010-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1349
1350         PR middle-end/43349
1351         * gfortran.dg/graphite/pr43349.f: New.
1352
1353 2010-03-11  Sebastian Pop  <sebastian.pop@amd.com>
1354
1355         * graphite-clast-to-gimple.c (my_long_long): Defined.
1356         (gcc_type_for_cloog_iv): Use it instead of long_long_integer_type_node.
1357         * graphite-sese-to-poly.c (my_long_long): Defined.
1358         (scop_ivs_can_be_represented): Use it.
1359
1360 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1361
1362         * doc/invoke.texi: Fix documentation of graphite-max-nb-scop-params,
1363         graphite-max-bbs-per-function, and loop-block-tile-size.
1364         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Replace "maximal"
1365         with "maximum".
1366         (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Same.
1367
1368 2010-03-10  Sebastian Pop  <sebastian.pop@amd.com>
1369
1370         * graphite-clast-to-gimple.c (gcc_type_for_iv_of_clast_loop): Remove
1371         forward declaration.
1372         * graphite-sese-to-poly.c (reduction_phi_p): Remove FIXME comment.
1373         (add_upper_bounds_from_estimated_nit): New.
1374         (build_loop_iteration_domains): Use it.
1375
1376 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1377
1378         * doc/invoke.texi (PARAM_LOOP_BLOCK_TILE_SIZE): Document.
1379
1380 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1381
1382         PR middle-end/43306
1383         * tree-chrec.c (evolution_function_right_is_integer_cst): CHREC_RIGHT
1384         should be an INTEGER_CST.  Also handle CASE_CONVERT.
1385         * gcc.dg/graphite/pr43306.c: New.
1386
1387 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1388
1389         * graphite.c (graphite_initialize): To bound the number of bbs per
1390         function, use PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION.
1391         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Declared.
1392         * doc/invoke.texi: Document it.
1393
1394 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1395
1396         * graphite-sese-to-poly.c (build_poly_scop): Do not return bool.
1397         * graphite-sese-to-poly.h (build_poly_scop): Same.
1398
1399 2010-03-09  Sebastian Pop  <sebastian.pop@amd.com>
1400
1401         * graphite-sese-to-poly.c (build_poly_scop): Limit scops following
1402         the number of parameters in the scop.  Use as an upper bound
1403         PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS.
1404         * params.def (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Declared.
1405         * doc/invoke.texi: Document it.
1406
1407 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1408
1409         * graphite-sese-to-poly.c (add_param_constraints): Use
1410         lower_bound_in_type and upper_bound_in_type.
1411
1412 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1413
1414         * graphite-sese-to-poly.c (add_param_constraints): Use sizetype
1415         instead of unsigned_type_node.
1416
1417 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1418             Reza Yazdani  <reza.yazdani@amd.com>
1419
1420         PR middle-end/43065
1421         * graphite-sese-to-poly.c (add_param_constraints): Insert bounds
1422         on pointer type parameters.
1423
1424         * gcc.dg/graphite/run-id-4.c: New.
1425
1426 2010-03-05  Sebastian Pop  <sebastian.pop@amd.com>
1427
1428         PR middle-end/43065
1429         * gcc.dg/graphite/run-id-3.c: New.
1430
1431 2010-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
1432             Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1433
1434         * graphite-clast-to-gimple.c (clast_to_gcc_expression): Also
1435         handle conversions from pointer to integers.
1436         (gcc_type_for_cloog_iv): Choose the smalles signed integer as an
1437         induction variable, to be able to work with code generated by CLooG.
1438         * graphite-sese-to-poly.c (scop_ivs_can_be_represented): New.
1439         (build_poly_scop): Bail out if we cannot codegen a loop.
1440
1441 2010-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
1442
1443         * graphite-clast-to-gimple.c (translate_clast): Do not short-cut
1444         code generation with gloog_error.
1445
1446 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1447
1448         * sese.c (expand_scalar_variables_ssa_name): Add new argument for type.
1449         Call fold_convert on all the returned values.
1450         (expand_scalar_variables_expr): Pass to expand_scalar_variables_ssa_name
1451         the type of the resulting expression.
1452
1453 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1454
1455         * graphite-ppl.c (ppl_min_for_le_polyhedron): Renamed
1456         ppl_min_for_le_pointset.  Use ppl_Pointset_Powerset_C_Polyhedron_minimize.
1457         * graphite-ppl.h (ppl_min_for_le_polyhedron): Update declaration.
1458
1459 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1460
1461         * graphite-dependences.c (map_into_dep_poly): Removed.
1462         (dependence_polyhedron_1): Use combine_context_id_scat.
1463
1464 2010-03-04  Sebastian Pop  <sebastian.pop@amd.com>
1465
1466         * graphite-poly.h (struct poly_scattering): Add layout documentation.
1467         (struct poly_bb): Same.
1468         (combine_context_id_scat): New.
1469
1470 2010-03-02  Sebastian Pop  <sebastian.pop@amd.com>
1471
1472         PR middle-end/42326
1473         * sese.c (name_defined_in_loop_p): Return false for default
1474         definitions.
1475
1476         * gcc.dg/graphite/pr42326.c: New.
1477
1478 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1479
1480         * graphite-clast-to-gimple.c (find_cloog_iv_in_expr): Simplify
1481         and clean up the logic.
1482
1483 2010-02-23  Sebastian Pop  <sebastian.pop@amd.com>
1484
1485         * graphite-sese-to-poly.c (add_param_constraints): Enabled: remove
1486         early return.
1487
1488 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1489
1490         PR middle-end/43083
1491         * graphite-scop-detection.c (create_single_exit_edge): Move
1492         the call to find_single_exit_edge to....
1493         (create_sese_edges): ...here.  Don't handle multiple edges
1494         exiting the function.
1495         (build_graphite_scops): Don't handle multiple edges
1496         exiting the function.
1497
1498         * gcc.dg/graphite/pr43083.c: New.
1499
1500 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1501
1502         PR middle-end/43097
1503         * sese.c (get_rename): Assert that old_name is an SSA_NAME.
1504         (rename_variables_in_stmt): Continue when the use is not an SSA_NAME.
1505
1506         * gfortran.dg/graphite/pr43097.f: New.
1507
1508 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1509             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1510
1511         PR middle-end/43140
1512         * g++.dg/graphite/pr41305.C: Add -Wno-conversion-null.
1513
1514 2010-02-22  Sebastian Pop  <sebastian.pop@amd.com>
1515
1516         PR middle-end/43026
1517         * sese.c (expand_scalar_variables_expr): Handle COMPONENT_REF.
1518
1519         * g++.dg/graphite/pr43026.C: New.
1520
1521 2010-02-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1522
1523         * Merge from mainline (154736:156693).
1524
1525 2010-02-11  Sebastian Pop  <sebastian.pop@amd.com>
1526
1527         PR middle-end/43012
1528         * gcc.dg/graphite/pr43012.c: New.
1529
1530 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1531
1532         * graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
1533 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1534
1535         * g++.dg/graphite/pr42930.C: New.
1536
1537 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1538
1539         PR middle-end/42930
1540         * graphite-scop-detection.c (graphite_can_represent_scev): Call
1541         graphite_can_represent_init for MULT_EXPR.
1542
1543 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1544
1545         PR middle-end/42914
1546         PR middle-end/42530
1547         * graphite-sese-to-poly.c (remove_phi): New.
1548         (translate_scalar_reduction_to_array): Call remove_phi.
1549
1550         * gcc.dg/graphite/pr42530.c: New.
1551         * gcc.dg/graphite/pr42914.c: New.
1552
1553 2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>
1554
1555         PR middle-end/42771
1556         * graphite-clast-to-gimple.c (gloog): Call rename_sese_parameters.
1557         * graphite-clast-to-gimple.h (gloog): Update declaration.
1558         * graphite-poly.c (new_scop): Clear POLY_SCOP_P.
1559         * graphite-poly.h (struct poly_bb): Add missing comments.
1560         (struct scop): Add poly_scop_p field.
1561         (POLY_SCOP_P): New.
1562         * graphite-sese-to-poly.c (build_poly_scop): Set POLY_SCOP_P.
1563         * graphite.c (graphite_transform_loops): Build the polyhedral
1564         representation for each scop before code generation.
1565         * sese.c (rename_variables_in_operand): Removed.
1566         (rename_variables_in_expr): Return the renamed expression.
1567         (rename_sese_parameters): New.
1568         * sese.h (rename_sese_parameters): Declared.
1569
1570         * gcc.dg/graphite/pr42771.c: New.
1571
1572 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1573
1574         * gcc.dg/graphite/block-0.c: Call abort for runtime test.  Always
1575         return 0 from main.
1576         * gcc.dg/graphite/block-1.c: Same.
1577         * gcc.dg/graphite/block-3.c: Same.
1578         * gcc.dg/graphite/block-4.c: Same.
1579         * gcc.dg/graphite/block-5.c: Same.
1580         * gcc.dg/graphite/block-6.c: Same.
1581         * gcc.dg/graphite/block-7.c: Same.
1582         * gcc.dg/graphite/interchange-0.c: Same.
1583         * gcc.dg/graphite/interchange-1.c: Same.
1584         * gcc.dg/graphite/interchange-10.c: Same.
1585         * gcc.dg/graphite/interchange-11.c: Same.
1586         * gcc.dg/graphite/interchange-12.c: Same.
1587         * gcc.dg/graphite/interchange-2.c: Same.
1588         * gcc.dg/graphite/interchange-3.c: Same.
1589         * gcc.dg/graphite/interchange-4.c: Same.
1590         * gcc.dg/graphite/interchange-5.c: Same.
1591         * gcc.dg/graphite/interchange-6.c: Same.
1592         * gcc.dg/graphite/interchange-7.c: Same.
1593         * gcc.dg/graphite/interchange-8.c: Same.
1594         * gcc.dg/graphite/interchange-9.c: Same.
1595         * gcc.dg/graphite/interchange-mvt.c: Same.
1596
1597 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1598
1599         * gfortran.dg/graphite/id-19.f: New.
1600         * gfortran.dg/graphite/pr14741.f90: New.
1601         * gfortran.dg/graphite/pr41924.f90: New.
1602         * gfortran.dg/graphite/run-id-2.f90: New.
1603
1604 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1605
1606         PR middle-end/42988
1607         * graphite-dependences.c (dependence_polyhedron): Set PDDR_KIND
1608         to unknown_dependence.
1609         (graphite_legal_transform_dr): Handle the unknown_dependence.
1610         (graphite_carried_dependence_level_k): Same.
1611
1612 2010-02-07  Sebastian Pop  <sebastian.pop@amd.com>
1613
1614         * ChangeLog.graphite: Remove testsuite/ or gcc/testsuite/.
1615
1616 2010-02-05  Sebastian Pop  <sebastian.pop@amd.com>
1617             Konrad Trifunovic  <konrad.trifunovic@inria.fr>
1618
1619         PR middle-end/42637
1620         * graphite-dependences.c (build_lexicographical_constraint): Return
1621         a union of dependence polyhedra.
1622         (dependence_polyhedron_1): Adapt for build_lexicographical_constraint.
1623
1624         * gcc.dg/graphite/block-0.c: Enable runtime check.  XFAILed.
1625         * gcc.dg/graphite/block-4.c: Same.
1626         * gcc.dg/graphite/block-7.c: Same.
1627         * gcc.dg/graphite/interchange-12.c: Same.
1628         * gcc.dg/graphite/interchange-mvt.c: Same.
1629         * gfortran.dg/graphite/interchange-1.f: XFAILed.
1630         * gfortran.dg/graphite/interchange-3.f90: XFAILed.
1631         * gfortran.dg/graphite/run-id-1.f: New testcase for PR42637.
1632
1633 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1634
1635         * gcc.dg/graphite/interchange-12.c: Return 0 to avoid
1636         the execution check to FAIL.  This testcase is miscompiled by Graphite
1637         and the check should be re-enabled.
1638         * gcc.dg/graphite/interchange-mvt.c: Same.
1639         * gcc.dg/graphite/block-0.c: Same.
1640         * gcc.dg/graphite/block-4.c: Same.
1641         * gcc.dg/graphite/block-7.c: Same.
1642
1643 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1644
1645         * gcc.dg/graphite/interchange-mvt.c: Un-XFAILed.
1646         * gcc.dg/graphite/scop-0.c: Fix spaces.
1647         * gfortran.dg/graphite/block-1.f90: Rewrite expected output.
1648         * gfortran.dg/graphite/block-2.f: Same.
1649         * gfortran.dg/graphite/block-3.f90: Same.
1650         * gfortran.dg/graphite/block-4.f90: Same.
1651         * gfortran.dg/graphite/interchange-1.f: Un-XFAILed.
1652         * gfortran.dg/graphite/interchange-3.f90: Un-XFAILed.
1653
1654 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1655
1656         * graphite-dependences.c (new_poly_ddr): Initialize PDDR_KIND and
1657         PDDR_ORIGINAL_SCATTERING_P.
1658         (pddr_is_empty): Rewritten.
1659         (print_dependence_polyhedron_layout): New.
1660         (print_pddr): New.
1661         (debug_pddr): New.
1662         (build_alias_set_powerset): Moved up.
1663         (poly_drs_may_alias_p): Moved up.
1664         (lexicographically_gt_p): Removed.
1665         (build_lexicographically_gt_constraint): Renamed
1666         build_lexicographical_constraint, reimplemented.
1667         (dependence_polyhedron_1): Simplified parameters.
1668         (dependence_polyhedron): Same.  Keep along empty PDDRs
1669         to make efficient use of the cache.
1670         (reduction_dr_p): Compute the PBBs don't pass them as parameters.
1671         (graphite_legal_transform_dr): Rewritten.
1672         (graphite_legal_transform_bb): Pass fewer arguments to
1673         graphite_legal_transform_dr.
1674         (graphite_carried_dependence_level_k): Simplified implementation.
1675         (dot_original_deps_stmt_1): Call dependence_polyhedron.
1676         (dot_transformed_deps_stmt_1): Same.
1677         (dot_original_deps): Same.
1678         (dot_transformed_deps): Same.
1679         * graphite-dependences.h (struct poly_ddr): Added a new field
1680         original_scattering_p.
1681         (PDDR_ORIGINAL_SCATTERING_P): New.
1682         (print_pddr): Declared.
1683         (debug_pddr): Declared.
1684         * graphite-ppl.c: Clarify comment.
1685         * sese.h (print_gimple_bb): Removed unused declaration.
1686         (debug_gbb): Same.
1687
1688 2010-02-03  Sebastian Pop  <sebastian.pop@amd.com>
1689
1690         * g++.dg/graphite/graphite.exp: Rewritten.
1691         * gcc.dg/graphite/graphite.exp: Rewritten.
1692         * gfortran.dg/graphite/graphite.exp: Rewritten.
1693         * gcc.dg/graphite/block-0.c: Added runtime test.
1694         * gcc.dg/graphite/block-1.c: Same.
1695         * gcc.dg/graphite/block-3.c: Same.
1696         * gcc.dg/graphite/block-4.c: Same.
1697         * gcc.dg/graphite/block-5.c: Same.
1698         * gcc.dg/graphite/block-6.c: Same.
1699         * gcc.dg/graphite/block-7.c: Same.
1700         * gcc.dg/graphite/interchange-0.c: Same.
1701         * gcc.dg/graphite/interchange-1.c: Same.
1702         * gcc.dg/graphite/interchange-10.c: Same.
1703         * gcc.dg/graphite/interchange-11.c: Same.
1704         * gcc.dg/graphite/interchange-12.c: Same.
1705         * gcc.dg/graphite/interchange-2.c: Same.
1706         * gcc.dg/graphite/interchange-3.c: Same.
1707         * gcc.dg/graphite/interchange-4.c: Same.
1708         * gcc.dg/graphite/interchange-5.c: Same.
1709         * gcc.dg/graphite/interchange-6.c: Same.
1710         * gcc.dg/graphite/interchange-7.c: Same.
1711         * gcc.dg/graphite/interchange-8.c: Same.
1712         * gcc.dg/graphite/interchange-9.c: Same.
1713         * gcc.dg/graphite/interchange-mvt.c: Same.
1714         * gcc.dg/graphite/run-id-2.c: Remove useless dg-do run.
1715
1716 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1717
1718         * graphite-scop-detection.c (dot_all_scops): Make calls to dot run in
1719           background.
1720
1721 2010-01-22  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
1722
1723         * common.opt: Add -fgraphite-cloog-opts.
1724         * graphite-clast-to-gimple.c (set_cloog_options): Same.
1725         * opts.c (decode_options): Same.
1726
1727 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1728
1729         * gcc.dg/graphite/id-17.c: New.
1730         * gcc.dg/graphite/pr41888.c: New.
1731         * gcc.dg/graphite/scop-22.c: New.
1732         * gfortran.dg/graphite/pr40982.f90: New.
1733
1734 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1735
1736         * graphite-dependences.c: Clarify comments.
1737         (build_pddr): Add an extra parameter direction.
1738         (graphite_legal_transform_dr): Use build_pddr.
1739         (dot_original_deps_stmt_1): Update use of build_pddr.
1740         (dot_transformed_deps_stmt_1): Same.
1741         (dot_original_deps): Same.
1742         (dot_transformed_deps): Same.
1743
1744         * gcc.dg/graphite/interchange-12.c: New.
1745         * gcc.dg/graphite/block-7.c: New.
1746
1747 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1748
1749         * graphite-dependences.c (pddr_original_scattering): Renamed build_pddr.
1750         (pddr_transformed_scattering): Removed.
1751         (graphite_legal_transform_dr): Use build_pddr.
1752         (dot_original_deps_stmt_1): Same.
1753         (dot_transformed_deps_stmt_1): Same.
1754         (dot_original_deps): Same.
1755         (dot_transformed_deps): Same.
1756
1757 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1758
1759         * graphite-dependences.c (lexicographically_gt_p): Add comments.
1760         (build_lexicographically_gt_constraint): Same.
1761         (dependence_polyhedron_1): Same.
1762         (dependence_polyhedron): Same.
1763
1764 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1765
1766         * graphite-dependences.c (build_pairwise_scheduling_equality): Removed.
1767         (build_pairwise_scheduling_inequality): Renamed build_pairwise_scheduling.
1768         (lexicographically_gt_p): Change type of direction to int.
1769         (build_lexicographically_gt_constraint): Same.
1770         (dependence_polyhedron_1): Same.
1771         (dependence_polyhedron): Same.
1772         (pddr_original_scattering): Use integers for direction.
1773         (pddr_transformed_scattering): Same.
1774         (graphite_legal_transform_dr): Same.
1775         (graphite_carried_dependence_level_k): Same.
1776
1777 2010-01-20  Sebastian Pop  <sebastian.pop@amd.com>
1778
1779         * graphite-dependences.c (build_pairwise_constraint): Renamed
1780         ppl_build_relation.  Moved...
1781         (dr_equality_constraints): Use ppl_build_relation.
1782         (build_pairwise_scheduling_equality): Same.
1783         (build_pairwise_scheduling_inequality): Same.
1784         * graphite-ppl.c (ppl_build_relation): ...here.
1785         * graphite-ppl.h (ppl_build_relation): Declared.
1786
1787 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1788
1789         PR middle-end/42681
1790         * graphite-clast-to-gimple.c (gloog_error): New static variable.
1791         (clast_to_gcc_expression): Do not build MULT_EXPR of POINTER_TYPE_P.
1792         Set gloog_error when such an expression failed to be built.
1793         (translate_clast): Early return when gloog_error is set.
1794         (gloog): Clear gloog_error.  When gloog_error is set, call
1795         set_ifsese_condition to enable the original code.  Return the status
1796         of the code generation based on gloog_error.
1797         * sese.c (set_ifsese_condition): New.
1798         * sese.h (set_ifsese_condition): Declared.
1799
1800         * g++.dg/graphite/pr42681.C: New.
1801
1802 2010-01-14  Sebastian Pop  <sebastian.pop@amd.com>
1803
1804         PR middle-end/42732
1805         * graphite-clast-to-gimple.c (gloog): Call scev_reset_htab and
1806         rename_nb_iterations.
1807         * sese.c (rename_variables_in_operand): New.
1808         (rename_variables_in_expr): New.
1809         (rename_nb_iterations): New.
1810         (sese_adjust_liveout_phis): Update the rename_map.
1811         * sese.h (rename_nb_iterations): Declared.
1812         * tree-scalar-evolution.c (scev_reset_htab): New.
1813         (scev_reset): Call scev_reset_htab.
1814         * tree-scalar-evolution.h (scev_reset_htab): Declared.
1815
1816         * gfortran.dg/graphite/pr42732.f: New.
1817
1818 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1819
1820         PR middle-end/42393
1821         * graphite-clast-to-gimple.c: Fix formatting.
1822         * sese.c (defined_in_loop_p): Renamed name_defined_in_loop_p.
1823         (expr_defined_in_loop_p): New.
1824         (add_loop_exit_phis): Also handle full expressions: remove from
1825         the rename_map the expressions defined in the loop that we're closing.
1826
1827         * gfortran.dg/graphite/pr42393-1.f90: New.
1828         * gfortran.dg/graphite/pr42393.f90: Add new flags
1829         -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine to also
1830         make this testcase useful in the Graphite branch.
1831
1832 2010-01-08  Sebastian Pop  <sebastian.pop@amd.com>
1833
1834         * graphite-scop-detection.c (exclude_component_ref): Removed.
1835         (is_simple_operand): Removed.
1836         (stmt_simple_for_scop_p): Remove use of is_simple_operand.
1837
1838 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1839
1840         PR middle-end/42221
1841         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1842         the array indexing of ADDR_EXPRs.
1843
1844         * gcc.dg/graphite/pr42221.c: New.
1845
1846 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1847
1848         PR middle-end/42521
1849         * graphite.c (graphite_finalize): Call scev_reset.
1850         (graphite_transform_loops): Do not call scev_reset between the code
1851         generation of scops.
1852
1853         * gcc.dg/graphite/pr42521.c: New.
1854
1855 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1856
1857         * graphite-interchange.c (memory_stride_in_loop): Renamed
1858         pdr_stride_in_loop.
1859         (memory_strides_in_loop): Renamed memory_strides_in_loop_1.
1860         (memory_strides_in_loop): Memoize the memory strides per loop.
1861         (lst_interchange_profitable_p): Do not initialize to zero the memory
1862         strides.
1863         * graphite-poly.h (struct lst): Add a field memory_strides.
1864         (LST_LOOP_MEMORY_STRIDES): New.
1865         (new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
1866         (free_lst): Clear LST_LOOP_MEMORY_STRIDES.
1867
1868 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1869
1870         * graphite-interchange.c (memory_strides_in_loop_depth): Renamed
1871         memory_strides_in_loop.  Gather memory strides on a whole loop.
1872         (pbb_interchange_profitable_p): Renamed lst_interchange_profitable_p.
1873         (lst_interchange_profitable_p): Removed.
1874         (lst_try_interchange_loops): Call lst_interchange_profitable_p.
1875
1876 2010-01-07  Sebastian Pop  <sebastian.pop@amd.com>
1877
1878         Revert patch 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1879         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
1880         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
1881         Remove context_loop and level.
1882
1883 2010-01-07  Richard Guenther  <rguenther@suse.de>
1884
1885         PR tree-optimization/42641
1886         * sese.c (rename_map_elt_info): Use the SSA name version, do
1887         not hash pointers.
1888
1889 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1890
1891         * graphite-blocking.c (scop_do_block): Print "SCoP will be loop
1892         blocked" only when both the strip mine and the interchange have
1893         been applied.
1894
1895         * gcc.dg/graphite/block-2.c: Removed.
1896         * gcc.dg/graphite/block-3.c: Add scan pattern.
1897         * gcc.dg/graphite/block-4.c: Same.
1898         * gcc.dg/graphite/block-5.c: Same.
1899         * gcc.dg/graphite/block-6.c: Same.
1900
1901 2010-01-06  Sebastian Pop  <sebastian.pop@amd.com>
1902
1903         * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
1904         before allocating a new one.
1905         (copy_renames): Check that slot is not NULL.
1906         (mark_bb_with_pbb): Same.
1907         (compute_cloog_iv_types_1): Same.
1908         * graphite-interchange.c (lst_perfect_nestify): Free the before,
1909         nest, and after LSTs.
1910         (lst_try_interchange_loops): Same.
1911
1912 2010-01-05  Sebastian Pop  <sebastian.pop@amd.com>
1913
1914         PR middle-end/42178
1915         * graphite-interchange.c (lst_try_interchange_loops): Do not return
1916         the before, nest, and after LSTs.
1917         (lst_try_interchange): Removed.
1918         (lst_interchange_select_inner): Do not iterate over the LSTs if they
1919         were modified.
1920         (lst_interchange_select_outer): Apply interchange on the outer loop
1921         until there are no more changes in the inner loops.
1922
1923 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1924
1925         Revert patch fixing PR middle-end/42221.
1926
1927 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1928
1929         PR middle-end/42180
1930         * graphite-sese-to-poly.c (follow_ssa_with_commutative_ops): Handle
1931         GIMPLE_CALL.
1932
1933         * gfortran.dg/graphite/pr42180.f90: Add compile flags.
1934
1935 2009-12-18  Sebastian Pop  <sebastian.pop@amd.com>
1936
1937         PR middle-end/42180
1938         * graphite-sese-to-poly.c (split_reduction_stmt): Do not split blocks
1939         that contain only one statement.
1940
1941         * gfortran.dg/graphite/pr42180.f90: New.
1942
1943 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1944
1945         PR middle-end/42393
1946         * gfortran.dg/graphite/pr42393.f90: New.
1947
1948 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1949
1950         PR middle-end/42186
1951         * gfortran.dg/graphite/pr42186.f90: New.
1952
1953 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1954
1955         PR middle-end/42205
1956         * graphite-sese-to-poly.c (translate_scalar_reduction_to_array_for_stmt):
1957         Insert the reduction copy in the same block as the phi node.
1958         (follow_ssa_with_commutative_ops): Handle GIMPLE_NOPs.
1959
1960         * gcc.dg/graphite/pr42205-1.c: New.
1961         * gcc.dg/graphite/pr42205-2.c: New.
1962
1963 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1964
1965         PR middle-end/42221
1966         * sese.c (expand_scalar_variables_expr): Follow the SSA links into
1967         the array indexing of ADDR_EXPRs.
1968
1969         * gcc.dg/graphite/pr42221.c: New.
1970
1971 2009-12-17  Sebastian Pop  <sebastian.pop@amd.com>
1972
1973         PR middle-end/42178
1974         PR middle-end/42334
1975         * graphite-interchange.c (lst_try_interchange): Do not modify OUTER
1976         index.  Call lst_interchange_select_inner only once.
1977         (lst_interchange_select_inner): Update use of lst_try_interchange.
1978         (lst_interchange_select_outer): Update.
1979
1980 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
1981
1982         PR middle-end/42178
1983         PR middle-end/42334
1984         * graphite-interchange.c (lst_try_interchange): Do not increment the
1985         the OUTER index when there is no AFTER kernel.  Do not increment the
1986         OUTER index for after processing the AFTER kernel.
1987         (lst_interchange_select_inner): Call lst_try_interchange only on loops.
1988         (lst_interchange_select_outer): Do not pass in a pointer to the OUTER
1989         index.  Do not pass to lst_interchange_select_inner the OUTER index.
1990         (scop_do_interchange): Update use of lst_interchange_select_outer.
1991
1992         * gfortran.dg/graphite/graphite.exp
1993         (DEFAULT_FLAGS_GRAPHITE_IDENTITY): Remove -fdump-tree-graphite-all.
1994         * gfortran.dg/graphite/interchange-1.f: Add comment.  Clean
1995         the graphite dump file.
1996         * gfortran.dg/graphite/interchange-2.f: Same.
1997         * gfortran.dg/graphite/pr42334-1.f: New.
1998
1999 2009-12-15  Sebastian Pop  <sebastian.pop@amd.com>
2000
2001         PR middle-end/42178
2002         PR middle-end/42334
2003         * graphite-interchange.c (lst_perfect_nestify): Reset to NULL the LSTs
2004         that are empty.
2005         (lst_do_interchange_1): Renamed lst_interchange_select_inner.
2006         (lst_try_interchange): Reimplemented.
2007         (lst_interchange_select_inner): Same.
2008         (lst_do_interchange): Renamed lst_interchange_select_outer.
2009         Reimplemented.
2010         (scop_do_interchange): Update use of lst_interchange_select_outer.
2011
2012         * g++.dg/graphite/pr42130.C: Add -fgraphite-identity.
2013         * gcc.dg/graphite/block-0.c: Un-XFAILed.
2014         * gcc.dg/graphite/pr42211.c: New.
2015         * gfortran.dg/graphite/pr42334.f90: New.
2016
2017 2009-12-14  Sebastian Pop  <sebastian.pop@amd.com>
2018
2019         PR middle-end/42181
2020         * graphite-scop-detection.c (graphite_can_represent_scev): Handle more
2021         carefully PLUS_EXPR, MINUS_EXPR, and MULT_EXPR.
2022
2023         * gfortran.dg/graphite/pr42181.f90: New.
2024
2025 2009-12-12  Sebastian Pop  <sebpop@gmail.com>
2026
2027         PR middle-end/42284
2028         * graphite-sese-to-poly.c (rewrite_close_phi_out_of_ssa): Call
2029         insert_out_of_ssa_copy_on_edge for anything else than SSA_NAMEs.
2030         (detect_commutative_reduction_arg): Simplified.
2031         (detect_commutative_reduction): Early return when the argument of
2032         the close phi is not of an SSA_NAME.
2033
2034         * gcc.dg/graphite/pr42284.c: New.
2035
2036 2009-12-11  Alexander Monakov  <amonakov@ispras.ru>
2037
2038         * dbgcnt.def (graphite_scop): New counter.
2039         * graphite.c: Include dbgcnt.h
2040         (graphite_transform_loops): Use new counter to limit transformations.
2041
2042 2009-12-08  Sebastian Pop  <sebpop@gmail.com>
2043
2044         PR middle-end/42285
2045         * graphite-scop-detection.c (graphite_can_represent_init): Also
2046         handle more complex MULT_EXPRs containing parameters by recursion
2047         on the structure.
2048
2049         * gfortran.dg/graphite/pr42285.f90: New.
2050
2051 2009-12-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2052
2053         * g++.dg/graphite/pr42130.C: Fix type.
2054
2055 2009-11-29  Alexander Monakov <amonakov@gcc.gnu.org>
2056
2057         * g++.dg/graphite/pr42130.C: Correct testcase.
2058
2059 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2060
2061         * Merge from mainline (154493:154734).
2062
2063 2009-11-28 Tobias Grosser  <grosser@fim.uni-passau.de>
2064
2065         * Merge from mainline (151362:154491).
2066
2067 2009-11-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2068
2069         * graphite-clast-to-gimple.c (try_mark_loop_parallel,
2070         graphite_create_new_loop_guard, translate_clast_for): Fix comments.
2071
2072 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2073
2074         PR middle-end/42130
2075         * graphite-clast-to-gimple.c (graphite_create_new_loop_guard,
2076         translate_clast_for_loop): New.
2077         (translate_clast_for): Add a condition around the loop, to do not
2078         execute loops with zero iterations.
2079         * g++.dg/graphite/pr42130.C: New.
2080         * gcc.dg/graphite/pr35356-2.c: Adapt.
2081
2082 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2083
2084         * graphite-clast-to-gimple.c (try_mark_loop_parallel): New.
2085         (translate_clast_for, translate_clast_guard, translate_clast, gloog):
2086         Remove context_loop and level.
2087
2088 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2089
2090         * graphite-clast-to-gimple.c (translate_clast_user,
2091         translate_clast_for, translate_clast_guard): Simplify and move common
2092         elements to translate_clast().
2093         (translate_clast): Simplify and get common elements.
2094
2095 2009-11-23  Tobias Grosser  <grosser@fim.uni-passau.de>
2096
2097         * graphite-clast-to-gimple.c (translate_clast_user,
2098         translate_clast_for, translate_clast_guard): Split out of
2099         translate_clast.
2100
2101 2009-11-21  Tobias Grosser  <grosser@fim.uni-passau.de>
2102
2103         * graphite-clast-to-gimple.c (clast_name_index, new_clast_name_index,
2104         clast_name_to_index, save_clast_name_index, debug_clast_name_index,
2105         debug_clast_name_indexes_1, debug_clast_name_indexes,
2106         clast_name_index_elt_info, eq_clast_name_indexes): Moved from sese.h.
2107         (clast_name_to_gcc, clast_to_gcc_expression,
2108         clast_to_gcc_expression_red, gcc_type_for_clast_expr,
2109         gcc_type_for_clast_eq, graphite_translate_clast_equation,
2110         graphite_create_guard_cond_expr, graphite_create_new_loop,
2111         translate_clast): Add params_index.
2112         (initialize_cloog_names): Create parameter strings from scratch, do
2113         not reference other strings.
2114         (create_params_index): New.
2115         (gloog): Initialize params_index.
2116         * graphite-scop-detection (free_scops_1): Removed.
2117         (limit_scops): Use normal free_scops.
2118         * graphite-sese-to-poly.c (save_var_names): Removed.
2119         (parameter_index_in_region): Do not initialize SESE_PARAM_NAMES
2120         and SESE_PARAMS_INDEX.
2121         * sese.c (new_sese, free_sese): Dito.
2122         * sese.h (struct sese): Remove params_index, params_names.
2123         (SESE_PARAMS_INDEX, SESE_PARAMS_NAMES): Removed.
2124
2125 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2126
2127         Revert the following patch from 2009-09-14:
2128         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2129         tree-scalar-evolution.h, and then tree-data-ref.h.
2130         * graphite-clast-to-gimple.c: Same.
2131         * graphite-dependences.c: Same.
2132         * graphite-interchange.c: Same.
2133         * graphite-poly.c: Same.
2134         * graphite-scop-detection.c: Same.
2135         * graphite-sese-to-poly.c: Same.
2136         * graphite.c: Same.
2137         * lambda-code.c: Same.
2138         * matrix-reorg.c: Same.
2139         * tree-data-ref.c: Same.
2140         * tree-if-conv.c: Same.
2141         * tree-loop-distribu: Same.: Same.
2142         * tree-loop-linear.c: Same.
2143         * tree-parloops.c: Same.
2144         * tree-predcom.c: Same.
2145         * tree-vect-patterns.c: Same.
2146
2147 2009-11-20  Sebastian Pop  <sebastian.pop@amd.com>
2148
2149         Revert patch from 2009-09-14.
2150         * tree-ssa-loop.c (gate_graphite_transforms): Re-enable Graphite
2151         passes at -O1 and below.
2152
2153 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2154
2155         PR middle-end/40281
2156         * gcc.dg/graphite/pr40281.c: New.
2157
2158         * tree-scalar-evolution.c (instantiate_scev_poly): Base and stride
2159         evolutions should not variate in inner loops.
2160
2161 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2162
2163         PR middle-end/42050
2164         * gfortran.dg/graphite/pr42050.f90: New.
2165
2166 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2167
2168         * graphite-interchange.c (memory_strides_in_loop_depth): New.
2169         (pbb_interchange_profitable_p): Call memory_strides_in_loop_depth.
2170
2171 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2172
2173         * graphite-blocking.c (scop_do_block): New.
2174         * graphite-poly.c (apply_poly_transforms): Call scop_do_block.
2175         * graphite-poly.h (scop_do_block): Declared.
2176
2177 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2178
2179         * graphite-blocking.c (pbb_strip_mine_profitable_p): The parameter
2180         depth is the loop nesting depth in the LST.  Call psct_dynamic_dim
2181         to transform depth into the time_depth before calling
2182         pbb_number_of_iterations_at_time.
2183         (lst_do_strip_mine): Use a scalar variable instead of recomputing
2184         lst_depth.
2185
2186 2009-11-18  Sebastian Pop  <sebastian.pop@amd.com>
2187
2188         Reverted the patch for "scattering permutations" from 2009-10-28.
2189
2190         * graphite-poly.c (print_permutation): New.
2191         (debug_permutation): New.
2192         (new_poly_bb): Initialize PBB_PERMUTATION.
2193         (free_poly_bb): Free PBB_PERMUTATION.
2194         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2195         (struct pbb_permutation_elt): New.
2196         (PBB_PERMUTATION_ELT_STRIDE): New.
2197         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2198         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2199         (new_pbb_permutation_elt): New.
2200         (pbb_permutation_elt_free): New.
2201         (struct poly_bb): Add field permutation.
2202         (PBB_PERMUTATION): New.
2203         (print_permutation): Declared.
2204         (debug_permutation): Declared.
2205
2206 2009-11-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
2207
2208         * graphite-interchange.c (build_partial_difference): New.
2209         (memory_stride_in_loop): Refactored the computation of
2210         equality constraints into build_partial_difference function.
2211         Added support for debugging stride computations.
2212
2213 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2214
2215         * graphite-clast-to-gimple.c (gloog): Free if_region,
2216         if_region->true_region, and if_region->region.
2217         * sese.c (if_region_set_false_region): Free if_region->false_region.
2218         (create_if_region_on_edge): Do not use GGC_NEW.
2219         (move_sese_in_condition): Remove useless initialization.
2220
2221 2009-11-03  Sebastian Pop  <sebastian.pop@amd.com>
2222
2223         * graphite-interchange.c (lst_perfect_nestify): Pass 3 parameters
2224         for the loops created by the loop distribution.  Do not modify the
2225         input LSTs.
2226         (lst_try_interchange_loops): Same.  Use a temporary LST for the
2227         transformed schedule.  Call lst_update_scattering before data
2228         dependence analysis.
2229         (lst_try_interchange): Pass an extra parameter INDEX.
2230         (lst_do_interchange_1): New.
2231         (lst_do_interchange): Call lst_do_interchange_1.
2232         (scop_do_interchange): Call lst_update_scattering.
2233         * graphite-poly.c (apply_poly_transforms): Do not call
2234         lst_update_scattering.
2235         * graphite-poly.h (lst_pred): New.
2236         (lst_succ): New.
2237         (lst_find_first_pbb): Return NULL when not found.
2238         (lst_empty_p): New.
2239         (lst_insert_in_sequence): Allow LST1 to be NULL.
2240         (lst_replace): New.
2241         (lst_substitute_3): New.
2242         * gcc.dg/graphite/interchange-1.c: XFail.
2243         * gcc.dg/graphite/interchange-8.c: XFail.
2244         * gcc.dg/graphite/interchange-11.c: XFail.
2245
2246 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2247
2248         * graphite-interchange.c (lst_perfectly_nested_p): New.
2249         (lst_perfect_nestify): New.
2250         (lst_try_interchange_loops): Call store_lst_schedule,
2251         lst_perfectly_nested_p, lst_perfect_nestify and restore_lst_schedule.
2252         (scop_do_interchange): Avoid redundant legality test.
2253         Call lst_do_interchange on a copy of SCOP_TRANSFORMED_SCHEDULE.
2254         * graphite-poly.c (apply_poly_transforms): Call lst_update_scattering.
2255         * graphite-poly.h (psct_static_dim): New.
2256         (lst_dewey_number_at_depth): New.
2257         (lst_find_pbb): Restructured.
2258         (lst_find_first_pbb): Restructured.
2259         (lst_find_last_pbb): New.
2260         (lst_contains_p): New.
2261         (lst_contains_pbb): New.
2262         (lst_create_nest): New.
2263         (lst_remove_from_sequence): New.
2264         (pbb_update_scattering): New.
2265         (lst_update_scattering_under): New.
2266         (lst_update_scattering_seq): New.
2267         (lst_update_scattering): New.
2268         (lst_insert_in_sequence): New.
2269         (lst_distribute_lst): New.
2270         (lst_remove_all_before_including_pbb): New.
2271         (lst_remove_all_before_excluding_pbb): New.
2272
2273 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2274
2275         * tree-ssa-loop-niter.c (finite_loop_p): Do not call twice
2276         get_loop_exit_edges.
2277
2278 2009-10-30  Sebastian Pop  <sebastian.pop@amd.com>
2279
2280         * graphite-poly.c (pbb_remove_duplicate_pdrs): Free collapsed.
2281
2282 2009-10-28  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2283
2284         * graphite-poly.c (print_permutation): New.
2285         (debug_permutation): New.
2286         (new_poly_bb): Initialize PBB_PERMUTATION.
2287         (free_poly_bb): Free PBB_PERMUTATION.
2288         * graphite-poly.h (pbb_permutation_elt_p): Declared.
2289         (struct pbb_permutation_elt): New.
2290         (PBB_PERMUTATION_ELT_STRIDE): New.
2291         (PBB_PERMUTATION_ELT_STRIDED_P): New.
2292         (PBB_PERMUTATION_ELT_TIME_DIMENSION): New.
2293         (new_pbb_permutation_elt): New.
2294         (pbb_permutation_elt_free): New.
2295         (struct poly_bb): Add field permutation.
2296         (PBB_PERMUTATION): New.
2297         (print_permutation): Declared.
2298         (debug_permutation): Declared.
2299
2300 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2301
2302         * graphite-clast-to-gimple.c (gloog): Do not call
2303         sese_reset_aux_in_loops.
2304         * graphite-sese-to-poly.c (build_loop_iteration_domains): Pass an
2305         extra argument for domains.  Do not use loop->aux.
2306         (build_scop_iteration_domain): Initialize and free domains, pass it
2307         to build_loop_iteration_domains and extract the information from
2308         domains.  Do not use loop->aux.
2309         * sese.c (sese_reset_aux_in_loops): Removed.
2310         * sese.h (sese_reset_aux_in_loops): Removed.
2311
2312 2009-10-26  Sebastian Pop  <sebastian.pop@amd.com>
2313
2314         * graphite-clast-to-gimple.c (find_pbb_via_hash): Moved up.
2315         (dependency_in_loop_p): Same.
2316         (translate_clast): Do not use loop->aux.  Initialize
2317         loop->can_be_parallel.
2318         (mark_loops_parallel): Removed.
2319         * graphite-clast-to-gimple.h (mark_loops_parallel): Removed.
2320         * graphite.c (free_aux_in_new_loops): Removed.
2321         (graphite_finalize): Do not call free_aux_in_new_loops.
2322         (graphite_transform_loops): Do not call mark_loops_parallel.
2323
2324 2009-10-26  Li Feng  <nemokingdom@gmail.com>
2325
2326         * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2327         (translate_clast): Pass an extra parameter LEVEL.
2328         Call get_scattering_level.
2329         * graphite-clast-to-gimple.h (get_scattering_level): New.
2330
2331 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2332
2333         * cfgloop.c (alloc_loop): Initialize loop->single_iv.
2334         * cfgloop.h (struct loop): New field single_iv.
2335
2336         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): Do not use
2337         loop->aux anymore: use loop->single_iv.
2338         (graphite_loop_normal_form): Moved...
2339         (build_graphite_loop_normal_form): Removed.
2340         (gloog): Do not call build_graphite_loop_normal_form.
2341         (free_aux_in_new_loops): Moved...
2342         (mark_loops_parallel): Restructure.
2343         * graphite-clast-to-gimple.h (free_aux_in_new_loops): Do not declare.
2344         * graphite-sese-to-poly.c (graphite_loop_normal_form): ...here.
2345         (scop_canonicalize_loops): New.
2346         (build_poly_scop): Call scop_canonicalize_loops.
2347         * graphite.c (free_aux_in_new_loops): ...here.
2348
2349 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2350
2351         * g++.dg/graphite/graphite.exp: Add the same rules as in
2352         gcc.dg/graphite/graphite.exp.
2353
2354 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2355
2356         * g++.dg/graphite/id-1.C: New.
2357
2358 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2359
2360         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
2361         argument base_name.
2362         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
2363         (rewrite_phi_out_of_ssa): Same.
2364         (rewrite_cross_bb_scalar_deps): Same.
2365         (translate_scalar_reduction_to_array): Same.
2366
2367 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2368
2369         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
2370         dump_alias_graphs.
2371
2372 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2373
2374         * graphite-sese-to-poly.c (dump_alias_graphs): New.
2375         (build_scop_drs): Call dump_alias_graphs.
2376
2377 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2378
2379         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
2380         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2381         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
2382         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
2383         * graphite-poly.h (free_lst): New.
2384         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
2385         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
2386
2387 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2388
2389         * graphite-poly.h (struct scop): Add a field saved_schedule.
2390         (SCOP_SAVED_SCHEDULE): New.
2391         (store_lst_schedule): New.
2392         (restore_lst_schedule): New.
2393         (store_scattering): Call store_lst_schedule.
2394         (restore_scattering): Call restore_lst_schedule.
2395
2396 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2397
2398         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
2399         (pdr_add_alias_set): Same.
2400         (build_poly_dr): Same.
2401         (build_alias_set_optimal_p): Same.
2402         (build_base_obj_set_for_drs): Same.  Do not store the result of
2403         graphds_dfs.
2404
2405 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2406
2407         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
2408         all_components_are_cliques to 1.
2409
2410 2009-10-20  Li Feng  <nemokingdom@gmail.com>
2411
2412         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
2413         the new structure.
2414         (pdr_add_alias_set): Update retrieving alias_set_num.
2415         (build_poly_dr): Update retrieving dr_base_object_set.
2416         (partition_drs_to_sets): Remove.
2417         (build_alias_set_optimal_p): New.
2418         (build_alias_set_for_drs): Rename.
2419         (build_scop_drs): Update.
2420         * graphite-sese-to-poly.h (struct base_alias_pair): New.
2421         (ALIAS_SET_INDEX): Remove.
2422         (BASE_OBJECT_SET_INDEX): Remove.
2423
2424 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2425
2426         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
2427
2428 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2429
2430         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
2431         loop upper bounds for 1-element arrays at end of structures.
2432         * tree-flow.h (array_at_struct_end_p): Declared.
2433         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
2434
2435 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
2436
2437         * g++.dg/graphite/pr41305.C: New.
2438
2439 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
2440
2441         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
2442         construction of parameter constraints from loop iteration analysis.
2443         * gcc.dg/graphite/run-id-2.c: New test.
2444
2445 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2446
2447         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
2448         and new_cstr.
2449
2450 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2451
2452         * graphite-dependences.c (dependence_polyhedron_1): Remove
2453         unused gdim dimensions from the DDR polyhedron.
2454
2455 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2456
2457         * graphite-dependences.c (pddr_transformed_scattering): New.
2458         (dot_original_deps_stmt_1): New.
2459         (dot_transformed_deps_stmt_1): New.
2460         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
2461         dot_transformed_deps_stmt_1.
2462         (dot_original_deps): New.
2463         (dot_transformed_deps): New.
2464         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
2465
2466 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2467
2468         * graphite-dependences.c (reduction_dr_1): Remove wrong
2469         assert: reduction BBs can have multiple reduction writes
2470         to memory.  interchange-3.f90 is an example.
2471
2472 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2473
2474         * gfortran.dg/graphite/interchange-3.f90: New.
2475
2476 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2477
2478         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
2479
2480 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2481
2482         * graphite-dependences.c (dependence_polyhedron_1): Add the
2483         context to the dependence polyhedron.
2484
2485 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2486
2487         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
2488         PBB_PDR_DUPLICATES_REMOVED.
2489         (new_poly_bb): Same.
2490
2491 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2492
2493         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
2494         SCOP_CONTEXT.
2495         (build_loop_iteration_domains): Extract bounds on parameters
2496         based on the data size.
2497         (build_scop_context): Do not initialize SCOP_CONTEXT;
2498         add new constraints.
2499
2500 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2501
2502         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
2503         * graphite-ppl.h (graphite-ppl.h): Declared.
2504
2505 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
2506
2507         * graphite-ppl.c (ppl_print_linear_expr): New.
2508         (debug_ppl_linear_expr): New.
2509         * graphite-ppl.h (ppl_print_linear_expr): Declared.
2510         (debug_ppl_linear_expr): Declared.
2511
2512 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2513
2514         * graphite-interchange.c: Fix comments.
2515         * gcc.dg/graphite/block-1.c: Fix comments.
2516
2517 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2518
2519         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
2520         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
2521
2522 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
2523
2524         Reapply the patch from Alexander Monakov that disappeared during
2525         the last merges from trunk.
2526
2527         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2528
2529         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2530         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2531
2532 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2533
2534         * graphite-interchange.c (memory_stride_in_loop): The depth
2535         argument corresponds to a dynamic time dimension, so use
2536         psct_dynamic_dim to refer to the transformed scattering dimension.
2537
2538 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2539
2540         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
2541
2542 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2543
2544         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
2545         root of the LST.
2546         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
2547         the root of the LST.
2548         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
2549         fake loop.
2550         (print_lst): Print the root of LST in a different format.
2551         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
2552
2553 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2554
2555         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
2556
2557 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2558
2559         * doc/passes.texi: Document the Graphite infrastructure.
2560
2561 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2562
2563         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
2564         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
2565         and check the SSA representation.
2566
2567         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
2568
2569 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
2570
2571         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
2572
2573 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2574
2575         * gcc.dg/graphite/interchange-11.c: New.
2576
2577 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2578
2579         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
2580
2581 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2582
2583         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2584         Add -fno-loop-strip-mine and -fno-loop-interchange.
2585         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
2586         -fno-loop-strip-mine.
2587         * gfortran.dg/graphite/graphite.exp: Same.
2588
2589 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2590
2591         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2592         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
2593         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
2594         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
2595         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
2596         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
2597         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
2598         DEFAULT_FLAGS_GRAPHITE_SCOP.
2599         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
2600         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
2601
2602 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2603
2604         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
2605
2606 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
2607             Sebastian Pop  <sebastian.pop@amd.com>
2608
2609         * graphite-interchange.c (build_linearized_memory_access): Pass an
2610         offset as parameter.
2611         (memory_stride_in_loop): Include transform scattering in the
2612         access functions to be able to querry the strides in the
2613         transformed loops.
2614         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
2615         not the psct_iterator_dim.
2616
2617 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2618
2619         * graphite-blocking.c (pbb_do_strip_mine): Removed.
2620         (lst_do_strip_mine_loop): New.
2621         (lst_do_strip_mine): New.
2622         (scop_do_strip_mine): Call lst_do_strip_mine.
2623         * graphite-poly.h (lst_add_loop_under_loop): New.
2624         (lst_find_first_pbb): New.
2625
2626 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
2627
2628         * graphite-poly.c (loop_to_lst): Fix LST creation.
2629
2630 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2631
2632         * gcc.dg/graphite/id-15.c: (8 * 8) replaced with
2633         sizeof(unsigned long) to make it run on 32bit systems.
2634
2635 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
2636
2637         * gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
2638         SEGFAULT on 32bit.
2639
2640 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
2641
2642         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
2643         Comment.
2644         (write_alias_graph_to_ascii_dot): New.
2645         (write_alias_graph_to_ascii_ecc): Ditto.
2646         (partition_drs_to_sets): Add testing of optimality of current method
2647         which assigns alias numbers according to DFS Comopnent number.  used
2648         as heuristic for the upcoming ECC algorithm.
2649         (build_scop_drs): Write to file also with the ecc and dot format.
2650
2651 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2652
2653         * gfortran.dg/graphite/interchange-1.f: XFail.
2654
2655 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2656
2657         * graphite.c (graphite_initialize): Do not handle functions with
2658         more than 100 basic blocks.
2659
2660 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2661
2662         * graphite-blocking.c (pbb_do_strip_mine): Use
2663         PARAM_LOOP_BLOCK_TILE_SIZE.
2664
2665 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2666
2667         * graphite-poly.c (dot_lst_1): New.
2668         (dot_lst): New.
2669         * graphite-poly.h (dot_lst): Declared.
2670
2671 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
2672
2673         * graphite-dependences.c (dot_deps_stmt_1): New.
2674         (dot_deps_stmt): New.
2675         * graphite-dependences.h (dot_deps_stmt): Declared.
2676
2677 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2678
2679         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
2680         not replace cross BB scalar dependences ending on PHI nodes.
2681         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
2682
2683 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2684
2685         * graphite-poly.c (apply_poly_transforms): Implement the high
2686         level driver for flag_loop_block.
2687         * opts.c (decode_options): Enable flag_loop_block at -O2.
2688         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
2689         flag_loop_block.
2690
2691         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
2692         -floop-block.
2693         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
2694         Add -floop-block.
2695
2696 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2697
2698         * graphite-poly.h (lst_find_pbb): New.
2699         (find_lst_loop): New.
2700
2701 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2702
2703         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
2704         * graphite-poly.h (struct scop): Remove dep_graph field.
2705         (SCOP_DEP_GRAPH): Removed.
2706
2707 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
2708
2709         * graphite-poly.h (copy_lst): Do full copy of LST.
2710
2711 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
2712
2713         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
2714         when the loop stride is zero.
2715
2716         * gcc.dg/graphite/id-16.c: New.
2717
2718 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2719
2720         * graphite-dependences.c (reduction_dr_1): New.
2721         (reduction_dr_p): New.
2722         (graphite_legal_transform_dr): Call reduction_dr_p.
2723         (reduction_ddr): Renamed reduction_ddr_p.
2724         * graphite-poly.h (same_pdr_p): New.
2725         (number_of_write_pdrs): New.
2726         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
2727         (split_reduction_stmt): Do not split reduction statements
2728         when there are no writes to memory.
2729         (translate_scalar_reduction_to_array_for_stmt): Insert the
2730         memory reduction statement just after the scalar reduction statement.
2731
2732         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
2733         Un-XFAIL-ed.
2734         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
2735         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
2736
2737 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2738
2739         * graphite-interchange.c (lst_apply_interchange): New.
2740         (lst_interchange_profitable_p): New.
2741         (lst_try_interchange_loops): New.
2742         (lst_try_interchange): New.
2743         (lst_do_interchange): New.
2744         (pbb_do_interchange): Removed.
2745         (scop_do_interchange): Call lst_do_interchange.
2746
2747 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
2748
2749         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
2750         SCOP_TRANSFORMED_SCHEDULE.
2751         (loop_to_lst): New.
2752         (scop_to_lst): New.
2753         (print_lst): New.
2754         (debug_lst): New.
2755         * graphite-poly.h (lst_p): New.
2756         (struct lst): New.
2757         (LST_LOOP_P): New.
2758         (LST_LOOP_FATHER): New.
2759         (LST_PBB): New.
2760         (LST_SEQ): New.
2761         (scop_to_lst): Declared.
2762         (print_lst): Declared.
2763         (debug_lst): Declared.
2764         (new_lst_loop): New.
2765         (new_lst_stmt): New.
2766         (copy_lst): New.
2767         (lst_depth): New.
2768         (lst_dewey_number): New.
2769         (struct scop): Add original_schedule and transformed_schedule fields.
2770         (SCOP_ORIGINAL_SCHEDULE): New.
2771         (SCOP_TRANSFORMED_SCHEDULE): New.
2772         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
2773
2774 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2775
2776         * graphite-dependences.c (reduction_ddr): New.
2777         (graphite_legal_transform_bb): Call reduction_ddr.
2778         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
2779         Initialize PBB_IS_REDUCTION.
2780         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
2781         (PBB_IS_REDUCTION): New.
2782         (new_poly_bb): Update declaration.
2783         * graphite-scop-detection.h (build_scop_bbs): Removed.
2784         (nb_reductions_in_loop): Removed.
2785         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
2786         parameter for reductions.
2787         (try_generate_gimple_bb): Update call to new_poly_bb.
2788         (build_scop_bbs_1): Same.
2789         (build_scop_bbs): Same.
2790         (gsi_for_phi_node): New.
2791         (scalar_close_phi_node_p): Remove gcc_assert.
2792         (split_reduction_stmt): New.
2793         (is_reduction_operation_p): New.
2794         (phi_contains_arg): New.
2795         (follow_ssa_with_commutative_ops): New.
2796         (detect_commutative_reduction_arg): New.
2797         (detect_commutative_reduction_assign): New.
2798         (follow_inital_value_to_phi): New.
2799         (edge_initial_value_for_loop_phi): New.
2800         (initial_value_for_loop_phi): New.
2801         (detect_commutative_reduction): New.
2802         (translate_scalar_reduction_to_array_for_stmt): New.
2803         (insert_copyout): New.
2804         (insert_copyin): New.
2805         (translate_scalar_reduction_to_array): New.
2806         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
2807         (rewrite_commutative_reductions_out_of_ssa_loop): New.
2808         (rewrite_commutative_reductions_out_of_ssa): New.
2809         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
2810         * sese.h (split_region_for_bb): New.
2811
2812         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
2813         * gcc.dg/graphite/interchange-1.c: Fix format.
2814         * gcc.dg/graphite/interchange-10.c: New.
2815
2816 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2817
2818         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
2819         buggy assert.
2820
2821 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2822
2823         * graphite-sese-to-poly.c (scev_analyzable_p): New.
2824         (rewrite_cross_bb_scalar_dependence): New.
2825         (rewrite_cross_bb_scalar_deps): New.
2826         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
2827         Call rewrite_cross_bb_scalar_deps.
2828
2829 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2830
2831         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
2832         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
2833         gsi_for_stmt.
2834
2835 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
2836
2837         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
2838         * graphite-interchange.c (pbb_do_interchange): Same.
2839         * graphite-poly.c (print_scattering_function): Same.
2840         (debug_pdrs): Same.
2841         * graphite-poly.h (pbb_loop): New.
2842         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
2843
2844 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2845
2846         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
2847
2848 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
2849
2850         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
2851         so don't pass a pointer to it.
2852         (build_alias_set_for_drs): Same.
2853         (build_base_obj_set_for_drs): Same.
2854         (build_scop_drs): Same.
2855
2856 2009-09-26  Li Feng  <nemokingdom@gmail.com>
2857
2858         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
2859         the alias graph of data references.
2860
2861 2009-09-25  Li Feng  <nemokingdom@gmail.com>
2862
2863         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
2864         (build_scop_drs): When debugging, write the alias graph to file,
2865         otherwise, should be disabled.
2866
2867 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2868
2869         * Merge from mainline (151310:151361).
2870
2871 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2872
2873         * Merge from mainline (151171:151310).
2874
2875 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2876
2877         * Merge from mainline (151171:151806).
2878
2879 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2880
2881         * Revert the last commit.
2882
2883 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2884
2885         * Merge from mainline (151171:151819).
2886
2887 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
2888
2889         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
2890         (is_simple_operand): Remove call to stmt_simple_memref_p.
2891         (stmt_simple_for_scop_p): Update call to is_simple_operand.
2892
2893 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
2894
2895         * gcc.dg/graphite/interchange-mvt.c: New File.
2896         * gcc.dg/graphite/scop-dsyrk.c: New File.
2897         * gcc.dg/graphite/scop-dsyr2k.c: New File.
2898         * gcc.dg/graphite/scop-mvt.c: New File.
2899         * gcc.dg/graphite/scop-sor.c: New File.
2900
2901 2009-09-17 Li Feng  <nemokingdom@gmail.com>
2902
2903         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
2904         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
2905         (graphite_carried_dependence_level_k): Ditto.
2906         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
2907         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
2908         (new_poly_dr): Adjust declaration.
2909         * graphite-sese-to-poly.c (free_data_refs_aux): New.
2910         (free_gimple_bb): Added free_data_refs_aux.
2911         (build_poly_dr): Add dr_base_object_set.
2912         (partition_drs_to_sets): New.
2913         (dr_same_base_object_p): New.
2914         (build_alias_set_for_drs): New.
2915         (build_base_object_set_for_drs): New.
2916         (build_scop_drs): Add build_base_obj_set_for_drs.
2917         * graphite-sese-to-poly.h: Added #define for alias set number index and
2918         base object set index.
2919         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
2920         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
2921
2922 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
2923
2924         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
2925         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
2926
2927 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2928
2929         * graphite-sese-to-poly.c (struct irp_data): Removed.
2930         (idx_record_params): Removed.
2931         (find_params_in_bb): Scan for parameters the access functions; don't
2932         parse the tree representation.
2933
2934 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2935
2936         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
2937         passes at -O1 and below.
2938
2939 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
2940
2941         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
2942         tree-scalar-evolution.h, and then tree-data-ref.h.
2943         * graphite-clast-to-gimple.c: Same.
2944         * graphite-dependences.c: Same.
2945         * graphite-interchange.c: Same.
2946         * graphite-poly.c: Same.
2947         * graphite-scop-detection.c: Same.
2948         * graphite-sese-to-poly.c: Same.
2949         * graphite.c: Same.
2950         * lambda-code.c: Same.
2951         * matrix-reorg.c: Same.
2952         * tree-data-ref.c: Same.
2953         * tree-if-conv.c: Same.
2954         * tree-loop-distribu: Same.: Same.
2955         * tree-loop-linear.c: Same.
2956         * tree-parloops.c: Same.
2957         * tree-predcom.c: Same.
2958         * tree-vect-patterns.c: Same.
2959
2960 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
2961
2962         Partially revert the previous patch, except the following.
2963         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
2964         as parameters the operands of the not expression.
2965
2966 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2967
2968         * tree-scalar-evolution.c (instantiate_scev_assign): New.
2969         Do not call analyze_scalar_evolution on assignments.
2970         (instantiate_scev_phi): Call analyze_scalar_evolution.
2971         (instantiate_scev_name): Call instantiate_scev_assign and
2972         instantiate_scev_phi.
2973         (instantiate_scev_not): Adapted to pass as parameters the operands
2974         of the not expression.
2975
2976 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2977
2978         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
2979         to pass as parameters the operands of the binary expression.
2980
2981 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2982
2983         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
2984         instantiate_scev_not.  Handle NEGATE_EXPR.
2985         (instantiate_scev_r): Handle NEGATE_EXPR.
2986
2987 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2988
2989         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
2990         instantiate_scev_r.
2991         (instantiate_scev_r): Move code in instantiate_scev_2
2992         and instantiate_scev_1.
2993
2994 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
2995
2996         * tree-scalar-evolution.c (instantiate_scev_3): New.
2997         (instantiate_scev_1): Move code in instantiate_scev_3.
2998
2999 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3000
3001         * tree-scalar-evolution.c (instantiate_scev_poly): New.
3002         (instantiate_scev_1): Move code in instantiate_scev_poly.
3003
3004 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3005
3006         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
3007         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
3008
3009 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3010
3011         * tree-scalar-evolution.c (instantiate_scev_convert): New.
3012         (instantiate_scev_1): Move code in instantiate_scev_convert.
3013
3014 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3015
3016         * tree-scalar-evolution.c (instantiate_scev_binary): New.
3017         (instantiate_scev_1): Move code in instantiate_scev_binary.
3018
3019 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3020
3021         * tree-scalar-evolution.c (instantiate_scev_name): New.
3022         (instantiate_scev_1): Move code in instantiate_scev_name.
3023
3024 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
3025
3026         * Merge from mainline (150992:151171).
3027
3028 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3029
3030         * opts.c (decode_options): Enable flag_loop_interchange at -O2.
3031
3032 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3033
3034         * graphite-dependences.c (graphite_legal_transform_bb): Call
3035         pbb_remove_duplicate_pdrs.
3036         * graphite-poly.c (can_collapse_pdr): Removed.
3037         (pdr_find_duplicate): Removed.
3038         (can_collapse_pdrs): New.
3039         (pbb_remove_duplicate_pdrs): New.
3040         (new_poly_dr): Do not look for duplicates.
3041         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
3042         (PBB_PDR_DUPLICATES_REMOVED): New.
3043         (pbb_remove_duplicate_pdrs): Declared.
3044
3045 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3046
3047         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
3048         the strides by multiplying by PDR_NB_REFS.
3049         * graphite-poly.c (can_collapse_pdr): New.
3050         (pdr_find_duplicate): New.
3051         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
3052         Initialize PDR_NB_REFS.
3053         * graphite-poly.h (struct poly_dr): Add field nb_refs.
3054         (PDR_NB_REFS): New.
3055         (new_poly_dr): Number of subscripts is a graphite_dim_t.
3056
3057 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3058
3059         Revert one of the previous commits:
3060         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3061         the computation of symmetric data dependence relations.
3062         (dependency_between_pbbs_p): Same.
3063
3064 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3065
3066         PR middle-end/40965
3067         * graphite-poly.c (apply_poly_transforms): Remove legality test before
3068         any transform.
3069
3070 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3071
3072         * graphite-dependences.c (pddr_original_scattering): Return NULL
3073         for read-read dependence relations.
3074         * graphite-poly.h (enum poly_dr_type): Fix comment.
3075         (pdr_read_p): New.
3076         (pdr_write_p): New.
3077         (pdr_may_write_p): New.
3078
3079 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3080
3081         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
3082         (struct poly_dr): Same.
3083         (new_poly_dr): Same.
3084         * graphite-poly.c (new_poly_dr): Same.
3085
3086 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3087             Sebastian Pop  <sebastian.pop@amd.com>
3088
3089         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
3090         pbb_strip_mine_time_depth.  Changed the implementation so that
3091         transformation is expressed as a transformation on
3092         time (scatttering) dimensions.  Also, ensures that the 2d+1
3093         scheduling format is preserved.
3094         (pbb_strip_mine_profitable_p): Profitability is based on the
3095         iteration number of a given time (scattering) dimension,
3096         and not on a original loop depth dimension.
3097         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
3098         (pbb_do_strip_mine): Call psct_dynamic_dim.
3099         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
3100         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
3101         (pbb_nb_dynamic_scattering_transform): New.
3102         (psct_dynamic_dim): New.
3103
3104 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3105
3106         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3107         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
3108         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
3109         * graphite-interchange.c (build_linearized_memory_access): Same.
3110         (memory_stride_in_loop): Same.
3111
3112 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3113
3114         * graphite-dependences.c (pddr_original_scattering): New.
3115         (graphite_legal_transform_dr): Call pddr_original_scattering.
3116         (dot_deps_1): New.
3117         (dot_deps): New.
3118         * graphite-dependences.h (dot_deps): Declared.
3119         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
3120         (print_pdr): Print PDR_ID.
3121         * graphite-poly.h (struct poly_dr): Add field id.
3122         (PDR_ID): New.
3123         (pbb_index): New.
3124         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
3125
3126 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
3127
3128         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
3129         not delete the original dependence relation.
3130
3131 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3132
3133         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
3134         the computation of symmetric data dependence relations.
3135         (dependency_between_pbbs_p): Same.
3136
3137 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3138
3139         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
3140         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
3141         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
3142         (free_poly_ddr): New.
3143         (pddr_is_empty): New.
3144         (dependence_polyhedron_1): Now returns a poly_ddr_p.
3145         (dependence_polyhedron): Same.  Remove useless gcc_assert.
3146         Remove fprintfs.
3147         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
3148         (graphite_carried_dependence_level_k): Call pddr_is_empty.
3149         * graphite-dependences.h (enum poly_dependence_kind): New.
3150         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
3151         (PDRP_SOURCE): Renamed PDDR_SOURCE.
3152         (PDRP_SINK): Renamed PDDR_SINK.
3153         (PDRP_DDP): Renamed PDDR_DDP.
3154         (PDDR_KIND): New.
3155         (free_poly_ddr): Declared.
3156         * graphite-poly.c (new_scop): Use the new hash function names.
3157         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
3158         into original_pddrs.
3159         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
3160
3161 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3162
3163         * Merge from mainline (150764:150992).
3164
3165 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3166
3167         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
3168         bounds with LT_EXPR to make niter analysis more precise on code
3169         generated by Graphite.
3170
3171 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
3172
3173         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
3174         (graphite_legal_transform_bb): Same.
3175         (poly_drs_may_alias_p): Same.
3176
3177 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
3178
3179         PR middle-end/40981
3180         * graphite-ppl.c (ppl_max_for_le): Correct the use of
3181         ppl_Pointset_Powerset_C_Polyhedron_maximize.
3182
3183 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3184
3185         * graphite-poly.c (print_pbb): Print PBB index.
3186
3187 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3188
3189         * Merge from mainline (r150672:150764).
3190
3191 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3192
3193         * graphite-interchange.c (ppl_max_for_le): Moved...
3194         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
3195         * graphite-ppl.c (ppl_max_for_le): ... here.
3196         * graphite-ppl.h (ppl_max_for_le): Declared.
3197
3198 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
3199
3200         * Merge from mainline (r150372:150672).
3201
3202 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3203
3204         PR middle-end/40980
3205         * sese.c (convert_for_phi_arg): New.
3206         (add_guard_exit_phis): Use convert_for_phi_arg.
3207
3208         * gfortran.dg/graphite/id-17.f: New.
3209
3210 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3211
3212         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
3213         unknown subscript upper bounds.
3214
3215         * gcc.dg/graphite/interchange-6.c: Un-XFAIL.
3216
3217 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3218             Pranav Garg  <pranav.garg2107@gmail.com>
3219
3220         * graphite-interchange.c (gather_access_strides): Removed.
3221         (ppl_max_for_le): New.
3222         (build_linearized_memory_access): New.
3223         (memory_stride_in_loop): New.
3224         (pbb_interchange_profitable_p): Reimplemented.
3225         * graphite-ppl.h (ppl_new_id_map): New.
3226         (ppl_interchange): New.
3227
3228         * gcc.dg/graphite/interchange-6.c: XFAILed.
3229
3230 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3231
3232         * graphite-interchange.c (compute_subscript): Removed.
3233         (compute_array_size_cstr): Removed.
3234         (compute_array_size_poly): Removed.
3235         (compute_array_size): Removed.
3236         (gather_access_strides_poly): Removed.
3237         (gather_access_strides): Empty.
3238
3239 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3240
3241         * graphite-dependences.c (dependence_polyhedron_1): Replace
3242         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
3243         (graphite_legal_transform_dr): Same.
3244         (graphite_carried_dependence_level_k): Same.
3245         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
3246         Initialize PDR_NB_SUBSCRIPTS.
3247         (print_pdr_access_layout): Replace pdr_nb_subscripts with
3248         PDR_NB_SUBSCRIPTS.
3249         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
3250         (PDR_NB_SUBSCRIPTS): New.
3251         (pdr_nb_subscripts): Removed.
3252         (pdr_dim): Simplified.
3253         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
3254         with PDR_NB_SUBSCRIPTS.
3255
3256 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3257
3258         * graphite-interchange.c (compute_array_size): Remove use of
3259         PDR_DATA_CONTAINER.
3260         * graphite-poly.c (new_poly_dr): Remove argument data_container.
3261         Do not initialize PDR_DATA_CONTAINER.
3262         (print_pdr): Do not print PDR_DATA_CONTAINER.
3263         * graphite-poly.h (struct poly_dr): Remove data_container field.
3264         (PDR_DATA_CONTAINER): Removed.
3265         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
3266         PDR_DATA_CONTAINER.
3267         (build_poly_dr): Same.
3268
3269 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
3270
3271         * gcc.dg/graphite/interchange-9.c: New.
3272
3273 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3274             Sebastian Pop  <sebastian.pop@amd.com>
3275
3276         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
3277         copy of the dependence polyhedron.  Free the temporary objects.
3278         (graphite_carried_dependence_level_k): Free unused objects before
3279         returning.
3280
3281         * gcc.dg/graphite/interchange-1.c: XFAILed.
3282         * gcc.dg/graphite/interchange-2.c: XFAILed.
3283         * gcc.dg/graphite/interchange-3.c: XFAILed.
3284         * gcc.dg/graphite/interchange-4.c: XFAILed.
3285         * gcc.dg/graphite/interchange-7.c: XFAILed.
3286
3287 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3288
3289         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
3290         Early return without analyzing the data dependences if no
3291         transform has been done.  Call restore_scattering if the transform
3292         is not legal.
3293         (graphite-interchange.c): Same.
3294         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
3295         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
3296         (apply_poly_transforms): Do not gcc_assert that
3297         the transform is legal.
3298         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3299         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
3300         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
3301         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
3302         * graphite-poly.h (struct poly_scattering): New.
3303         (struct poly_bb): Add original, transformed, and saved fields.
3304         Remove transformed_scattering, original_scattering, nb_local_variables,
3305         and nb_scattering_transform fields.
3306         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
3307         (poly_scattering_new): New.
3308         (poly_scattering_free): New.
3309         (poly_scattering_copy): New.
3310         (store_scattering_pbb): New.
3311         (store_scattering): New.
3312         (restore_scattering_pbb): New.
3313         (restore_scattering): New.
3314         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
3315         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
3316
3317 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3318
3319         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
3320         (print_scop): Same.
3321
3322 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3323
3324         * Makefile.in (graphite.o): Depends on PREDICT_H.
3325         * graphite.c: Include predict.h.
3326         (graphite_finalize): Call tree_estimate_probability.
3327         * predict.c (predict_loops): Do not call scev_initialize and
3328         scev_finalize.
3329         (tree_estimate_probability_bb): New.
3330         (tree_estimate_probability): Do not initialize loops: move that
3331         code to the driver.  Call tree_estimate_probability_bb.
3332         (tree_estimate_probability_driver): New.
3333         (pass_profile): Use tree_estimate_probability_driver.
3334         * predict.h (tree_estimate_probability): Declared.
3335
3336 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
3337
3338         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
3339         * graphite-dependences.c (graphite_legal_transform): Add time to
3340         TV_GRAPHITE_DATA_DEPS.
3341         (dependency_between_pbbs_p): Same.
3342         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
3343
3344 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3345
3346         * Merge from mainline (r149952:150372).
3347
3348 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3349
3350         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
3351         * graphite-blocking.c: Same.
3352         * graphite-clast-to-gimple.c: Same.
3353         * graphite-dependences.c: Same.
3354         * graphite-poly.c: Same.
3355         * graphite-poly.h: Same.
3356         * graphite-ppl.c: Same.
3357         * graphite-scop-detection.c: Same.
3358         * graphite-sese-to-poly.c: Same.
3359         * graphite.c: Same.
3360
3361 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3362
3363         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
3364         (remove_simple_copy_phi): New.
3365         (remove_invariant_phi): New.
3366         (simple_copy_phi_p): New.
3367         (reduction_phi_p): New.
3368         (gsi_for_ssa_name_def): New.
3369         (insert_out_of_ssa_copy): New.
3370         (insert_out_of_ssa_copy_on_edge): New.
3371         (create_zero_dim_array): New.
3372         (scalar_close_phi_node_p): New.
3373         (rewrite_close_phi_out_of_ssa): New.
3374         (rewrite_phi_out_of_ssa): New.
3375         (rewrite_reductions_out_of_ssa): New.
3376         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
3377
3378         * gcc.dg/graphite/id-11.c: New.
3379         * gcc.dg/graphite/id-15.c: New.
3380         * gcc.dg/graphite/interchange-1.c: Un-XFAIL.
3381         * gcc.dg/graphite/interchange-2.c: Un-XFAIL.
3382         * gcc.dg/graphite/interchange-3.c: Un-XFAIL.
3383         * gcc.dg/graphite/interchange-4.c: Un-XFAIL.
3384         * gcc.dg/graphite/interchange-7.c: Un-XFAIL.
3385         * gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
3386         * gfortran.dg/graphite/id-13.f: New.
3387         * gfortran.dg/graphite/id-5.f: New.
3388
3389 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3390
3391         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
3392         check that nb_reductions_in_loop is zero.
3393         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
3394         reduction phi nodes.
3395         (nb_reductions_in_loop): Removed.
3396         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
3397         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
3398         (bb_contains_non_iv_scalar_phi_nodes): Removed.
3399         (scop_contains_non_iv_scalar_phi_nodes): Removed.
3400         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
3401
3402 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3403
3404         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
3405         statements that have an empty iteration domain.
3406         * gfortran.dg/graphite/id-16.f: New.
3407
3408 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3409
3410         * tree-scalar-evolution.c (instantiate_scev_1): Return
3411         chrec_dont_know when the result is not above instantiate_below.
3412         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
3413         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
3414         the tree has a known scalar evolution.
3415         * gfortran.dg/graphite/id-14.f: New.
3416         * gfortran.dg/graphite/id-15.f: New.
3417
3418 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3419
3420         * sese.c (rename_variables_in_stmt): Pass in an extra parameter