OSDN Git Service

a205928e4a2a159838e49cd6f36559666f663be7
[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
3421         insert_gsi.
3422         (rename_variables): Keep inserting renames after the ones already
3423         inserted.
3424
3425 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3426
3427         * graphite-sese-to-poly.c (compare_bb_depths): New.
3428         (graphite_sort_dominated_info): New.
3429         (build_scop_bbs_1): Call graphite_sort_dominated_info.
3430         (build_scop_scattering): Fix comment.
3431
3432 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
3433
3434         * graphite.c (graphite_finalize): Call print_loops instead of
3435         dump_function_to_file.
3436         * gcc.dg/graphite/graphite.exp: Fix formatting.
3437         * gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
3438         loops generated in the graphite output file.
3439         * gcc.dg/graphite/pr35356-2.c: New.
3440         * gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
3441         * gfortran.dg/graphite/id-12.f: New.
3442
3443 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3444
3445         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
3446         Remove 2 XFAIL.
3447
3448 2009-07-24  Li Feng  <nemokingdom@gmail.com>
3449             Tobias Grosser  <grosser@fim.uni-passau.de>
3450
3451         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
3452         alias set number build alias in ACCESSES polyhedron.
3453         (build_alias_set_for_drs): New.
3454         (build_pbb_drs): Added build_alias_set_for_drs.
3455         * graphite-dependences.c (poly_drs_may_alias_p): New.
3456         (graphite_carried_dependence_level_k): Check alias information
3457         before building polyhedron.
3458
3459 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3460
3461         * Makefile.in (lambda-code.o): Fix formatting.
3462
3463 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
3464
3465         * Merge from mainline (r149350-149952)
3466
3467 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3468
3469         * graphite-poly.c (apply_poly_transforms): Move strip_mine
3470         before interchange to prepare for loop blocking.
3471
3472 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3473
3474         * graphite-poly.c (apply_poly_transforms): Add checks after every
3475         transformation.
3476         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
3477         done in apply_poly_transforms.
3478
3479 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
3480
3481         * graphite-dependences.c (build_lexicographically_gt_constraint):
3482         Replace RES parameter with *RES.
3483         (dependence_polyhedron_1): Pass an address of the parameter RES
3484         instead of value of RES.
3485
3486 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3487
3488         * graphite.c (graphite_finalize): Fix comment.
3489         (graphite_transform_loops): Reset scev info after code generation
3490         of each scop.
3491
3492 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3493
3494         * graphite.c (graphite_finalize): Call scev_reset.
3495
3496 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3497
3498         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
3499         GBB_CLOOG_IV_TYPES hash table twice.
3500         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
3501         (add_condition_to_domain): Clear GMP values.
3502
3503 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3504
3505         * graphite-dependences.c: Fix formatting.
3506         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
3507         (pbb_number_of_iterations): Free ppl_Linear_Expression.
3508         * graphite-sese-to-poly.c: Fix formatting.
3509         * graphite.c (graphite_transform_loops): Create the hash table
3510         after the early return.
3511
3512 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3513
3514         * gcc.dg/graphite/id-14.c: New.
3515         * gcc.dg/graphite/pr40157.c: New.
3516         * gfortran.dg/graphite/id-11.f: New.
3517
3518 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3519
3520         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
3521         (build_poly_scop): Return false when there are no pbbs within
3522         loops to avoid to pass to cloog scops with no loops.
3523
3524 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
3525
3526         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
3527         useless test "i % 2".
3528         (build_pbb_scattering_polyhedrons): Fix formatting.
3529         (build_poly_dr): Same.
3530         * graphite.c (graphite_transform_loops): Restructure.
3531
3532 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
3533
3534         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
3535         reduction_list parameter.
3536         (rewrite_all_phi_nodes_with_iv): Same.
3537         (canonicalize_loop_ivs): Same.
3538         * tree-parloops.c (struct brli): Removed.
3539         (build_reduction_list_info): Removed.
3540         (build_new_reduction): New.
3541         (analyze_reduction_list): Removed.
3542         (gather_scalar_reductions): Find reductions instead of phi
3543         nodes that can't be canonicalized.
3544         (try_create_reduction_list): Remove reduction_list parameter.
3545         (gen_parallel_loop): Same.
3546         (parallelize_loops): Remove analyze_reductions variable,
3547         initialization and free.
3548         Change reduction_list htab initialization to reduction_info
3549         elements instead of ssa names.
3550         Call try_create_reduction_list and gen_parallel_loop without
3551         analyzed_reduction argument.
3552         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
3553         canonicalize_loop_ivs with one less argument.
3554         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
3555
3556 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3557
3558         * graphite-dependences.c (new_poly_dr_pair): New.
3559         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
3560         (new_poly_dr_pair): New.
3561         (eq_poly_dr_pair_p): New.
3562         (hash_poly_dr_pair_p): New.
3563         * graphite-dependences.h (struct poly_dr_pair): New.
3564         (eq_poly_dr_pair_p): Declared.
3565         (hash_poly_dr_pair_p): Declared.
3566         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
3567         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
3568         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
3569         * Makefile.in (graphite-poly.o): Add dependence on
3570         graphite-dependences.h.
3571
3572 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3573
3574         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
3575         polynomials of degree > 1 pass to Graphite.
3576         * tree-chrec.c (scev_is_linear_expression): Call
3577         evolution_function_is_affine_multivariate_p.
3578         * gfortran.dg/graphite/id-10.f90: New.
3579
3580 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3581
3582         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
3583         Instantiate scevs varying in outer loops.
3584         * gfortran.dg/graphite/id-9.f: Correct testcase.
3585
3586 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3587
3588         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
3589         redundant constraint.
3590
3591 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3592
3593         * gcc.dg/graphite/graphite.exp: Fix comments.
3594         * gfortran.dg/graphite/graphite.exp: Trigger actions
3595         based on the file names as in the C testsuite.
3596         * gfortran.dg/graphite/block-1.f90: Fix patterns.
3597         * gfortran.dg/graphite/block-2.f: Same.
3598         * gfortran.dg/graphite/block-3.f90: Same.
3599         * gfortran.dg/graphite/block-4.f90: Same.
3600         * gfortran.dg/graphite/id-1.f90: Same.
3601         * gfortran.dg/graphite/id-2.f90: Same.
3602         * gfortran.dg/graphite/id-3.f90: Same.
3603         * gfortran.dg/graphite/id-4.f90: Same.
3604         * gfortran.dg/graphite/id-6.f: Same.
3605         * gfortran.dg/graphite/id-9.f: Same.
3606         * gfortran.dg/graphite/interchange-1.f: Same.
3607         * gfortran.dg/graphite/interchange-2.f: Same.
3608         * gfortran.dg/graphite/scop-1.f: Same.
3609
3610 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
3611
3612         * sese.c (expand_scalar_variables_call): New.
3613         (expand_scalar_variables_ssa_name): Handle calls in expander.
3614
3615 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3616
3617         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
3618         Expect to see the pattern twice.
3619         * gcc.dg/graphite/interchange-0.c: Un-XFAIL.
3620         * gcc.dg/graphite/interchange-5.c: Same.
3621         * gcc.dg/graphite/interchange-6.c: Same.
3622
3623 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3624
3625         * gcc.dg/graphite/id-10.c: New.
3626         * gcc.dg/graphite/id-12.c: New.
3627         * gfortran.dg/graphite/id-7.f: New.
3628         * gfortran.dg/graphite/id-8.f: New.
3629
3630 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3631
3632         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
3633         zero.
3634
3635 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3636
3637         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
3638
3639 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
3640
3641         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
3642
3643 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3644
3645         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
3646         building PDR subscripts.
3647
3648 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3649
3650         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
3651         computation of array sizes.
3652
3653 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
3654
3655         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
3656
3657 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3658
3659         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
3660         build_pairwise_constraint, dr_equality_constraints,
3661         build_pairwise_scheduling_equality,
3662         build_pairwise_scheduling_inequality, lexicographically_gt_p,
3663         build_lexicographically_gt_constraint, dependence_polyhedron,
3664         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
3665         Move from NNC_Polyhedron to C_Polyhedron.
3666         * graphite-interchange.c (compute_array_size_poly,
3667         gather_access_strides): Dito.
3668         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
3669         free_scop, pbb_number_of_iterations): Dito.
3670         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
3671         pbb_dim_iter_domain, struct scop): Dito.
3672         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
3673         new_Cloog_Domain_from_ppl_Polyhedron,
3674         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
3675         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
3676         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
3677         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
3678         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
3679         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
3680         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
3681         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
3682         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
3683         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
3684         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
3685         build_scop_iteration_domain, build_poly_dr): Dito
3686
3687 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3688
3689         * gcc.dg/graphite/graphite.exp: Added a rule to execute
3690         run-id-*.c files.
3691         * gcc.dg/graphite/run-id-1.c: New.
3692
3693 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3694
3695         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
3696         positivity constraint on the symbolic number of iterations.
3697
3698 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3699
3700         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
3701
3702 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3703             Tobias Grosser  <grosser@fim.uni-passau.de>
3704
3705         * graphite-clast-to-gimple.c (build_scop_context): Removed.
3706         (build_cloog_prog): Directly use SCOP_CONTEXT.
3707         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
3708         (free_scop): Free SCOP_CONTEXT.
3709         (print_scop_context): New.
3710         (print_scop): Call print_scop_context.
3711         (debug_scop_context): New.
3712         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
3713         (struct scop): Added field context.
3714         (SCOP_CONTEXT): New.
3715         * graphite-sese-to-poly.c (add_param_constraints): New.
3716         (build_scop_context): New.
3717         (build_poly_scop): Call build_scop_context.
3718
3719 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3720
3721         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
3722         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
3723         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
3724         * graphite-ppl.h: Include double-int.h and tree.h.
3725         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
3726         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
3727         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
3728         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
3729
3730 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3731
3732         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
3733         POINTER_PLUS_EXPR for pointer types.
3734         (clast_to_gcc_expression): Same.
3735
3736 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
3737
3738         * graphite-poly.c (print_scattering_function): Early return when
3739         PBB_TRANSFORMED_SCATTERING is not initialized.
3740         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
3741
3742 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
3743
3744         * tree-parloops.c (analyze_reduction_list): Remove unused variable
3745         to fix bootstrap.
3746
3747 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
3748
3749         * tree-parloops.c (analyze_reduction_list): Change return
3750         value to void.
3751         (try_create_reduction_list): Move the call to
3752         analyze_reduction_list to the beginining.
3753         Call reduction_phi with analyzed_reductions as argument
3754         instead of reduction_list.
3755
3756 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3757
3758         *  Merge from mainline (r148296:149346)
3759
3760 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3761
3762         * graphite-scop-detection.c (graphite_can_represent_init): New.
3763         (graphite_can_represent_scev): Call graphite_can_represent_init:
3764         check that the initial value does not contain multiplications of
3765         parameters.
3766         (stmt_has_simple_data_refs_p): New.
3767         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
3768         (is_simple_operand): Fix formatting.
3769         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
3770
3771 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3772
3773         * gcc.dg/graphite/id-13.c: New.
3774         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
3775         analyze_scalar_evolution, use scalar_evolution_in_region.
3776         (scan_tree_for_params_right_scev): Add extra assert.
3777         (parameter_index_in_region_1): Split from parameter_index_in_region.
3778         (idx_record_params): Use scalar_evolution_in_region.
3779         (find_params_in_bb): Same.
3780         (find_scop_parameters): Same.
3781         (build_loop_iteration_domains): Same.
3782         (create_linear_expr_from_tree): Same.
3783         * sese.c (scalar_evolution_in_region): New.
3784         * sese.h (scalar_evolution_in_region): Declared.
3785         (defined_in_sese_p): New.
3786         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
3787         static anymore.
3788         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
3789         Declared.
3790
3791 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3792
3793         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
3794         TREE_DATA_REF_H also implies SCEV_H.
3795
3796 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
3797
3798         * graphite-poly.c (print_scop_params): New.
3799         (print_scop): Call print_scop_params.
3800         (debug_scop_params): New.
3801         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
3802
3803 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3804
3805         * gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
3806         * gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
3807         * gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
3808         * gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
3809         * gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
3810         * gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
3811
3812 2009-07-07  Li Feng  <nemokingdom@gmail.com>
3813
3814         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
3815         for dependency checking part.
3816         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
3817         tests for dependency checking.
3818         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3819         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3820         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
3821         flag -fdump-tree-graphite-all for autopar testsuites.
3822
3823 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3824
3825         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
3826         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
3827         canonicalize_loop_ivs): Moved...
3828         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
3829
3830 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
3831
3832         * tree-parloops.c (try_create_reduction_list): Pass an extra
3833         argument analyzed_reductions.  Call analyze_reduction_list.
3834         (gen_parallel_loop): Do not call analyze_reduction_list.
3835         (parallelize_loops): Init and finalize analyzed_reductions.
3836
3837 2009-07-06  Li Feng  <nemokingdom@gmail.com>
3838
3839         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
3840         Added flag -fno-loop-strip-mine for autopar testcase.
3841
3842 2009-07-04  Li Feng  <nemokingdom@gmail.com>
3843
3844         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
3845         transformed scattering dimension instead of unmatch orignal when
3846         calling dependence_polyhedron.
3847
3848 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3849
3850         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
3851
3852 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3853
3854         * graphite-poly.c (pbb_number_of_iterations): Check for returned
3855         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
3856
3857 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
3858
3859         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
3860         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
3861         * graphite-poly.c (pbb_number_of_iterations): New.
3862         * graphite-poly.h (pbb_number_of_iterations): Declared.
3863         (pbb_iterator_dim, pbb_parameter_dim): New.
3864
3865 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
3866
3867         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
3868         last commit on type of lower and upper bound of loops.
3869
3870 2009-06-29  Li Feng  <nemokingdom@gmail.com>
3871
3872         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
3873         graphite-dependences.h.
3874         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
3875         (mark_bb_with_pbb): New.
3876         (get_stmtfor_depth): New.
3877         (find_pbb_via_hash): New.
3878         (dependency_in_loop_p): New.
3879         (mark_loops_parallel): New.
3880         (free_aux_in_new_loops): New.
3881         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
3882         bb with it's relevant pbb. Mark newly created loops.  Remove mark
3883         innermost loop parallel without checking.
3884         (gloog): Add parameter BB_PBB_MAPPING.
3885         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
3886         (gloog): Change declaration.
3887         (mark_loop_parallel): Make extern.
3888         (free_aux_in_new_loops): Declare.
3889         (bb_pbb_map_hash): New.
3890         (eq_bb_pbb_map): New.
3891         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
3892         auto parallelization when flag_graphite_force_parallel is set.
3893         (graphite_finalize): Added free_aux_in_new_loops.
3894         * tree-parloops.c (parallelize_loops): Only generate parallel code for
3895         the innermost loop that marked parallel.  Use
3896         flag_graphite_force_parallel instead of loop->can_be_parallel.
3897         (loop_parallel_p): Move inner most checking out of function.
3898
3899 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3900
3901         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
3902         type of lower and upper bound of loops signed long int.
3903
3904 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3905
3906         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
3907         expression outside the loop.
3908
3909 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3910
3911         * gcc.dg/graphite/interchange-8.c: New.
3912
3913 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3914
3915         * gcc.dg/graphite/interchange-0.c: XFailed.
3916         * gcc.dg/graphite/interchange-5.c: XFailed.
3917         * gcc.dg/graphite/interchange-6.c: XFailed.
3918
3919 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3920
3921         * graphite-interchange.c (compute_array_size_poly): The end of the
3922         recursion should return 1.
3923
3924 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3925
3926         * graphite-interchange.c (compute_array_size_cstr): Allow the
3927         subscript multiplier to be -1.
3928         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
3929         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
3930         data_container.  Initializes PDR_DATA_CONTAINER.
3931         (print_pdr_access_layout): New.
3932         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
3933         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
3934         data_container.
3935         (PDR_DATA_CONTAINER): New.
3936         (new_poly_dr): Update declaration.
3937         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
3938         (build_poly_dr): Call pdr_add_data_dimensions.
3939
3940 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3941
3942         * graphite-poly.h (struct poly_dr): Fix comment.
3943         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
3944         (pdr_add_memory_accesses): New.
3945         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
3946
3947 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
3948
3949         * graphite-poly.c (print_pdrs, debug_pdrs): New.
3950         (print_pbb): Add call to print_pdrs.
3951         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
3952
3953 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
3954             Li Feng <nemokingdom@gmail.com>
3955
3956         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
3957         (dependency_between_pbbs_p): New.
3958         (lexicographically_gt_p): Assure !empty_p before polyhedron
3959         intersection assign.
3960         (build_lexicographically_gt_constraint): Correct lexicographically
3961         judging.
3962         * graphite-dependences.h: New.
3963         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
3964
3965 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3966
3967         * graphite-clast-to-gimple.c (print_clast_stmt): New.
3968         (gloog): Print to dump_file the generated clast.
3969         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
3970         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
3971
3972 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3973
3974         * graphite-poly.c (extend_scattering): Increment
3975         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
3976
3977 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
3978
3979         * graphite-interchange.c (compute_array_size_poly): Added exit of
3980         recursion condition.  Continue iterating even after the first equality.
3981         (compute_array_size): Same.
3982
3983 2009-06-24  Li Feng  <nemokingdom@gmail.com>
3984
3985         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
3986         -fdump-tree-final_cleanup to -fdump-tree-optimized.
3987         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
3988         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
3989         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
3990
3991 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3992
3993         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
3994         only when the use verifies is_gimple_reg.
3995
3996 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
3997
3998         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
3999         Allocate scaldims after call to unify_scattering_dimensions.
4000
4001 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4002
4003         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
4004
4005 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4006             Albert Cohen  <albert.cohen@inria.fr>
4007
4008         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
4009         variables for the strip mining.
4010
4011 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4012             Pranav Garg  <pranav.garg2107@gmail.com>
4013
4014         * Makefile.in (OBJS-common): Added graphite-blocking.o.
4015         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
4016         (graphite-blocking.o): New rule.
4017         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
4018         * graphite-blocking.c: New.
4019         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
4020         flag_loop_strip_mine.
4021         (psct_scattering_dim_for_loop_depth): New.
4022         * graphite-poly.h (scop_do_strip_mine): Declared.
4023         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
4024         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
4025         flag_loop_strip_mine.
4026
4027 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4028
4029         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
4030         a GMP value and a PPL coefficient at each iteration of a loop.
4031
4032 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4033
4034         * graphite-dependences.c (dependence_polyhedron): Do not use
4035         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
4036         pbb_nb_scattering_transform.
4037         (graphite_legal_transform_dr): Same.
4038         * graphite-poly.c (extend_scattering): Same.
4039         (unify_scattering_dimensions): Same.
4040         (print_scattering_function): Same.
4041         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
4042         PBB_NB_LOCAL_VARIABLES.
4043         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
4044         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
4045         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
4046         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
4047         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
4048         (pbb_nb_scattering_transform): New.
4049         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
4050         (psco_scattering_dim): Add assert on parameters.
4051         (psct_scattering_dim): Same.
4052         (psct_scattering_dim_for_loop_depth): Declared.
4053         (psct_local_var_dim): New.
4054         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
4055         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
4056         correct layout, call pbb_nb_local_vars.
4057         (psct_add_local_variable, psct_add_scattering_dimension): New.
4058         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
4059         Initialize PBB_NB_SCATTERING_TRANSFORM.
4060
4061 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4062
4063         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
4064         (set_coef): Renamed ppl_set_coef.
4065         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
4066
4067 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
4068
4069         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
4070         test a boolean against 1.
4071         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
4072         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
4073         (pbb_do_interchange): Returns true when a transform has been performed.
4074         (scop_do_interchange): Same.
4075         * graphite-poly.c (apply_poly_transforms): Use the return value of
4076         scop_do_interchange.
4077         * graphite-poly.h (scop_do_interchange): Update declaration.
4078
4079 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
4080
4081         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
4082         after last use.
4083         * sese.c (sese_reset_aux_in_loops): New.
4084         * sese.h (sese_reset_aux_in_loops): New.
4085
4086 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4087
4088         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
4089         multiplier and multiply the constant by the multiplier.
4090         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
4091         (build_poly_dr): Do not use the multiplier to define the subscript.
4092
4093 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4094
4095         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
4096         compiler's data reference.  Initialize PDR_CDR.
4097         (print_pdr): Call dump_data_reference.
4098         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
4099         Add compiler_dr field.
4100         (PDR_BB): Renamed PDR_PBB.
4101         (PDR_CDR): New.
4102         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
4103         GCC's data reference representation.
4104         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
4105         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
4106
4107 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4108
4109         * graphite-poly.c (print_scattering_function): Also print the layout.
4110         * graphite-poly.h (pbb_nb_local_vars): New.
4111
4112 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4113
4114         * graphite-poly.c (print_pbb_domain): Also print the layout names.
4115
4116 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4117
4118         * graphite-poly.c (print_pdr, debug_pdr): New.
4119         * graphite-poly.h (print_pdr, debug_pdr): Declared.
4120         (PDR_BASE): Removed.
4121
4122 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4123
4124         * gcc.dg/graphite/interchange-{1..7}.c: New avatars of
4125         ltrans-{1..6,8}.c.
4126
4127 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4128
4129         * graphite-interchange.c (compute_subscript): Allow also -1 in the
4130         subscript identification column.
4131         (pbb_do_interchange): Print to dump_file that some loops "will be
4132         interchanged".  Rely on that chain of characters in the testcases.
4133         * gcc.dg/graphite/interchange-0.c: New.
4134         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
4135         interchange-*.c files and compile them with -floop-interchange.
4136
4137 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
4138
4139         * graphite-interchange.c (interchange_profitable_p): Renamed
4140         pbb_interchange_profitable_p.
4141
4142 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4143             Harsha Jagasia  <harsha.jagasia@amd.com>
4144             Pranav Garg  <pranav.garg2107@gmail.com>
4145
4146         * graphite-interchange.c (interchange_profitable_p): Make static.
4147         (pbb_interchange_loop_depths, pbb_do_interchange,
4148         scop_do_interchange): New.
4149         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
4150         for flag_loop_interchange.
4151         * graphite-poly.h (scop_do_interchange): Declared.
4152         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
4153         flag_loop_interchange is used.
4154
4155 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
4156
4157         * graphite-dependences.c (dependence_polyhedron): Update use of
4158         pbb_nb_scattering_dims.
4159         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
4160         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
4161         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
4162         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
4163
4164 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4165
4166         * graphite.c: Cleanup foo.
4167
4168 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
4169
4170         * Merge from mainline (r143684:148293).
4171         * Disabled libpcp until it gets fixed.
4172
4173 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4174             Harsha Jagasia  <harsha.jagasia@amd.com>
4175
4176         * graphite-interchange.c: New.
4177         * Makefile.in (graphite-interchange.o): New.
4178         * graphite-poly.h (interchange_profitable_p): Declared.
4179         * graphite-ppl.h (value_max): New.
4180
4181 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4182
4183         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
4184         * graphite-poly.h: Fix some comments.
4185         (pdr_dim): New.
4186         (pdr_scop): New.
4187
4188 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4189
4190         * graphite-poly.h
4191         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
4192         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
4193         (pdr_accessp_nb_params): Renamed pdr_nb_params.
4194         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
4195         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
4196         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
4197         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
4198         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
4199         * graphite-clast-to-gimple.c: Same.
4200         * graphite-dependences.c: Same.
4201         * graphite-poly.c: Same.
4202         * graphite-sese-to-poly.c: Same.
4203
4204 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4205
4206         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
4207         expressions for an IV rename, as returned by clast_to_gcc_expression.
4208         (copy_renames): Rename new_name to expr.
4209         * sese.c (debug_rename_elt): Same.
4210         (get_rename): Same.
4211         (set_rename): Same.
4212         (sese_adjust_liveout_phis): Call force_gimple_operand before using
4213         the information from the rename map.
4214         (rename_variables_in_stmt): Same.
4215         (add_loop_exit_phis): Rename new_name to expr.
4216         (insert_loop_close_phis): Same.
4217         (add_guard_exit_phis): Same.  Call force_gimple_operand.
4218         * sese.h (struct rename_map_elt): Rename new_name to expr.
4219         (new_rename_map_elt): Same.
4220
4221 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4222
4223         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
4224         * sese.c (set_rename): Make it extern.
4225         * sese.h (set_rename): Declared.
4226
4227 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
4228
4229         * graphite-poly.c (extend_scattering): Free values.
4230         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
4231         Free iterators.
4232         (ppl_print_powerset_matrix): Same.
4233         * graphite-scop-detection.c (free_scops_1): New.
4234         (limit_scops): Call free_scops_1.
4235         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
4236         (build_poly_dr): Free PPL coefficients.
4237         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
4238
4239 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
4240
4241         * graphite-dependences.c: New.
4242         * graphite-data-ref.c: Removed.
4243         * graphite-data-ref.h: Removed.
4244         * Makefile.in (graphite-data-ref.o): Removed.
4245         (graphite-dependences.o): Added.
4246         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
4247         * graphite-poly.c: Same.
4248         Move the data dependence testing to graphite-dependences.c.
4249
4250 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4251
4252         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
4253         from graphite_cannot_represent_loop. Code refactored.
4254         (scopdet_basic_block_info): Call graphite_can_represent_loop.
4255
4256 2009-05-17  Li Feng  <nemokingdom@gmail.com>
4257
4258         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
4259         Cover all the testcases (not only the filtered ones).
4260
4261 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4262
4263         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
4264         unnecessary check. Update comments. Move check for REAL_TYPE here.
4265         (harmful_stmt_in_bb): Remove checks for conditions. This is already
4266         done in (stmt_simple_for_scop_p).
4267
4268 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
4269
4270         * graphite.c (print_global_statistics): New.
4271         (print_graphite_scop_statistic): New.
4272         (print_graphite_statistics): New.
4273         (graphite_initialize, graphite_transform_loops): Print statistics.
4274         * graphite-scop-detection (build_scops): Print statistics.
4275         (print_graphite_scop_statistics): New.
4276         (print_graphite_statistics): New.
4277
4278 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4279
4280         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
4281         (debug_clast_name_index): Removed.
4282         (debug_clast_name_indexes_1): Removed.
4283         (debug_clast_name_indexes): Removed.
4284         (clast_name_index_elt_info): Removed.
4285         (eq_clast_name_indexes): Removed.
4286         (clast_name_to_index): Removed.
4287         (new_clast_name_index): Removed.
4288         (save_clast_name_index): Removed.
4289         (save_var_name): Moved...
4290         (init_sese_params_index): Removed.
4291         (clast_name_to_gcc): Remove use of name_tree.
4292         (initialize_cloog_names): Same.
4293         (gloog): Do not call init_sese_params_index.
4294         * graphite-sese-to-poly.c (save_var_name): ...here.
4295         (parameter_index_in_region): New.
4296         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
4297         (parameter_index_in_region): Removed.
4298         (is_parameter): Remove use of name_tree.
4299         * sese.h (struct name_tree): Removed.
4300         (struct sese): Remove use of name_tree.  New field params_names.
4301         (SESE_PARAMS_NAMES): New.
4302         (SESE_PARAMS): Remove duplicate.
4303         (parameter_index_in_region): Removed.
4304         (sese_nb_params): Remove use of name_tree.
4305         (struct clast_name_index): New.
4306         (new_clast_name_index): New.
4307         (clast_name_to_index): New.
4308         (save_clast_name_index): New.
4309         (debug_clast_name_index): New.
4310         (debug_clast_name_indexes_1): New.
4311         (debug_clast_name_indexes): New.
4312         (clast_name_index_elt_info): New.
4313         (eq_clast_name_indexes): New.
4314
4315 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4316
4317         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
4318         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
4319         (graphite_loop_normal_form): Do not pass region.  Do not
4320         initialize SESE_OLDIVS.
4321         (build_graphite_loop_normal_form): Update call to
4322         graphite_loop_normal_form.
4323         * sese.c (debug_oldivs): Removed.
4324         (new_sese): Do not initialize SESE_OLDIVS.
4325         (free_sese): Do not free SESE_OLDIVS.
4326         (oldiv_for_loop): Removed.
4327         * sese.h (struct sese): Remove old_ivs.
4328         (SESE_OLDIVS): Removed.
4329         (oldiv_for_loop): Removed.
4330
4331 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4332
4333         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
4334         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
4335         replaced by a call to newivs_to_depth_to_newiv.
4336         (clast_to_gcc_expression): Pass newivs, remove ivstack.
4337         (clast_to_gcc_expression_red): Same.
4338         (gcc_type_for_clast_expr): Same.
4339         (gcc_type_for_clast_eq): Same.
4340         (graphite_translate_clast_equation): Same.
4341         (graphite_create_guard_cond_expr): Same.
4342         (graphite_create_new_guard): Same.
4343         (graphite_create_new_loop): Same.
4344         (build_iv_mapping): Same.
4345         (translate_clast): Same.
4346         (gloog): Same.
4347         (loop_iv_stack_patch_for_consts): Removed.  *
4348         sese.c (iv_stack_entry_is_constant): Removed.
4349         (iv_stack_entry_is_iv): Removed.
4350         (loop_iv_stack_push_iv): Removed.
4351         (loop_iv_stack_insert_constant): Removed.
4352         (loop_iv_stack_pop): Removed.
4353         (loop_iv_stack_get_iv): Removed.
4354         (loop_iv_stack_get_iv_from_name): Removed.
4355         (debug_loop_iv_stack): Removed.
4356         (free_loop_iv_stack): Removed.
4357         (loop_iv_stack_remove_constants): Removed.  *
4358         sese.h (iv_stack_entry_kind): Removed.
4359         (iv_stack_entry_data_union): Removed.
4360         (iv_stack_entry_struct): Removed.
4361         (iv_stack_entry_p): Removed.
4362         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
4363         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
4364         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
4365         loop_iv_stack_pop, free_loop_iv_stack): Removed.
4366         (gbb_loop_at_index): Fix indenting.
4367         (gbb_loop_index): Removed.
4368
4369 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4370
4371         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
4372         Call clast_name_to_index.
4373
4374 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4375
4376         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
4377         do not pass params.  Get params from SESE_PARAMS.
4378         (clast_to_gcc_expression): Same.
4379         (clast_to_gcc_expression_red): Same.
4380         (gcc_type_for_clast_eq): Same.
4381         (graphite_translate_clast_equation): Same.
4382         (graphite_create_new_loop): Same.
4383         * sese.c (rename_variables_in_stmt): Fix comment.
4384
4385 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4386
4387         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
4388         newivs_index.
4389         Call save_clast_name_index.
4390         (translate_clast): Pass newivs_index.
4391         (gloog): Create and free newivs_index.
4392
4393 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4394
4395         * graphite-clast-to-gimple.c (clast_name_index): New structure.
4396         (clast_name_index_p): New type.
4397         (debug_clast_name_index): New.
4398         (debug_clast_name_indexes_1): New.
4399         (debug_clast_name_indexes): New.
4400         (clast_name_index_elt_info): New.
4401         (eq_clast_name_indexes): New.
4402         (clast_name_to_index): New.
4403         (new_clast_name_index): New.
4404         (save_clast_name_index): New.
4405         (init_sese_params_index): New.
4406         (gloog): Call init_sese_params_index.
4407         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
4408         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
4409         (free_sese): Free SESE_PARAMS_INDEX.
4410         * sese.h (struct sese): Add params_index.
4411         (SESE_PARAMS_INDEX): New.
4412
4413 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4414
4415         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
4416         (graphite_create_new_loop): Pass the newivs vector.  Push the
4417         newly created IV to newivs.
4418         (translate_clast): Pass the newivs vector.
4419         (gloog): Create and destroy the newivs vector.
4420
4421 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
4422
4423         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
4424         (graphite_loop_normal_form): Initialize loop->aux with the unique
4425         IV that has been created.
4426
4427 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
4428
4429         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
4430         scev with parameters in the base part. They where forbidden
4431         exidently.
4432
4433 2009-05-11  Li Feng  <nemokingdom@gmail.com>
4434
4435         * gcc.dg/graphite/graphite.exp: Set different default
4436         compile options by file names.
4437         * gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
4438         * gcc.dg/graphite/id-{1-9}.c: Ditto.
4439         * gcc.dg/graphite/scop-{0-20}.c: Ditto.
4440         * gcc.dg/graphite/scop-matmult.c: Ditto.
4441
4442 2009-05-08  Li Feng <nemokingdom@gmail.com>
4443
4444         * gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
4445         * gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
4446         * gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
4447         * gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
4448
4449 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4450
4451         * graphite-scop-detection (build_scops_1): Fix little bug introduced
4452         by final cleanup.
4453
4454 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4455
4456         * graphite-scop-detection.c (graphite_can_represent_scev): Only
4457         allow integer constant strides.
4458         (graphite_can_represent_expr): Depend on outermost_loop.
4459         (stmt_simple_memref_p, graphite_cannot_represent_loop,
4460         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
4461         build_scops_1): Same.
4462         (scopdet_basic_block_info): Same and insert layered SCoP
4463         detection.
4464         (try_generate_gimple_bb): Cleanup.
4465         (build_scops): Enable data references.
4466
4467         * gcc.dg/graphite/id-5.c: New.
4468         * gcc.dg/graphite/id-9.c: New.
4469         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
4470         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
4471
4472 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4473
4474         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
4475         that we have not yet built for this SCoP.
4476
4477 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4478
4479         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
4480         for complex numbers.
4481
4482 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4483
4484         * graphite-ppl.c: Fix build if cloog is not available.
4485
4486 2009-05-04  Li Feng  <nemokingdom@gmail.com>
4487
4488         * tree-parloops.c (loop_parallel_p): Remove construction of
4489         NITER and REDUCTION_LIST.
4490         (try_get_loop_niter): New.
4491         (try_create_reduction_list): New.
4492         (parallelize_loops): Bypass the failed checkings in autopar
4493         when can_be_parallel in loop structure is set to true.
4494
4495 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4496
4497         * gcc.dg/graphite/id-6.c: Update testcase.
4498         * gcc.dg/graphite/scop-3.c: Dito.
4499
4500 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4501
4502         * graphite-scop-detection.c (stmt_simple_for_scop_p):
4503         Enable EQ_EXPR and NE_EXPR again.
4504
4505 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4506
4507         * graphite-scop-detection.c (graphite_can_represent_scev):
4508         Add check if scev is affine multivariate.
4509         (harmful_stmt_in_bb): Check if we can represent the conditions.
4510         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
4511         harmful_stmt_in_bb.
4512         * gcc.dg/graphite/id-7.c: New.
4513
4514 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
4515
4516         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
4517         Check all bbs in region, not only the bbs that are represented in
4518         GRAPHITE.
4519         (build_poly_scop): Add newline.
4520         * gcc.dg/graphite/id-8.c: New.
4521
4522 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4523
4524         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
4525         when loop initialize.
4526         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
4527         * common.opt: Declare flag_graphite_force_parallel.
4528         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
4529         loop parallel.
4530         * graphite-poly.c (apply_poly_transforms): Introduce
4531         flag_graphite_force_parallel.
4532         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
4533         * toplev.c (process_options): ditto and replace a not correctly
4534         encoded space.
4535
4536 2009-04-30  Li Feng  <nemokingdom@gmail.com>
4537
4538         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
4539         Change the call of gbb_loop_at_index and/or gbb_loop_index due
4540         to the redefinition.
4541         (compute_cloog_iv_types_1): ditto.
4542         (build_iv_mapping): ditto.
4543         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
4544         initialization.
4545         (free_gimple_bb): Removed GBB_LOOPS related free part.
4546         (build_bb_loops): Removed.
4547         * sese.h (struct gimple_bb): Removed loops.
4548         (GBB_LOOPS): Removed.
4549         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
4550         (gbb_loop_index): ditto.
4551
4552 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4553
4554         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
4555         allow non constant strides.
4556         * gcc.dg/graphite/scop-20.c: New.
4557
4558 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4559
4560         * graphite-scop-detection.c (dot_all_scops): Fix system call
4561         return value warning.
4562         (dot_scop): Same.
4563
4564 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4565
4566         * gcc.dg/graphite/id-6.c: Fix pattern.
4567         * gcc.dg/graphite/scop-3.c: Same.
4568
4569 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4570
4571         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
4572         build_pairwise_constraint, dr_equality_constraints,
4573         build_pairwise_scheduling_equality,
4574         build_pairwise_scheduling_inequality, lexicographically_gt_p,
4575         build_lexicographically_gt_constraint, dependence_polyhedron,
4576         graphite_legal_transform_dr, graphite_legal_transform_bb,
4577         graphite_legal_transform): New.
4578         * graphite-poly.h (graphite_legal_transform): Declared.
4579         * graphite-sese-to-poly.c (build_poly_scop): Call to
4580         graphite_legal_transform is disabled for the moment.
4581
4582 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4583
4584         * graphite-poly.h (pbb_nb_scattering_dims): New.
4585         (pbb_nb_scattering): Use it.
4586
4587 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4588
4589         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
4590         Pointset_Powerset version of ppl_insert_dimensions.
4591         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
4592
4593 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4594
4595         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
4596
4597 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4598
4599         * graphite-poly.h: Fix comment.
4600
4601 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
4602
4603         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
4604
4605 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4606
4607         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
4608         statements.
4609
4610 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
4611
4612         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
4613         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
4614         conditions.
4615
4616 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
4617
4618         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
4619         handle EQ_EXPR and NE_EXPR.
4620
4621 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
4622
4623         * graphite-poly.h (poly_dr): Fix comment.
4624
4625 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4626             Tobias Grosser  <grosser@fim.uni-passau.de>
4627
4628         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
4629         with a zero dimension polyhedron.
4630         (find_scop_parameters): Move the call to scop_set_nb_params here.
4631         (build_loop_iteration_domains): Store in loop->aux the iteration
4632         domain polyhedron.
4633         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
4634         by any loop in scop.
4635         (build_poly_scop): Do not call scop_set_nb_params.
4636
4637 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
4638             Tobias Grosser  <grosser@fim.uni-passau.de>
4639
4640         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
4641         add_condition_to_domain not GT_EXPR.
4642
4643 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4644
4645         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
4646         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
4647         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
4648         upper_bound_assign to calculate unions.
4649         * gcc.dg/graphite/id-6.c: New.
4650
4651 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4652
4653         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
4654         handle abnormal edges.
4655
4656 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4657
4658         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
4659         (free_poly_bb): Also free poly_drs.
4660         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
4661         (poly_dr): Polyhedron to Pointset_Powerset.
4662         (pdr_accessp_nb_subscripts): Same.
4663         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
4664         poly_drs.
4665
4666 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4667
4668         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
4669         names into more meaningful names.
4670
4671 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4672
4673         * gfortran.dg/graphite/interchange-1.c: New.
4674         * gfortran.dg/graphite/interchange-2.c: New.
4675
4676 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4677
4678         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
4679         the reduction_list.
4680         * tree-parloops.c (rewrite_phi_with_iv): New.
4681         (rewrite_all_phi_nodes_with_iv): New.
4682         (canonicalize_loop_ivs): Call them.
4683
4684 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4685
4686         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
4687         graphite_find_data_references_in_stmt.
4688         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
4689         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
4690
4691 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4692
4693         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
4694
4695 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4696
4697         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
4698         instead of bb_in_region.
4699         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
4700         (build_sese_conditions): Use flag_bb_in_sese.
4701         * sese.c (register_bb_in_sese): Removed.
4702         (new_sese): Remove initialization of SESE_REGION_BBS.
4703         (free_sese): Do not free SESE_REGION_BBS.
4704         * sese.h (struct sese): Remove field region_basic_blocks.
4705         (SESE_REGION_BBS): Removed.
4706         (bb_in_sese_p): Implement in function of bb_in_region.
4707
4708 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
4709
4710         * graphite-scop-detection.c (limit_scops): Deal only with single exit
4711         loops.
4712
4713 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4714
4715         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
4716         and EQ_EXPR.
4717         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
4718         (add_condition_to_domain): New.
4719         (add_condition_to_pbb): New.
4720         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
4721         * gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
4722
4723 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4724
4725         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
4726         ppl_Pointset_Powerset.
4727         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
4728         * graphite-poly.h (poly_bb): poly_bb.domain Same.
4729         (pbb_nb_loops): Same.
4730         * graphite-sese-to-poly.c (build_loop_iteration_domains,
4731         add_conditions_to_domain): Same.
4732         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
4733         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
4734         ppl_const_Polyhedron_t.
4735         (ppl_print_powerset_matrix): New.
4736         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
4737         ppl_print_powerset_matrix): New.
4738         (ppl_print_polyhedron_matrix): Updated.
4739
4740 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4741
4742         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
4743
4744 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4745
4746         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
4747         (print_iteration_domains, debug_iteration_domain,
4748         debug_iteration_domains): New.
4749         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
4750         debug_iteration_domains): Declared.
4751         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
4752         indenting.
4753
4754 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
4755             Sebastian Pop  <sebastian.pop@amd.com>
4756
4757         * graphite-poly.h (print_iteration_domain): New.
4758         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
4759         (build_sese_conditions_1, build_sese_conditions_after,
4760         build_sese_conditions_before): New.
4761         (build_sese_conditions): Rewritten.
4762
4763 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4764             Tobias Grosser  <grosser@fim.uni-passau.de>
4765
4766         Cleanup of code generation liveouts.
4767         * graphite-clast-to-gimple.c (translate_clast): Use a single
4768         rename_map instead of one per translated statement.
4769         Do not use SESE_LIVEOUT_RENAMES.
4770         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
4771         (gloog): Do not use SESE_LIVEOUT_RENAMES.
4772         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
4773         phi node of a reduction: when a loop contains a reduction used outside
4774         the loop, there should be a scalar close phi node on the exit block.
4775         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
4776         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
4777         (free_sese): Do not free them.
4778         (sese_build_liveouts_use): Do not use them.
4779         (sese_build_liveouts_bb): Same.
4780         (sese_build_liveouts): Same.
4781         (sese_insert_phis_for_liveouts): Same.
4782         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
4783         (defined_in_loop_p): New.
4784         (alive_after_loop): New.
4785         (close_phi_not_yet_inserted_p): New.
4786         (struct alep, alep_p): New.
4787         (add_loop_exit_phis): Remove from the rename_map all the names defined
4788         in the code generated loop.
4789         (insert_loop_close_phis): Traverse the rename_map passed to it.
4790         Don't use SESE_LIVEOUT_RENAMES.
4791         (default_liveout_before_guard): Renamed default_before_guard.
4792         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
4793         (graphite_copy_stmts_from_block): Do not directly call set_rename.
4794         (register_sese_liveout_renames): Removed.
4795         (copy_bb_and_scalar_dependences): Do not call it.
4796         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
4797         reduction_list.
4798         (SESE_LIVEOUT): Removed.
4799         (SESE_LIVEOUT_RENAMES): Removed.
4800         (SESE_REDUCTION_LIST): Removed.
4801         (sese_build_liveouts): Removed.
4802         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
4803         (insert_loop_close_phis): Pass a htab_t instead of a sese.
4804         (insert_guard_phis): Same.
4805         (rename_map_elt): Declare a VEC of them.
4806         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
4807         trees not pointers to trees.
4808
4809         Rewrite in canonical close SSA form:
4810         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
4811         (limit_scops): Close the scop after the block containing the close phi
4812         nodes.
4813         (canonicalize_loop_closed_ssa): New.
4814         (canonicalize_loop_closed_ssa_form): New.
4815         (build_scops): Call canonicalize_loop_closed_ssa_form.
4816
4817         * graphite-sese-to-poly.c: Fix typos.
4818
4819 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
4820
4821         * graphite-poly.c (print_scattering_function, print_pbb_domain):
4822         Extended.
4823         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
4824         (print_pbb): Add conditions.
4825
4826 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
4827             Sebastian Pop  <sebastian.pop@amd.com>
4828
4829         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
4830         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
4831         (build_scop_bbs_1): New.
4832         (build_scop_bbs): Rewrite.
4833         * sese.h (bb_in_region): New.
4834
4835 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4836
4837         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4838         poly_drs vector.
4839         (print_scop): Style.
4840         * graphite-poly.h (poly_bb): Add drs vector.
4841         (PBB_DRS): Add accessor.
4842         * graphite-sese-to-poly.c (build_poly_dr): New.
4843         (build_pbb_drs, build_scop_drs): New.
4844         (build_poly_scop): call build_scop_drs (Disabled at the moment).
4845
4846 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4847
4848         * tree-ssa-loop.c: Include forgotten toplev.h
4849
4850 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4851
4852         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
4853         * gcc.dg/graphite/pr37883.c: Remove -floop-*
4854         * gcc.dg/graphite/pr37928.c: Same
4855         * gcc.dg/graphite/pr38409.c: Same
4856         * gcc.dg/graphite/pr38498.c: Same
4857         * gcc.dg/graphite/pr38559.c: Same
4858         * gcc.dg/graphite/pr39335.c: Same
4859         * gcc.dg/graphite/pr39335_1.c: Same
4860         * gfortran.dg/graphite/block-2.f: Same
4861         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
4862         with -floop-*.
4863
4864 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4865
4866         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
4867         build_access_matrix, build_scop_data_accesses): Remove access function
4868         building. (We get a new version soon).
4869         (build_bb_loops, scan_tree_for_params_right_scev): Update.
4870         * sese.h (nb_loops_around_loop_in_sese): Remove.
4871         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
4872
4873 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
4874             Sebastian Pop  <sebastian.pop@amd.com>
4875
4876         * graphite-scop-detection.c (struct scopdet_info): Rename last
4877         field to exit.
4878         (scopdet_basic_block_info, build_scops_1): Don't use
4879         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
4880
4881 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
4882             Sebastian Pop  <sebastian.pop@amd.com>
4883
4884         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
4885         * sese.c (sese_build_liveouts_use): Renamed from
4886         sese_build_livein_liveouts_use. Remove liveins.
4887         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
4888         Call sese_build_liveouts_use.
4889         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
4890         Call sese_build_liveouts_bb.
4891         (new_sese, free_sese): Remove liveins.
4892         (sese_add_exit_phis_var): Deleted.
4893         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
4894         directly.
4895         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
4896
4897         * sese.h (sese): Remove num_ver and livein.
4898         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
4899
4900 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4901
4902         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
4903
4904 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4905
4906         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
4907         (build_scop_scattering): Do not use compare_prefix_loops any more.
4908         (nb_common_loops): New.
4909
4910 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4911
4912         * sese.c (get_new_name_from_old_name): Renamed get_rename.
4913         (register_old_and_new_names): Renamed set_rename.
4914
4915 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4916
4917         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
4918         of the decl from the previous commit.
4919
4920 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4921
4922         * graphite-scop-detection.c (dot_scop): New.
4923         * graphite-scop-detection.h (dot_scop): Declared.
4924
4925 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4926
4927         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
4928
4929 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4930
4931         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
4932         condition at the end of the loop.
4933         * graphite.c (graphite_initialize, graphite_finalize): Print to
4934         dump_file the compiled function.
4935         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
4936         of create_empty_loop_on_edge.
4937         (translate_clast): Update the code generation of loops for the new
4938         shape of loops.
4939         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
4940
4941 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
4942
4943         Reverted the patch from 2009-03-19.
4944
4945 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
4946
4947         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
4948         poly_drs vector.
4949         (print_scop): Style.
4950         * graphite-poly.h (poly_bb): Add drs vector.
4951         (PBB_DRS): Add accessor.
4952         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
4953         (build_access_matrix_with_af, build_access_matrix,
4954         build_scop_data_accesses): Delete.
4955         (build_poly_dr): New.
4956         (build_pbb_drs, build_scop_drs): New.
4957         (build_poly_scop): call build_scop_drs.
4958
4959 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
4960
4961         * graphite-scop-detection.c (dot_all_scops_1): Close the table
4962         once per basic block.
4963
4964 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4965
4966         * graphite-scop-detection.c (graphite_can_represent_scev): New.
4967         (graphite_can_represent_expr): Renamed from loop_affine_expr
4968         and enhanced.
4969         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
4970         (graphite_cannot_represent_loop): Add scop_entry to parameters.
4971         (scopdet_basic_block_info): Actually define entry_block.
4972         (stmt_simple_memref_p): Moved here from ...
4973
4974         * tree-data-ref.c (stmt_simple_memref_p): here.
4975         * tree-data-ref.h (stmt_simple_memref_p): Removed.
4976
4977 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4978
4979         * gcc.dg/graphite/id-4.c: New.
4980
4981 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
4982
4983         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
4984         (register_old_and_new_names): Update the content of the map.
4985         When there was already a rename_map_elt in the map at that
4986         location, free it.
4987         (copy_bb_and_scalar_dependences): Do rename_variables after
4988         expand_scalar_variables.
4989         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
4990         of the map.  When there was already a rename_map_elt in the
4991         map at that location, free it.
4992         (translate_clast): Pass the rename_map.  Do not initialize and free
4993         a rename_map per stmt_user.
4994         (gloog): Initialize and free one rename_map and pass it to
4995         translate_clast.
4996
4997 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
4998
4999         * sese.c (expand_scalar_variables_stmt,
5000         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
5001         parameter.
5002         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
5003         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
5004         the gimple_stmt_iterator of the statement to be expanded.
5005         * graphite-scop-detection.c (is_simple_operand): Do handle
5006         REALPART_EXPR.
5007
5008 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5009
5010         * graphite-scop-detection.c (is_simple_operand): Do not handle
5011         REALPART_EXPR.
5012         * gcc.dg/graphite/id-2.c: New.
5013
5014         * graphite-sese-to-poly.c (build_bb_loops,
5015         add_value_to_dim, scan_tree_for_params_right_scev,
5016         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
5017         find_params_in_bb, build_loop_iteration_domains,
5018         add_conditions_to_domain): Remove subtract.
5019
5020 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5021
5022         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
5023         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
5024         pbb_loop_at_index -> gbb_loop_at_index.
5025         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
5026         (debug_loop_vec): Delete.
5027         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
5028         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
5029         (PBB_LOOPS): Removed.
5030         (PBB_BLACK_BOX): Insert cast.
5031         (pbb_set_black_box): New setter.
5032         (pbb_loop_at_index, pbb_loop_index): Removed.
5033         (scop_set_region, scop_set_nb_params): New.
5034         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
5035         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
5036         (build_poly_scop): Use scop_set_nb_params.
5037         * sese.h (gimple_bb): Add LOOPS.
5038         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
5039
5040 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5041
5042         Revert previous commit.
5043
5044 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5045
5046         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
5047         (register_old_and_new_names): Update the content of the map.
5048         When there was already a rename_map_elt in the map at that
5049         location, free it.
5050         (copy_bb_and_scalar_dependences): Do rename_variables after
5051         expand_scalar_variables.
5052         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5053         of the map.  When there was already a rename_map_elt in the
5054         map at that location, free it.
5055         (translate_clast): Pass the rename_map.  Do not initialize and free
5056         a rename_map per stmt_user.
5057         (gloog): Initialize and free one rename_map and pass it to
5058         translate_clast.
5059
5060 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5061
5062         Remove forgotten line in revert.
5063
5064 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
5065
5066         Revert previous commit.
5067
5068 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5069
5070         * sese.c (register_old_and_new_names): Update the content
5071         of the map.  When there was already a rename_map_elt in the
5072         map at that location, free it.
5073         (copy_bb_and_scalar_dependences): Do rename_variables after
5074         expand_scalar_variables.
5075         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
5076         of the map.  When there was already a rename_map_elt in the
5077         map at that location, free it.
5078         (translate_clast): Pass the rename_map.  Do not initialize and free
5079         a rename_map per stmt_user.
5080         (gloog): Initialize and free one rename_map and pass it to
5081         translate_clast.
5082
5083 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
5084
5085         * graphite-clast-to-gimple.c (translate_clast): context_loop
5086         is never NULL.
5087
5088 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5089             Sebastian Pop  <sebastian.pop@amd.com>
5090
5091         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
5092         of the use of ppl_Polyhedron_map_space_dimensions.
5093
5094 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5095             Sebastian Pop  <sebastian.pop@amd.com>
5096
5097         * graphite-poly.c (unify_scattering_dimensions): Fix types.
5098         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
5099         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
5100         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
5101         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
5102         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
5103         pbb_nb_params): New.
5104         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
5105         nb_loops_around_pbb): Adapt return types.
5106
5107 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
5108
5109         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5110         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5111         graphite-scop-detection.o, graphite-poly.o): Add
5112         more headers.
5113
5114 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5115
5116         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
5117         graphite-clast-to-gimple.o,  graphite-data-ref.o,
5118         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
5119
5120 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5121
5122         * gcc.dg/graphite/pr37485.c: Remove -floop-block
5123         * gcc.dg/graphite/pr37828.c: Same.
5124         * gcc.dg/graphite/pr37684.c: Same.
5125         * gcc.dg/graphite/block-0.c: Same.
5126         * gcc.dg/graphite/block-1.c: Same.
5127         * gcc.dg/graphite/block-2.c: Same.
5128         * gcc.dg/graphite/block-3.c: Same.
5129         * gcc.dg/graphite/block-4.c: Same.
5130         * gcc.dg/graphite/block-5.c: Same.
5131         * gcc.dg/graphite/block-6.c: Same.
5132         * gfortran.dg/graphite/pr38083.f90: Same.
5133         * gfortran.dg/graphite/block-1.f90: Same.
5134         * gfortran.dg/graphite/block-3.f90: Same.
5135         * gfortran.dg/graphite/pr37852.f90: Same.
5136         * gfortran.dg/graphite/block-4.f90: Same.
5137         * gfortran.dg/graphite/pr37980.f90: Same.
5138         * gfortran.dg/graphite/pr38953.f90: Same.
5139         * gfortran.dg/graphite/pr37857.f90: Same.
5140         * opts.c: Remove -floop-block from -O2.
5141         * graphite-poly.c: Fail if -floop-block -floop-interchange or
5142         -floop-strip-mine are used.
5143
5144 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5145             Sebastian Pop  <sebastian.pop@amd.com>
5146
5147         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
5148         dimensions.
5149         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
5150         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
5151         strip_mine_profitable_p, is_interchange_valid,
5152         graphite_trans_bb_block, graphite_trans_loop_block,
5153         graphite_trans_scop_block): Temporary removed.
5154         (extend_scattering, unify_scattering_dimensions): New.
5155         (print_scattering_function, graphite_read_transforms):
5156         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5157         (graphite_generate_scattering_fns): Removed.
5158         (apply_poly_transforms): Cleanup.
5159         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5160         (schedule_to_scattering): Moved.
5161         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
5162         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
5163         (pbb_nb_scattering): New.
5164         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5165         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
5166         Removed.
5167         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
5168         shift_poly.
5169         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
5170         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
5171         -> PBB_TRANSFORMED_SCATTERING.
5172         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
5173         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
5174         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
5175         (check_poly_representation): Do not return bool.
5176         (graphite_transform_loops): Reformat.
5177         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
5178
5179 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5180
5181         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
5182         debug_pbb_domain, debug_pbb, debug_scop): New.
5183         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
5184         debug_pbb_domain, debug_pbb, debug_scop): Declared.
5185
5186 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5187
5188         PR middle-end/39335
5189         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
5190         when the type precision of the induction variable should be
5191         larger than the type precision of nit.
5192         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
5193         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
5194         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
5195
5196         * gcc.dg/graphite/pr39335_1.c: New.
5197         * gcc.dg/graphite/pr39335.c: New.
5198
5199 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5200
5201         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
5202         SSA_NAMES not struct reduction_info.
5203
5204 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5205
5206         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
5207
5208 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5209             Tobias Grosser  <grosser@fim.uni-passau.de>
5210
5211         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
5212         (free_sese): Free SESE_REDUCTION_LIST.
5213         * sese.h (struct sese): Add field reduction_list.
5214         (SESE_REDUCTION_LIST): New.
5215         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
5216         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
5217
5218 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5219             Tobias Grosser  <grosser@fim.uni-passau.de>
5220
5221         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
5222         of loop_p.
5223
5224 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
5225             Tobias Grosser  <grosser@fim.uni-passau.de>
5226
5227         * tree-parloops.c (struct brli, build_reduction_list_info,
5228         analyze_reduction_list, gather_scalar_reductions): New.
5229         (loop_parallel_p): Build a reduction list containing only
5230         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
5231         (gen_parallel_loop): Call the analysis analyze_reduction_list.
5232         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
5233         * tree-flow.h (gather_scalar_reductions): Declared.
5234
5235 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
5236
5237         PR middle-end/39308
5238         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
5239         number_of_iterations_exit from a gcc_assert.
5240
5241 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
5242             Jan Sjodin  <jan.sjodin@amd.com>
5243
5244         * output.h (graphite_out_file, graphite_in_file): Declared.
5245         * toplev.c (graphite_out_file, graphite_in_file): New.
5246         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
5247         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
5248         Don't call schedule_to_scattering.
5249         * common.opt (fgraphite-write, fgraphite-read): New.
5250         * graphite-poly.c: Include output.h.
5251         (print_scattering_function, print_scattering_functions,
5252         debug_scattering_function, debug_scattering_functions,
5253         graphite_write_transforms, graphite_read_transforms,
5254         graphite_generate_scattering_fns): New.
5255         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
5256         Call graphite_generate_scattering_fns, graphite_write_transforms,
5257         graphite_read_transforms.
5258         (new_poly_bb): Initialize PBB_SCATTERING.
5259         (free_poly_bb): Free PBB_SCATTERING.
5260         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
5261         * graphite-poly.h (struct poly_bb): Add field scattering.
5262         (PBB_SCATTERING): New.
5263         (print_scattering_function, print_scattering_functions,
5264         debug_scattering_function, debug_scattering_functions): Declared.
5265         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
5266         GMP values, not integers!
5267         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
5268         ppl_read_polyhedron_matrix): New.
5269         * graphite-ppl.h (ppl_print_polyhedron_matrix,
5270         debug_ppl_polyhedron_matrix,
5271         ppl_read_polyhedron_matrix): Declared.
5272         * Makefile.in (graphite-poly.o): Depends on output.h.
5273
5274 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5275             Tobias Grosser  <grosser@fim.uni-passau.de>
5276
5277         Revert this change:
5278         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5279         scalar evolutions in the scop_entry->loop_father.
5280
5281 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5282             Tobias Grosser  <grosser@fim.uni-passau.de>
5283
5284         * graphite.h (ref_nb_loops): Remove declaration.
5285         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
5286         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
5287         debug_gbb): Moved to sese.h.
5288         * sese.h: As said.
5289
5290 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5291             Tobias Grosser  <grosser@fim.uni-passau.de>
5292
5293         * graphite-data-ref.[ch]: Disable.
5294
5295 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5296             Tobias Grosser  <grosser@fim.uni-passau.de>
5297
5298         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
5299         scalar evolutions in the scop_entry->loop_father.
5300
5301 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5302
5303         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
5304         (graphite_cannot_represent_loop_niter): Renamed
5305         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
5306         (limit_scops): build_sese_loop_nests does not return a bool.
5307         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
5308         * sese.c (nb_reductions_in_loop): ... from here.
5309         (graphite_loop_normal_form): ... from here.
5310         (sese_record_loop): Does not fail, so does not return a bool.
5311         (build_sese_loop_nests): Same.
5312         * sese.h (build_sese_loop_nests): Update declaration.
5313         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
5314         (build_graphite_loop_normal_form): New.
5315         (gloog): Call build_graphite_loop_normal_form.
5316         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
5317         build_sese_loop_nests.
5318
5319         * gcc.dg/graphite/id-1.c: New.
5320
5321 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
5322             Tobias Grosser  <grosser@fim.uni-passau.de>
5323
5324         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
5325         The SCoP detection fix is sufficient.
5326
5327 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5328
5329         PR tree-optimization/39260
5330         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
5331         the basic block contains a condition with a real type.
5332         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
5333
5334         * gcc.dg/graphite/pr39260.c: New.
5335
5336 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5337
5338         * graphite-poly.c: Inlcude params.h.
5339         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
5340         the size of a tile.
5341         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
5342         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
5343
5344 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5345             Tobias Grosser  <grosser@fim.uni-passau.de>
5346
5347         * graphite-scop-detection.c (dot_all_scops_1,
5348         dot_all_scops): Moved here.
5349         * graphite-scop-detection.h (dot_all_scops): Declared here.
5350         * graphite.c (graphite_initialize, graphite_finalize): New.
5351         (graphite_transform_loops): Cleaned up.
5352         * sese.c (debug_oldivs): Moved here.
5353         * graphite-poly.c (graphite_apply_transformations): Renamed
5354         apply_poly_transforms.
5355         (debug_loop_vec): Moved here.
5356         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
5357         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
5358         find_scop_parameters, build_scop_iteration_domain,
5359         add_conditions_to_constraints, build_scop_canonical_schedules,
5360         build_scop_data_accesses): Now static.
5361         (build_poly_scop, check_poly_representation): New.
5362
5363 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5364
5365         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
5366         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
5367         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
5368         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
5369         scan_tree_for_params_right_scev, scan_tree_for_params_int,
5370         scan_tree_for_params, struct irp_data, dx_record_params,
5371         find_params_in_bb, find_scop_parameters, gbb_from_bb,
5372         build_loop_iteration_domains, add_conditions_to_domain,
5373         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
5374         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
5375         build_sese_conditions, add_conditions_to_constraints,
5376         build_scop_iteration_domain, build_access_matrix_with_af,
5377         build_access_matrix,
5378         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
5379
5380         * graphite-sese-to-poly.c: New.
5381         * graphite-sese-to-poly.h: New.
5382
5383         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
5384
5385 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5386
5387         * graphite.c: Split graphite code generation to a new file.
5388         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
5389         max_precision_type, clast_to_gcc_expression_red,
5390         clast_to_gcc_expression, gcc_type_for_clast_expr,
5391         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
5392         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
5393         graphite_create_new_guard, clast_get_body_of_loop,
5394         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
5395         graphite_create_new_loop, build_iv_mapping, copy_renames,
5396         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
5397         compute_cloog_iv_types, free_scattering, save_var_name,
5398         initialize_cloog_names, build_scop_context, build_cloog_prog,
5399         set_cloog_options, debug_clast_stmt, scop_to_clast,
5400         print_generated_program, debug_generated_program,
5401         gloog): Moved to graphite-clast-to-gimple.c.
5402
5403         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
5404
5405         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
5406         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
5407         loop_iv_stack_pop, loop_iv_stack_get_iv,
5408         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
5409         free_loop_iv_stack, loop_iv_stack_remove_constants,
5410         debug_rename_elt, debug_rename_map_1, debug_rename_map,
5411         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
5412         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
5413         eq_ivtype_map_elts, sese_add_exit_phis_edge,
5414         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
5415         get_vdef_before_sese, sese_adjust_vphi,
5416         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
5417         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
5418         is_iv, expand_scalar_variables_ssa_name,
5419         expand_scalar_variables_expr, expand_scalar_variables_stmt,
5420         expand_scalar_variables, rename_variables, remove_condition,
5421         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
5422         add_loop_exit_phis, insert_loop_close_phis, struct igp,
5423         default_liveout_before_guard, add_guard_exit_phis,
5424         insert_guard_phis, register_old_and_new_names,
5425         graphite_copy_stmts_from_block, register_sese_liveout_renames,
5426         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
5427         if_region_set_false_region, create_if_region_on_edge,
5428         move_sese_in_condition): Moved to sese.c.
5429
5430         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
5431         if_region_exit, if_region_get_condition_block,
5432         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
5433         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
5434         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
5435         ivtype_map_elt, new_ivtype_map_elt,
5436         recompute_all_dominators): Moved to sese.h.
5437
5438         * graphite-clast-to-gimple.c: New.
5439         * graphite-clast-to-gimple.h: New.
5440         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
5441         * sese.c: Modified as said above.
5442         * sese.h: Same.
5443
5444 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
5445
5446         * graphite.c: Split scop detection to a new file.
5447         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
5448         move_sd_regions, loop_affine_expr, exclude_component_ref,
5449         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
5450         graphite_cannot_represent_loop_niter, struct scopdet_info,
5451         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
5452         find_single_entry_edge, find_single_exit_edge,
5453         create_single_entry_edge, sd_region_without_exit,
5454         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
5455         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
5456         Moved to graphite-scop-detection.c.
5457
5458         * graphite-scop-detection.c: New.
5459         * graphite-scop-detection.h: New.
5460         * Makefile.in: Add new rule for graphite-scop-detection.o.
5461
5462         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
5463         tree-scalar-evolution.h.
5464         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
5465         build_sese_loop_nests): Moved here from graphite.c.
5466         (param_index): Renamed parameter_index_in_region.
5467
5468 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5469             Sebastian Pop  <sebastian.pop@amd.com>
5470
5471         * gcc.dg/graphite/block-0.c: Expected to fail now.
5472         * gcc.dg/graphite/block-1.c: Same.
5473         * gcc.dg/graphite/block-5.c: Same.
5474         * gcc.dg/graphite/block-6.c: Same.
5475
5476 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
5477             Sebastian Pop  <sebastian.pop@amd.com>
5478
5479         * graphite.h: Separate from graphite_bb_p the polyhedral
5480         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
5481         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
5482         graphite-data-ref.h.
5483         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
5484         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
5485         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
5486         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
5487         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
5488         scop_nb_params): Moved to graphite-poly.h.
5489         * graphite-data-ref.c: Same.
5490         * graphite-data-ref.h: New.
5491         * graphite.c: Same.
5492         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
5493         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
5494         is_interchange_valid, graphite_trans_bb_block,
5495         graphite_trans_loop_block, scop_max_loop_depth,
5496         graphite_trans_scop_block, graphite_apply_transformations,
5497         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
5498         graphite-poly.c.
5499         * graphite-poly.h: New.
5500         * graphite-poly.c: New.
5501         * Makefile.in (OBJS-common): Add graphite-poly.o.
5502         (graphite-poly.o): New rule.
5503         * tree-data-ref.h (struct data_reference): Remove unused scop field.
5504         (DR_SCOP): Removed.
5505
5506 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5507             Tobias Grosser  <grosser@fim.uni-passau.de>
5508
5509         * graphite.c: Replace gb -> gbb.
5510         * graphite.h: Same.
5511         * graphite-data-ref.c: Same.
5512
5513 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
5514             Tobias Grosser  <grosser@fim.uni-passau.de>
5515
5516         * Makefile.in (OBJS-commmon): Add sese.o.
5517         (sese.o): New.
5518         (graphite.o): Add sese.h.
5519         * graphite.c (bb_in_ss_p, loop_in_sese_p,
5520         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
5521         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
5522         Move to sese.
5523         (block_before_scop): Add missing return.
5524         (new_scop, free_scop): Remove SESE data structures.
5525         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
5526         find_scop_parameters, build_loop_iteration_domains,
5527         add_conditions_to_domain, register_scop_liveout_renames,
5528         copy_bb_and_scalar_dependences): Scop -> SESE.
5529
5530         (add_conditions_to_domain): SCoP -> SESE and remove check
5531         (scop_contains_non_iv_scalar_phi_nodes): New.
5532         (build_scop_conditions_1, build_scop_conditions): Remove check for
5533         non iv scalar phi nodes.
5534         (print_scop_statistics): New.
5535         (graphite_transform_loops): Cleanup.
5536
5537         * graphite.h: Move to sese & cleanup.
5538         * sese.c: New.
5539         * sese.h: New.
5540
5541 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5542             Tobias Grosser  <grosser@fim.uni-passau.de>
5543
5544         * graphite.c (build_scop_conditions_1): Conditions are only
5545         at the end of a basic block.
5546
5547 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5548             Tobias Grosser  <grosser@fim.uni-passau>
5549
5550         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
5551         field.
5552         (GBB_ALPHA): Removed.
5553
5554 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5555             Tobias Grosser  <grosser@fim.uni-passau.de>
5556
5557         * graphite-data-ref.c (graphite_test_dependence): Don't use
5558         GBB_DYNAMIC_SCHEDULE.
5559         * graphite.c (new_graphite_bb): Same.
5560         (free_graphite_bb): Same.
5561         (build_scop_dynamic_schedules): Removed.
5562         (graphite_transform_loops): Don't call it.
5563         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
5564         (GBB_DYNAMIC_SCHEDULE): Removed.
5565
5566 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5567             Tobias Grosser  <grosser@fim.uni-passau.de>
5568
5569         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
5570         (print_graphite_bb): Same.
5571         (build_cloog_prog): Same.
5572
5573 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5574             Tobias Grosser  <grosser@fim.uni-passau.de>
5575
5576         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
5577
5578 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5579             Tobias Grosser  <grosser@fim.uni-passau.de>
5580
5581         * graphite.c (build_scop_context): Don't use CloogMatrix.
5582         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
5583         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
5584
5585 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5586             Tobias Grosser  <grosser@fim.uni-passau.de>
5587
5588         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
5589         liveout_renames, add_params fields...
5590         (struct sese): ... here.
5591         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
5592         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
5593
5594 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5595             Tobias Grosser  <grosser@fim.uni-passau.de>
5596
5597         * graphite.c (print_scop): Do not print the CLooG program.
5598         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
5599         build_cloog_prog, gloog): Don't use SCOP_PROG.
5600         (find_transform): Renamed scop_to_clast.
5601         (print_generated_program, debug_generated_program): New.
5602         (graphite_transform_loops): Adapt to new interface.
5603         * graphite.h (struct scop): Remove program field.
5604         (SCOP_PROG): Removed.
5605         (print_generated_program, debug_generated_program): Declared.
5606
5607 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
5608
5609         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
5610         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
5611         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
5612         free_graphite_bb, build_scop_canonical_schedules,
5613         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
5614         schedules are now represented using a ppl_Linear_Expression_t.
5615         * graphite.h (struct graphite_bb): Same.
5616         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
5617         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
5618
5619 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5620
5621         * graphite.c: Free local memory.
5622         * graphite-ppl.c: Same.
5623
5624 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
5625
5626         * graphite.c (const_column_index, get_first_matching_sign_row_index,
5627         get_lower_bound_row, get_upper_bound_row, copy_constraint,
5628         swap_constraint_variables, scale_constraint_variable): Removed.
5629         (graphite_trans_bb_strip_mine): Remove pong.
5630         * graphite-ppl.c: Include missing header files.
5631         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
5632         * graphite-ppl.h (ppl_strip_loop): Declared.
5633         * Makefile.in (graphite-ppl.o): Adjust dependences.
5634
5635 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
5636
5637         * graphite.c (build_loop_iteration_domains): Remove ping pong.
5638         (build_scop_iteration_domain): Same.
5639
5640 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5641
5642         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5643         ping pong.
5644         (add_value_to_dim, scan_tree_for_params_right_scev,
5645         scan_tree_for_params_int): New.
5646         * graphite-ppl.c (oppose_constraint): New.
5647         (insert_constraint_into_matrix): Implement missing cases.
5648         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5649
5650 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
5651
5652         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5653         use ppl_move_dimension.
5654
5655 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5656
5657         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
5658         * graphite.c: Same.
5659         * graphite.h: Same.
5660         * graphite-ppl.c: Same.
5661         * graphite-ppl.h: Same.
5662
5663 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
5664
5665         Revert last 3 commits.
5666
5667 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5668
5669         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
5670         ping pong.
5671         (add_value_to_dim, scan_tree_for_params_right_scev,
5672         scan_tree_for_params_int): New.
5673         * graphite-ppl.c (oppose_constraint): New.
5674         (insert_constraint_into_matrix): Implement missing cases.
5675         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
5676
5677 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5678
5679         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
5680
5681 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5682             Tobias Grosser  <grosser@fim.uni-passau.de>
5683
5684         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
5685         use ppl_move_dimension.
5686         * graphite-ppl.c (ppl_move_dimension): New.
5687         * graphite-ppl.h (ppl_move_dimension): Declared.
5688
5689 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
5690
5691         * graphite.c: Do not include cloog/cloog.h.
5692         (print_graphite_bb): Remove ping pong, call PPL print function.
5693
5694 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5695
5696         * Makefile.in (OBJS-common): Add graphite-ppl.o.
5697         (graphite.o): Add dependence on graphite-ppl.h.
5698         (graphite-ppl.o): New.
5699         (graphite-data-ref.c): Ping pong between PPL data structures
5700         and matrices.
5701         * graphite-ppl.c: New.
5702         * graphite-ppl.h: New.
5703         * graphite.c: Include graphite-ppl.h.
5704         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
5705         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
5706         Ping pong between PPL data structures and matrices.
5707         (new_graphite_bb): Create a PPL constraint system.
5708         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
5709         (build_loop_iteration_domains): Use PPL functions.
5710         * graphite.h: Include graphite-ppl.h.  Fix comments.
5711         (graphite_bb): Use a ppl_Constraint_System_t instead of
5712         CloogMatrix for representing the domain.
5713         (scop): Remove static_schedule.
5714         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
5715
5716 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
5717
5718         * graphite.c: Fix some comments.
5719
5720 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5721
5722         PR middle-end/38953
5723         * graphite.c (if_region_set_false_region): After moving a region
5724         in the false branch of a condition, remove the empty dummy
5725         basic block.
5726         (gloog): Remove wrong fix for PR38953.
5727
5728 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5729
5730         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
5731         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
5732         register_bb_in_sese, new_sese, free_sese): Moved.
5733         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
5734         outermost_loop_in_scop, build_scop_iteration_domain,
5735         expand_scalar_variables_ssa_name, get_vdef_before_scop,
5736         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
5737         Use loop_in_sese_p instead of loop_in_scop_p.
5738         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
5739         (free_scop): Do not free SCOP_BBS_B.
5740         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
5741         ref_nb_loops): Moved here...
5742         * graphite.h (ref_nb_loops): ... from here.
5743         (struct scop): Remove bbs_b bitmap.
5744         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
5745         * gcc.dg/graphite/scop-19.c: New
5746
5747 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
5748
5749         * graphite.c (scopdet_basic_block_info): Fix bug in scop
5750         detection.
5751
5752 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5753
5754         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5755         eq_loop_to_cloog_loop): Remove.
5756         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
5757         * graphite.h (struct scop): Remove loop2cloog_loop.
5758         (loop_domain_dim, loop_iteration_vector_dim): Remove.
5759
5760 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
5761
5762         * opts.c (decode_options): Only add graphite options to O2
5763         if we compile with graphite enabled.
5764
5765 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5766
5767         * Merge from mainline (r143163:143684).
5768
5769 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
5770
5771         * graphite.c (debug_value): Removed.
5772         * graphite.h (debug_value): Removed.
5773
5774 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5775
5776         * passes.c (init_optimization_passes): Do not call pass_copy_prop
5777         after graphite: pass_copy_prop does not maintain a proper loop closed
5778         SSA form.  pass_copy_prop should be fixed.
5779
5780 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5781
5782         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
5783
5784 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
5785
5786         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
5787         (gloog): Split the exit of the scop when the scop exit is a loop exit.
5788         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
5789         changed the CFG.
5790
5791 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
5792
5793         * graphite.c (gloog): Return true when code gen succeeded.
5794         (graphite_transform_loops): Do not call cleanup_tree_cfg if
5795         the code of the function did not changed.  After cleanup_tree_cfg
5796         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
5797         form.
5798
5799 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
5800
5801         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
5802         gimple_call_lhs is NULL.
5803
5804 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
5805             Tobias Grosser  <tobi.grosser@amd.com>
5806
5807         * graphite.c (graphite_trans_scop_block): Do not block single
5808         nested loops.
5809
5810 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5811             Tobias Grosser  <tobi.grosser@amd.com>
5812
5813         * graphite.c (build_scop_canonical_schedules): Start schedules at
5814         zero.
5815
5816 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
5817             Tobias Grosser  <tobi.grosser@amd.com>
5818
5819         * graphite.c (compare_prefix_loops): New.
5820         (build_scop_canonical_schedules): Rewritten.
5821         (graphite_transform_loops): Move build_scop_canonical_schedules
5822         after build_scop_iteration_domain.
5823
5824 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5825             Tobias Grosser  <tobi.grosser@amd.com>
5826
5827         * graphite.c (add_conditions_to_domain): Add the loops to
5828         the dimension of the iteration domain.  Do copy the domain
5829         only when it exists.
5830         (build_scop_conditions_1): Do not call add_conditions_to_domain.
5831         (add_conditions_to_constraints): New.
5832         (can_generate_code_stmt, can_generate_code): Removed.
5833         (gloog): Do not call can_generate_code.
5834         (graphite_transform_loops): Call add_conditions_to_constraints
5835         after building the iteration domain.
5836
5837 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5838             Tobias Grosser  <tobi.grosser@amd.com>
5839             Jan Sjodin  <jan.sjodin@amd.com>
5840
5841         * graphite.c (scan_tree_for_params): On substractions negate
5842         all the coefficients of the term.
5843         (clast_to_gcc_expression_red): New.  Handle reduction expressions
5844         of more than two operands.
5845         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
5846         (get_vdef_before_scop): Handle also the case of default definitions.
5847
5848 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
5849
5850         PR middle-end/38431
5851         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
5852         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
5853         (gloog): Do not call cleanup_tree_cfg.
5854         (graphite_transform_loops): Call cleanup_tree_cfg after all
5855         scops have been code generated.
5856
5857 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5858
5859         * passes.c (init_optimization_passes): Schedule after
5860         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
5861
5862 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
5863
5864         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
5865         Fix comment.
5866         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
5867         Set the type of an expression to the type of its assign statement.
5868         (expand_scalar_variables_expr):  Do not pass loop_p.
5869         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
5870         (copy_bb_and_scalar_dependences): Do not pass loop_p.
5871         (translate_clast): Update call to copy_bb_and_scalar_dependences.
5872
5873 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5874
5875         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
5876         an expression to the gimple_expr_type of its assign statement.
5877         (expand_scalar_variables_expr): Stop recursion on tcc_constant
5878         or tcc_declaration.
5879
5880 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
5881
5882         PR tree-optimization/38786
5883         * gcc.dg/graphite/pr38786.c: New.
5884         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
5885         the SSA_NAME case of expand_scalar_variables_expr.
5886         (expand_scalar_variables_expr): Also gather the scalar computation
5887         used to index the memory access.
5888         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
5889         the gimple_stmt_iterator where it inserts new code.
5890
5891 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5892
5893         * gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
5894
5895 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
5896
5897         * opts.c (decode_options): Enable flag_graphite_identity and
5898         flag_loop_block in -O2 and above.
5899
5900 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5901
5902         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
5903         Fix merge problem: replace with the file from trunk.
5904
5905 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
5906
5907         * Merge from mainline (r141727:143163).
5908
5909 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
5910             Jan Sjodin  <jan.sjodin@amd.com>
5911
5912         PR tree-optimization/38559
5913         * gcc.dg/graphite/pr38559.c: New.
5914
5915         * graphite.c (debug_value, copy_constraint,
5916         swap_constraint_variables, scale_constraint_variable, ): New.
5917         (get_lower_bound, get_upper_bound): Removed.
5918         (graphite_trans_bb_strip_mine): Clean up this code that works
5919         only for constant number of iterations.  Fully copy upper and
5920         lower bound constraints, not only the constant part of them.
5921         * graphite.h (debug_value): Declared.
5922
5923 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
5924
5925         PR tree-optimization/38492
5926         PR tree-optimization/38498
5927         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
5928         * tree-chrec.h (scev_is_linear_expression): Declared.
5929         * graphite.c (graphite_cannot_represent_loop_niter): New.
5930         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
5931         (graphite_loop_normal_form): Use gcc_assert.
5932         (scan_tree_for_params): Use CASE_CONVERT.
5933         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
5934         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
5935         Use gcc_assert.  Discard scops that contain unhandled cases.
5936         (build_scop_conditions): Return a boolean status for unhandled cases.
5937         (strip_mine_profitable_p): Print the loop number, not its depth.
5938         (is_interchange_valid): Pass the depth of the loop nest, don't
5939         recompute it wrongly.
5940         (graphite_trans_bb_block): Same.
5941         (graphite_trans_bb_block): Print tentative of loop blocking.
5942         (graphite_trans_scop_block): Do not print that the loop has been
5943         blocked.
5944         (graphite_transform_loops): Do not handle scops that contain condition
5945         scalar phi nodes.
5946
5947         * gcc.dg/graphite/pr38500.c: Fixed warning as committed
5948         in trunk.
5949         * gcc.dg/graphite/block-0.c: Update test.
5950         * gcc.dg/graphite/block-1.c: Same.
5951         * gcc.dg/graphite/block-2.c: Remove xfail and test for
5952         blocking.
5953         * gcc.dg/graphite/block-4.c: Remove test for strip mine.
5954         * gcc.dg/graphite/block-3.c: New.
5955         * gcc.dg/graphite/pr38498.c: New.
5956
5957 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
5958
5959         PR tree-optimization/38510
5960         * gcc.dg/graphite/pr38510.c: New.
5961         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
5962           (translate_clast): Call recompute_all_dominators before
5963           graphite_verify.
5964           (gloog): Call recompute_all_dominators before graphite_verify.
5965
5966 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5967
5968         PR tree-optimization/38492
5969         * graphite.c (rename_map_elt, debug_rename_elt,
5970         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
5971         rename_map_elt_info, eq_rename_map_elts,
5972         get_new_name_from_old_name, bb_in_sese_p): Moved around.
5973         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
5974         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
5975         (sese_build_livein_liveouts): New.
5976         (new_sese, free_sese): New.
5977         (new_scop): Call new_sese.
5978         (free_scop): Call free_sese.
5979         (rename_variables_from_edge, rename_phis_end_scop): Removed.
5980         (register_old_new_names): Renamed register_old_and_new_names.
5981         (register_scop_liveout_renames, add_loop_exit_phis,
5982         insert_loop_close_phis, struct igp,
5983         default_liveout_before_guard, add_guard_exit_phis,
5984         insert_guard_phis, copy_renames): New.
5985         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
5986         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
5987         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
5988         (scop_adjust_phis_for_liveouts): New.
5989         (gloog): Call scop_adjust_phis_for_liveouts.
5990
5991         * graphite.h (struct sese): Documented.  Added fields liveout,
5992         num_ver and livein.
5993         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
5994         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
5995         (struct scop): Added field liveout_renames.
5996         (SCOP_LIVEOUT_RENAMES): New.
5997
5998 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
5999
6000         PR tree-optimization/38409
6001         * gcc.dg/graphite/pr38409.c: New.
6002         * graphite.c (nb_reductions_in_loop): Use simple_iv.
6003
6004 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6005
6006         * graphite.c (gcc_type_for_cloog_iv): By default return
6007         integer_type_node.
6008         (graphite_create_new_loop): Don't fold_convert the already
6009         fold_convert-ed expression.
6010
6011 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
6012
6013         PR tree-optimization/38446
6014         * gcc.dg/graphite/pr38446.c: New.
6015         * graphite.c (register_bb_in_sese): New.
6016         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
6017         looking at the bbs in the region.
6018         * graphite.h (sese): Add region_basic_blocks pointer set to
6019         structure and initialize at the time of defining new scop.
6020
6021 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6022
6023         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
6024         (find_params_in_bb): Do not free data refs.
6025         (free_graphite_bb): Add FIXME on disabled free_data_refs.
6026
6027 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
6028
6029         * gcc.dg/graphite/scop-16.c: Test only scop specific info.
6030         * gcc.dg/graphite/scop-17.c: Same.
6031         * gcc.dg/graphite/block-5.c: New.
6032         * gcc.dg/graphite/block-6.c: New.
6033         * gcc.dg/graphite/pr37485.c: Clean dump file after.
6034         * gcc.dg/graphite/pr37684.c: Same.
6035         * gcc.dg/graphite/block-2.c: Same.
6036
6037         * graphite.c (struct ivtype_map_elt): New.
6038         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
6039         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
6040         gcc_type_for_cloog_iv): New.
6041         (loop_iv_stack_patch_for_consts): Use the type of the induction
6042         variable from the original loop, except for the automatically
6043         generated loops, i.e., in the case of a strip-mined loop, in
6044         which case there is no original loop: in that case just use
6045         integer_type_node.
6046         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
6047         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
6048         (clast_name_to_gcc): Accept params to be NULL.
6049         (clast_to_gcc_expression): Take an extra parameter for the type.
6050         Convert to that type all the expressions built by this function.
6051         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
6052         (graphite_translate_clast_equation): Compute the type of the
6053         clast_equation before translating its LHS and RHS.
6054         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
6055         (graphite_create_new_loop): Compute the type of the induction
6056         variable before translating the lower and upper bounds and before
6057         creating the induction variable.
6058         (rename_variables_from_edge, rename_phis_end_scop): New.
6059         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
6060         (sese_add_exit_phis_edge): Do not use integer_zero_node.
6061         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
6062         compute_cloog_iv_types): New.
6063         (gloog): Call compute_cloog_iv_types before starting the
6064         translation of the clast.
6065
6066         * graphite.h (struct graphite_bb): New field cloog_iv_types.
6067         (GBB_CLOOG_IV_TYPES): New.
6068         (debug_ivtype_map): Declared.
6069         (oldiv_for_loop): New.
6070
6071 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
6072
6073         PR middle-end/38459
6074         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
6075         (param_index): Assert if parameter is not know after parameter
6076         detection.
6077         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
6078         (find_scop_parameters): Mark, that we have finished parameter
6079         detection.
6080         (graphite_transform_loops): Move condition detection before parameter
6081         detection.
6082         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
6083         * gfortran.dg/graphite/pr38459.f90: New.
6084
6085 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6086
6087         * graphite.c (graphite_transform_loops): Always call find_transform ()
6088         in ENABLE_CHECKING.  So we test these code paths, even if we do not
6089         generate code.
6090
6091 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
6092
6093         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
6094         (print_scop): Ditto.
6095
6096 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6097
6098         PR middle-end/38084
6099         Fix gfortran.dg/graphite/id-3.f90.
6100         * graphite.c (scopdet_basic_block_info): Fix bug that found some
6101         regions more than once.
6102
6103 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6104
6105         Fix gfortran.dg/graphite/id-4.f90.
6106         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
6107         when not needed.
6108
6109 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6110
6111         Fix gfortran.dg/graphite/id-1.f90.
6112         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
6113         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
6114         (max_precision_type): New.
6115         (value_clast): Removed.
6116         (clast_to_gcc_expression): Be more careful to types of expressions.
6117         Use max_precision_type and update use of gmp_cst_to_tree.
6118         (graphite_translate_clast_equation): Use max_precision_type.
6119         (graphite_create_guard_cond_expr): Do not use integer_type_node,
6120         use the type of the condition.
6121         (graphite_create_new_loop): Do not use integer_type_node, use the
6122         max_precision_type of lb and ub.
6123
6124 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
6125
6126         * graphite.c (build_scops_1): Initialize open_scop.exit
6127         and sinfo.last.
6128
6129 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6130
6131         * gcc.dg/graphite/pr38084.c: New.
6132         * gfortran.dg/graphite/id-1.f90: New.
6133         * gfortran.dg/graphite/id-2.f90: New.
6134         * gfortran.dg/graphite/id-3.f90: New.
6135         * gfortran.dg/graphite/id-4.f90: New.
6136         * gfortran.dg/graphite/pr37857.f90: New.
6137
6138 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
6139             Jan Sjodin  <jan.sjodin@amd.com>
6140             Harsha Jagasia  <harsha.jagasia@amd.com>
6141
6142         PR middle-end/37852
6143         PR middle-end/37883
6144         PR middle-end/37928
6145         PR middle-end/37980
6146         PR middle-end/38038
6147         PR middle-end/38039
6148         PR middle-end/38073
6149         PR middle-end/38083
6150         PR middle-end/38125
6151
6152         * gcc.dg/graphite/pr38073.c: New.
6153         * gcc.dg/graphite/pr37928.c: New.
6154         * gcc.dg/graphite/pr37883.c: New.
6155         * gcc.dg/graphite/pr38125.c: New.
6156         * gfortran.dg/graphite/pr38083.f90: New.
6157         * gfortran.dg/graphite/pr37852.f90: New.
6158         * gfortran.dg/graphite/pr37980.f90: New.
6159
6160         * gcc.dg/graphite/scop-18.c: Remove reduction, test for
6161         the number of detected scops.  Copy exact same test for loop
6162         blocking...
6163         * gcc.dg/graphite/block-1.c: Fix the number of expected
6164         loops to be blocked as reductions are not handled.
6165         * gcc.dg/graphite/block-4.c: ...here.  New.
6166
6167         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
6168         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
6169         ...here.
6170         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
6171         * Makefile.in (graphite.o): Depend on value-prof.h.
6172         (graphite.o-warn): Removed -Wno-error.
6173         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
6174         to be a NULL pointer.  Call update_stmt.  Return the newly created
6175         cannonical induction variable.
6176
6177         * graphite.h (debug_rename_map): Declared.  Fix some comments.
6178
6179         * graphite.c: Reimplement the code generation from graphite to gimple.
6180         Include value-prof.h.
6181         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
6182         (get_old_iv_from_ssa_name): Removed.
6183         (graphite_stmt_p): New.
6184         (new_graphite_bb): Test for useful statements before building a
6185         graphite statement for the basic block.
6186         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
6187         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
6188         reason.
6189         (recompute_all_dominators, graphite_verify,
6190         nb_reductions_in_loop, graphite_loop_normal_form): New.
6191         (scop_record_loop): Call graphite_loop_normal_form.
6192         (build_scop_loop_nests): Iterate over all the blocks of the
6193         function instead of relying on the incomplete information from
6194         SCOP_BBS.  Return the success of the operation.
6195         (find_params_in_bb): Use the data from GBB_DATA_REFS.
6196         (add_bb_domains): Removed.
6197         (build_loop_iteration_domains): Don't call add_bb_domains.
6198         Add the iteration domain only to the basic blocks that have been
6199         translated to graphite.
6200         (build_scop_conditions_1): Add constraints only if the basic
6201         block have been translated to graphite.
6202         (build_scop_data_accesses): Completely disabled until data
6203         dependence is correctly implemented.
6204         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
6205         (remove_all_edges_1, remove_all_edges): Removed.
6206         (get_new_name_from_old_name): New.
6207         (graphite_rename_variables_in_stmt): Renamed
6208         rename_variables_in_stmt.  Call get_new_name_from_old_name.
6209         Use replace_exp and update_stmt.
6210         (is_old_iv): Renamed is_iv.
6211         (expand_scalar_variables_stmt): Extra parameter for renaming map.
6212         Use replace_exp and update_stmt.
6213         (expand_scalar_variables_expr): Same.  Use the map to get the
6214         new names for the renaming of induction variables and for the
6215         renaming of variables after a basic block has been copied.
6216         (expand_scalar_variables): Same.
6217         (graphite_rename_variables): Renamed rename_variables.
6218         (move_phi_nodes): Removed.
6219         (get_false_edge_from_guard_bb): New.
6220         (build_iv_mapping): Do not insert the induction variable of a
6221         loop in the renaming iv map if the basic block does not belong
6222         to that loop.
6223         (register_old_new_names, graphite_copy_stmts_from_block,
6224         copy_bb_and_scalar_dependences): New.
6225         (translate_clast): Heavily reimplemented: copy basic blocks,
6226         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
6227         At each translation step call graphite_verify ensuring the
6228         consistency of the SSA, loops and dominators information.
6229         (collect_virtual_phis, find_vdef_for_var_in_bb,
6230         find_vdef_for_var_1, find_vdef_for_var,
6231         patch_phis_for_virtual_defs): Removed huge hack.
6232         (mark_old_loops, remove_dead_loops, skip_phi_defs,
6233         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
6234         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
6235         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
6236         if_region_get_condition_block, if_region_set_false_region,
6237         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
6238         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
6239         sese_add_exit_phis_edge, sese_add_exit_phis_var,
6240         rewrite_into_sese_closed_ssa): New.
6241         (gloog): Remove dead code.  Early return if code cannot be
6242         generated.  Call cleanup_tree_cfg once the scop has been code
6243         generated.
6244         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
6245         block loops with less than two loops.
6246         (graphite_apply_transformations): Remove the call to
6247         scop_remove_ignoreable_gbbs.
6248         (limit_scops): When build_scop_loop_nests fails, continue on
6249         the next scop.  Fix open_scop.entry.
6250         (graphite_transform_loops): Call recompute_all_dominators: force the
6251         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
6252         Call initialize_original_copy_tables and free_original_copy_tables
6253         to be able to copy basic blocks during code generation.
6254         When build_scop_loop_nests fails, continue on next scop.
6255         (value_clast): New union.
6256         (clast_to_gcc_expression): Fix type cast warning.
6257
6258 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
6259
6260         * Merge from mainline (r140838:141727).
6261
6262 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6263
6264         PR middle-end/37833
6265
6266         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
6267
6268 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
6269
6270         PR middle-end/37943
6271
6272         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
6273         exits and conditions.
6274         * gcc.dg/graphite/pr37943.c: New.
6275
6276 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6277
6278         PR middle-end/37886
6279         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
6280
6281 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
6282
6283         * doc/invoke.texi: Fix spaces.
6284
6285 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
6286
6287         PR tree-optimization/37891
6288         Reverted last commit.
6289         * graphite.c (create_single_entry_edge): Set
6290         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6291
6292 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
6293             Mitul Thakkar  <mitul.thakkar@amd.com>
6294
6295         * graphite.c (create_single_entry_edge): Set
6296         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
6297
6298 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
6299
6300         * doc/invoke.texi: Add -fgraphite-identity.
6301         * graphite.c (graphite_apply_transformations): Check for
6302         -fgraphite-identity.
6303         * toplev.c (process_options): Add flag_graphite_identity.
6304         * tree-ssa-loop.c: Add flag_graphite_identity.
6305
6306 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6307
6308         Undo changes from 2008-10-02:
6309         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6310         operand type when copying the operand to a variable of different type.
6311         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6312         with the IV name after increment.
6313
6314 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
6315             Harsha Jagasia  <harsha.jagasia@amd.com>
6316
6317         PR tree-optimization/37828
6318         * gcc.dg/graphite/pr37828.c: New.
6319         * graphite.c (graphite_trans_loop_block): Do not loop block
6320         single nested loops.
6321
6322 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
6323             Sebastian Pop  <sebastian.pop@amd.com>
6324
6325         * graphite.c (struct rename_map_elt, new_rename_map_elt,
6326         rename_map_elt_info, eq_rename_map_elts): New.
6327         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
6328         (expand_scalar_variables_expr): Change parameters.
6329         (expand_scalar_variables_stmt): Same.
6330         (expand_scalar_variables): Same.
6331         (graphite_rename_ivs): Rename graphite_rename_variables.
6332         (build_iv_mapping): New.
6333         (translate_clast): Call build_iv_mapping.
6334         * graphite.h (gbb_p): New name.
6335
6336 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
6337
6338         PR tree-optimization/37684
6339         * gcc.dg/graphite/pr37684.c: New.
6340         * graphite.c (exclude_component_ref): New.
6341         (is_simple_operand): Call exclude_component_ref.
6342
6343 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
6344             Harsha Jagasia  <harsha.jagasia@amd.com>
6345
6346         PR tree-optimization/37485
6347         * gcc.dg/graphite/block-2.c: New
6348         * graphite.c (gmp_cst_to_tree): Moved.
6349         (iv_stack_entry_is_constant): New.
6350         (iv_stack_entry_is_iv): New.
6351         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
6352         (loop_iv_stack_insert_constant): New.
6353         (loop_iv_stack_pop): Use new datatpype.
6354         (loop_iv_stack_get_iv): Same.
6355         (loop_iv_stack_get_iv_from_name): Same.
6356         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
6357         (loop_iv_stack_patch_for_consts): New.
6358         (loop_iv_stack_remove_constants): New.
6359         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
6360         (translate_clast): Call loop_iv_stack_patch_for_consts and
6361         loop_iv_stack_remove_constants.
6362         (gloog): Use new datatype.  Redirect construction edge to end
6363         block to avoid accidental deletion.
6364         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
6365         iv stack entry.
6366         (union iv_stack_entry_data): New.  Data in iv stack entry.
6367         (struct iv_stack_entry): New.  Datatype for iv stack entries.
6368
6369 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6370
6371         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
6372         operand type when copying the operand to a variable of different type.
6373
6374 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6375
6376         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
6377         with the IV name after increment.
6378
6379 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
6380
6381         * Merge from mainline (r140164:140838).
6382
6383 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
6384
6385         * graphite-data-ref.c: New.
6386         * graphite.c (print_scop): Also dump the dependence graph.
6387         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
6388         (new_scop): Initialize SCOP_DEP_GRAPH.
6389         (build_scop_dynamic_schedules): New.
6390         (build_access_matrix_with_af): Fixed column numbering.
6391         (graphite_transform_loops): Call build_scop_dynamic_schedules.
6392         * graphite.h: Add ifndef/define guards against multiple inclusion.
6393         (struct scop): Add dep_graph field.
6394         (SCOP_DEP_GRAPH): Defined.
6395         (ref_nb_loops): Fixed and moved to other position.
6396         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
6397         (nb_loops_around_loop_in_scop): New.
6398         (graphite_dump_dependence_graph): Declared.
6399         (graphite_build_rdg_all_levels): Declared.
6400         (graphite_test_dependence): Declared.
6401         * Makefile.in (graphite-data-ref.o): New target.
6402
6403 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
6404
6405         * Merge from mainline (139870:140164).
6406
6407 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6408
6409         * Merge from mainline (138275:139870).
6410         * gcc.dg/graphite/scop-matmult.c: XFailed as one of
6411         the commits from trunk broke the niter detection.
6412
6413 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
6414
6415         * graphite.c: Add more documentation.  Fix formatting.
6416         (debug_loop_vec, debug_oldivs, loop_iv_stack,
6417         loop_iv_stack_debug): Moved...
6418         (schedule_to_scattering): Move before use.
6419         (dot_all_scops): Include in "#if 0" the code for system
6420         call dotty.
6421
6422         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
6423         loop_iv_stack_debug): ...here.
6424
6425 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
6426
6427         * tree-phinodes.c (make_phi_node): Extern.
6428         (add_phi_node_to_bb): New.
6429         (create_phi_node): Call add_phi_node_to_bb.
6430         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
6431         (remove_statement): Handle case where stored phi was updated
6432         and is no longer the same.
6433         * graphite.c (is_parameter): New.
6434         (is_old_iv): New.
6435         (expand_scalar_variables_expr): New.
6436         (expand_scalar_variables_stmt): New.
6437         (expand_scalar_variables): New.
6438         (move_phi_nodes): Create new phi instead of moving old one.
6439         (translate_clast): Call expand_scalar_variables.
6440         (find_vdef_for_var_in_bb): Also scan regular definitions.
6441         (skip_phi_defs): New.
6442         (collect_scop_exit_phi_args): New.
6443         (patch_scop_exit_phi_args): New.
6444         (gloog): Patch phis after scop.
6445         * tree-flow.h: (add_phi_node_to_bb): Declared.
6446         (make_phi_node): Declared.
6447
6448 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6449
6450         * graphite.c (end_scop): Split the entry of the scop when it
6451         is the header of the loop in which the scop is ending.
6452         (build_scops_1, limit_scops): Update uses of end_scop.
6453
6454 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
6455
6456         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
6457         SCOP_ENTRY or SCOP_EXIT.
6458
6459 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6460
6461         * graphite.c (get_construction_edge): Removed.
6462         (gloog): Construction edge is the scop entry edge.
6463
6464 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6465
6466         * graphite.c (can_generate_for_scop): Removed.
6467         (gloog): Do not call it.
6468
6469 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6470
6471         * graphite.c (new_scop): Entry of a scop is an edge.
6472         Initialize SESE region.
6473         (free_scop): Free SESE region.
6474         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
6475         (split_difficult_bb): New, split from end_scop.
6476         (end_scop): Exit of a scop is an edge.
6477         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
6478         not automatically updated and thus is always wrong.
6479         * graphite.h (struct sese): New.
6480         (SESE_ENTRY): New.
6481         (SESE_EXIT): New.
6482         (struct scop): New field for a SESE region.  Remove entry, exit.
6483         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
6484         semantics as before.  Moved comment around.
6485
6486 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6487             Sebastian Pop  <sebastian.pop@amd.com>
6488
6489         * graphite.c (graphite_transform_loops): Always enable gloog
6490         and find_transform when ENABLE_CHECKING.
6491
6492 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6493
6494         * graphite.c (graphite_transform_loops): Move pretty printer
6495         of SCOPs before doing any transform.  Remove call to print_scops
6496         and dot_all_scops_1.
6497
6498 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6499
6500         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
6501         (print_graphite_bb): Same.
6502
6503 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6504
6505         * graphite.c (dot_all_scops_1): Cleanup.
6506         (move_scops): Fix comment.
6507
6508 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
6509
6510         * graphite.c (build_scop_bbs): Revert commit 139355:
6511
6512         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6513                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6514
6515                 * graphite.c (build_scop_bbs): Factor up code.
6516
6517 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6518
6519         * graphite.c (gloog): Update dominator info.
6520
6521 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
6522
6523         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
6524
6525 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6526
6527         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
6528         initialization.
6529         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
6530         (translate_clast): Correct formatting.
6531         * graphite.h (struct num_map): Removed.
6532         (struct graphite_bb): Remove num_map field.
6533         (GBB_INDEX_TO_NUM_MAP): Removed.
6534
6535 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6536
6537         * graphite.c (build_access_matrix_with_af): Fix comments.
6538         (build_scop_data_accesses): Same.
6539
6540 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6541
6542         * graphite.c (build_scop_data_accesses): Don't construct
6543         access matrices.  Add a FIXME and an assert condition that
6544         should pass when the access matrices will be needed.
6545
6546 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
6547
6548         * tree-data-ref.c (stmt_simple_memref_p): Don't call
6549         really_constant_p.
6550         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
6551         Moved close by free_graphite_bb.
6552         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
6553         (new_scop): Move close by free_scop.
6554         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
6555
6556 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
6557
6558         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
6559         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
6560         instead of recursive call.
6561         (graphite_translate_clast_equation): New.
6562         (graphite_create_guard_cond_expr): New.
6563         (graphite_create_new_guard): New.
6564         (get_stack_index_from_iv): Removed.
6565         (graphite_rename_ivs_stmt): Use gbb_loop_index.
6566         (get_true_edge_from_guard_bb): New.
6567         (translate_clast): Handle stmt_guard in clast.
6568         (get_construction_edge): Allow construction edge detection for
6569         a scope entry with multiple predecessors if one predecessor is
6570         the immediate dominator of scope entry.
6571         (can_generate_code_stmt): Enable code generation for clast_guard.
6572         (gloog): Use correct context loop.  Removed check for post dominators.
6573         * cfgloop.h (create_empty_if_region_on_edge): Declared.
6574
6575 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6576
6577         * graphite.c (remove_dead_loops): Document better which
6578         loops are removed.
6579
6580 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6581
6582         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
6583         and PPLINC.
6584         (graphite.o): Also depends on pointer-set.h.
6585
6586 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6587
6588         * graphite.c (scop_record_loop): Fix compile warning.
6589
6590 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
6591             Sebastian Pop  <sebastian.pop@amd.com>
6592
6593         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
6594
6595 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
6596
6597         * graphite.c (build_graphite_bb): Initialize bb->aux to
6598         point to the graphite_bb_p.
6599         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
6600         content of bb->aux.
6601         (add_bb_domains): Does not use the scop parameter.
6602         (graphite_transform_loops): Clean bb->aux at the end.
6603
6604 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6605             Sebastian Pop  <sebastian.pop@amd.com>
6606
6607         * lib/target-supports.exp
6608         (check_effective_target_fgraphite): New.
6609
6610         * gcc.dg/graphite/graphite.exp: Early exit when
6611         check_effective_target_fgraphite returns false.
6612         Set dg-do-what-default to compile.
6613         (scan-graphite-dump-times): Removed.
6614         * gfortran.dg/graphite/graphite.exp: Same.
6615
6616         * gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
6617         Use scan-tree-dump-times instead of scan-graphite-dump-times.
6618         * gcc.dg/graphite/scop-1.c: Same.
6619         * gcc.dg/graphite/scop-2.c: Same.
6620         * gcc.dg/graphite/scop-3.c: Same.
6621         * gcc.dg/graphite/scop-4.c: Same.
6622         * gcc.dg/graphite/scop-5.c: Same.
6623         * gcc.dg/graphite/scop-6.c: Same.
6624         * gcc.dg/graphite/scop-7.c: Same.
6625         * gcc.dg/graphite/scop-8.c: Same.
6626         * gcc.dg/graphite/scop-9.c: Same.
6627         * gcc.dg/graphite/scop-10.c: Same.
6628         * gcc.dg/graphite/scop-11.c: Same.
6629         * gcc.dg/graphite/scop-12.c: Same.
6630         * gcc.dg/graphite/scop-13.c: Same.
6631         * gcc.dg/graphite/scop-matmult.c: Same.
6632         * gcc.dg/graphite/scop-14.c: Same.
6633         * gcc.dg/graphite/scop-15.c: Same.
6634         * gcc.dg/graphite/block-0.c: Same.
6635         * gcc.dg/graphite/scop-16.c: Same.
6636         * gcc.dg/graphite/block-1.c: Same.
6637         * gcc.dg/graphite/scop-17.c: Same.
6638         * gcc.dg/graphite/scop-18.c: Same.
6639         * gfortran.dg/graphite/block-1.f90: Same.
6640         * gfortran.dg/graphite/scop-1.f: Same.
6641         * gfortran.dg/graphite/block-2.f: Same.
6642
6643 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6644
6645         * graphite.c: Fix some XXX comments.
6646         (build_scop_dynamic_schedules): Removed.
6647
6648 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6649
6650         * graphite.h (scop_max_loop_depth): Moved...
6651         * graphite.c (scop_max_loop_depth): ...here.
6652         (remove_all_edges_1): New.
6653         (remove_all_edges): Factored code.
6654         (remove_cond_exprs): Check only the last statement for
6655         a GIMPLE_COND expression.
6656
6657 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6658
6659         * graphite.c (scan_tree_for_params): Early return when the
6660         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
6661         (find_scop_parameters): Factor out code.
6662         (graphite_trans_bb_strip_mine): Remove dead code.
6663
6664 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6665
6666         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
6667         graphite_trans_bb_move_loop): Factor asserts.
6668         (gloog): Perform sanity checks only for ENABLE_CHECKING.
6669         Do not call calculate_dominance_info and estimate_bb_frequencies.
6670
6671 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
6672
6673         * graphite.c (create_loops_mapping, free_loops_mapping,
6674         create_loops_mapping_num, debug_loop_mapping_1,
6675         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
6676         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
6677         graphite_loops_mapping_add_child_num,
6678         graphite_loops_mapping_insert_child,
6679         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
6680         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
6681         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
6682         create_num_from_index, get_num_from_index,
6683         swap_loop_mapped_depth): Removed.
6684         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
6685         (free_scop): Do not call free_loops_mapping.
6686         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
6687         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
6688         get_loop_mapped_depth.
6689         (graphite_trans_bb_move_loop): Do not update the loop mapping.
6690         (graphite_trans_bb_strip_mine): Same.
6691         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
6692         (struct scop): Remove field loops_mapping.
6693
6694 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6695             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6696
6697         * graphite.c (scop_record_loop): Factor out one level of the
6698         condition by early return.
6699         (build_scop_loop_nests): Format following FSF coding style.
6700         (build_scop_dynamic_schedules): Factor out code.
6701         (scopdet_bb_info): Reindent.  Default case should not be reachable.
6702
6703 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6704             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6705
6706         * graphite.c (loop_affine_expr): Check for DECL_P or struct
6707         assignments that are not handled as simple operands for now.
6708
6709 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6710             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6711
6712         * graphite.c (build_scop_bbs): Factor up code.
6713
6714 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6715             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6716
6717         * graphite.c (stmt_simple_for_scop_p): Factor code out
6718         of the loop.
6719         (enum gbb_type): New.  Group all the GBB_* types under it.
6720         (is_loop_exit): Moved...
6721         (end_scop): Enable BB spliting.
6722         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
6723         * cfgloop.h (is_loop_exit): Declared.
6724
6725 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6726
6727         * doc/invoke.texi: Remove strides from examples containing
6728         DO loops when the strides are equal to 1.
6729
6730 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
6731             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6732
6733         * graphite.c (graphite_trans_scop_block): Or the result with
6734         the result from graphite_trans_loop_block.
6735         * gcc.dg/graphite/block-1.c: New.
6736         * gfortran.dg/graphite/block-1.f90: New.
6737         * gfortran.dg/graphite/block-2.f: New.
6738
6739 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6740
6741         * graphite.c (graphite_transform_loops): Call cloog_initialize
6742         and cloog_finalize.
6743
6744 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6745
6746         * tree-data-ref.c) (stmt_simple_memref_p): New.
6747         * tree-data-ref.h (stmt_simple_memref_p): Declared.
6748         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
6749         (is_simple_operand): Call stmt_simple_memref_p.
6750
6751         * gcc.dg/graphite/scop-matmult.c: Updated for not
6752         using pointer arithmetic, as this is optimized by PRE and
6753         makes the code too difficult to analyze.
6754
6755         * gcc.dg/graphite/scop-18.c: Same.
6756
6757 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
6758
6759         * gdbinit.in (pgg): New.
6760
6761 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6762
6763         * graphite.c (graphite_trans_loop_block): Fix warning.
6764
6765 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6766
6767         * graphite.c (graphite_trans_loop_block): Fix my merge error.
6768
6769 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
6770
6771         * graphite.c (graphite_trans_bb_block): Remove check for
6772         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
6773         Check if loop blocking is profitable for every loop, before applying
6774         the changes.
6775         (graphite_apply_transformations): Call graphite_trans_bb_block only,
6776         if flag_loop_block is set.
6777
6778 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6779
6780         * graphite.c: Add some more documentation for the loop
6781         mapping.
6782
6783 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6784
6785         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
6786         * graphite.c: Format on less than 80 columns.
6787         * graphite.h: Same.
6788
6789 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6790
6791         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
6792
6793 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
6794
6795         * doc/invoke.texi (floop-block, floop-strip-mine,
6796         floop-interchange): Update documentation with examples.
6797
6798 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6799
6800         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
6801         add_referenced_var.
6802         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
6803
6804 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
6805
6806         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
6807         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
6808         * tree-scalar-evolution.c: Revert useless changes.
6809         * tree-phinodes.c: Same.
6810         * cfghooks.c: Same.
6811         * vec.h: Same.
6812         * tree-vectorizer.h: Same.
6813         * tree-flow.h: Same.
6814         * tree-cfg.c: Same.
6815         * common.opt (fgraphite): Update documentation.
6816
6817 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
6818
6819         * doc/invoke.texi (-floop-block, -floop-strip-mine,
6820         -floop-interchange): Add more text for explaining what each of these
6821         flags is doing.
6822         * tree-into-ssa.c (gimple_vec): Moved to...
6823         * graphite.c: Include gimple.h.
6824         (gimple_vec): Moved to...
6825         (del_loop_to_cloog_loop): Removed.
6826         (loop_affine_expr): Do not call create_data_ref when the
6827         operand is a constant.
6828         (new_scop): Use free instead of del_loop_to_cloog_loop.
6829         * Makefile.in (graphite.o): Depend on GIMPLE_H.
6830         * gimple.h (gimple_vec): ... here.
6831
6832 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6833
6834         * graphite.c (scopdet_bb_info): Only allow loops with known number of
6835         latch executions.
6836         (build_loop_iteration_domains): Fail, if latch executions unknown.
6837
6838 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6839
6840         * graphite.c (add_conditions_to_domain): New.
6841         (build_scop_conditions_1): Call add_conditions_to_domain.
6842         (set_cloog_options): Allow to disable optimizations.
6843
6844 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6845
6846         * graphite.c (find_params_in_bb): Look for parameters in conditions.
6847         Do not use walk_dominator_tree.
6848         (find_scop_parameters): Do not use walk_dominator_tree.
6849
6850 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6851
6852         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
6853         (idx_record_params): Adapt.
6854         * graphite.h (scop_gimple_loop_depth): New.
6855
6856 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6857
6858         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
6859         (scan_tree_for_params): Remove value_init.
6860         (build_scop_context): Remove value_init.
6861         (build_loop_iteration_domains): Remove value_init.
6862         (schedule_to_scattering): Remove value_init.
6863         (graphite_trans_bb_strip_mine): Remove value_init.
6864
6865 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6866
6867         * gcc/graphite.c (limit_scops): New.
6868         (graphite_transform_loops): Add limit SCoPs.
6869         * gcc.dg/graphite/scop-0.c: Update number of SCoPs.
6870         * gcc.dg/graphite/scop-1.c: Update number of SCoPs.
6871         * gcc.dg/graphite/scop-10.c: Update number of SCoPs.
6872         * gcc.dg/graphite/scop-11.c: Update number of SCoPs.
6873         * gcc.dg/graphite/scop-12.c: Update number of SCoPs.
6874         * gcc.dg/graphite/scop-13.c: Update number of SCoPs.
6875         * gcc.dg/graphite/scop-14.c: Update number of SCoPs.
6876         * gcc.dg/graphite/scop-15.c: Update number of SCoPs.
6877         * gcc.dg/graphite/scop-16.c: Update number of SCoPs.
6878         Change loop numbers.
6879         * gcc.dg/graphite/scop-17.c: Update number of SCoPs.
6880         Change loop numbers.
6881         * gcc.dg/graphite/scop-18.c: Update number of SCoPs.
6882         * gcc.dg/graphite/scop-2.c: Update number of SCoPs.
6883         * gcc.dg/graphite/scop-3.c: Update number of SCoPs.
6884         * gcc.dg/graphite/scop-4.c: Update number of SCoPs.
6885         * gcc.dg/graphite/scop-5.c: Update number of SCoPs.
6886         * gcc.dg/graphite/scop-6.c: Update number of SCoPs.
6887         * gcc.dg/graphite/scop-7.c: Update number of SCoPs.
6888         * gcc.dg/graphite/scop-8.c: Update number of SCoPs.
6889         * gcc.dg/graphite/scop-9.c: Update number of SCoPs.
6890         * gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
6891
6892 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
6893
6894         * graphite.c (graphite_transform_loops): Call always find_transform.
6895
6896 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
6897
6898         * graphite.c (free_loops_mapping): New.
6899         (stmt_simple_for_scop_p): Fix typo.
6900         (stmt_simple_for_scop_p): Fix tuples functions, that
6901         broke polyhedron.
6902         (free_graphite_bb): Fix some memleaks.
6903         (free_scop): Fix some memleaks.
6904         (scopdet_bb_info): Do not forget some tmp SCoPs.
6905         (find_params_in_bb): Fix some memleaks.
6906         (clast_to_gcc_expression): Fix warning.
6907
6908 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
6909
6910         * gcc.dg/graphite/scop-16.c: Fix for 32bit.
6911         * gcc.dg/graphite/scop-17.c: Fix for 32bit.
6912
6913 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
6914
6915         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
6916         Move code ifdef-ed HAVE_cloog...
6917         * graphite.c: Include toplev.h.
6918         ... here.
6919         * Makefile.in (OBJS-common): Always build graphite.o.
6920         (BACKEND): Remove @GRAPHITE@.
6921         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
6922         (graphite.o): Depend on TOPLEV_H.
6923
6924 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
6925
6926         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
6927         Remove typo left from polylib to ppl conversion.
6928         * graphite.c (graphite_transforms): Use sorry instead of fatal.
6929
6930 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
6931
6932         * toplev.c (process_options): Move the graphite loop optimization
6933         flags...
6934         * tree-ssa-loop.c (graphite_transforms): ... here.
6935         When not configured with CLooG, print to dump_file that
6936         Graphite transforms were not performed.
6937         * gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
6938         New.
6939         * gcc.dg/graphite/*.c: Updated all testcases to use
6940         scan-graphite-dump-times.
6941
6942 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
6943
6944         * graphite.c (dot_scop, dot_all_scops): Do not call system.
6945         Do not open /tmp/scop.dot and /tmp/allscops.dot.
6946
6947 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
6948             Jan Sjodin  <jan.sjodin@amd.com>
6949
6950         * configure: Regenerated.
6951         * omp-low.c (expand_omp_sections): Remove now unused code.
6952         * config.in (HAVE_polylib): Removed.
6953         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
6954         (PPLLIBS, PPLINC): Added.
6955         * graphite.c: Replace unsigned with int wherever possible.
6956         Don't access Cloog's data structures, but use accessor functions.
6957         Clast's stmt->type is now implemented as a vtable: change the
6958         switches of stmt->type into ifs.
6959         (polylib/polylibgmp.h): Don't include.
6960         (initialize_dependence_polyhedron,
6961         initialize_data_dependence_polyhedron, is_empty_polyhedron,
6962         statement_precedes_p, test_dependence, build_rdg_all_levels,
6963         dump_dependence_graph): Removed until this code is cleaned up
6964         or ported to Cloog.
6965         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
6966         (POLYLIBINC): Renamed PPLINC.
6967
6968 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
6969             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
6970             Jan Sjodin  <jan.sjodin@amd.com>
6971
6972         Finish the merge and tuplification of graphite.
6973
6974 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
6975             Jan Sjodin  <jan.sjodin@amd.com>
6976
6977         Partial merge from mainline (138072:138275).
6978         * graphite.c still has to be tuplified.
6979
6980 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
6981
6982         * graphite.c (graphite_loops_mapping_max_loop_num): New.
6983         (create_num_from_index): New.
6984         (get_num_from_index): Also pass in the graphite BB.
6985         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
6986         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
6987         (graphite_trans_bb_strip_mine): Call create_num_from_index.
6988         (is_interchange_valid): Return false when failing.
6989         * graphite.h (struct num_map): New.
6990         (struct graphite_bb): New field num_map.
6991         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
6992
6993 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
6994
6995         * graphite.c (dump_gbb_conditions): Print also conditions like
6996         "if (a)".  Remove dublicated code and use print_generic_expr ().
6997         (stmt_simple_for_scop_p): Only allow conditions we can handle
6998         {<, <=, >, >=}.
6999
7000 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7001
7002         * graphite.h (struct scop): Removed new_ivs field.
7003         (SCOP_NEWIVS): Deleted.
7004         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
7005         clast_to_gcc_expression, graphite_create_new_loop):
7006         Removed use of new_ivs.
7007
7008 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
7009
7010         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
7011         create_loops_mapping_num, debug_loop_mapping_1): New.
7012         (debug_loop_mapping): Call debug_loop_mapping_1.
7013         (get_loop_mapping_for_num,
7014         graphite_loops_mapping_add_child,
7015         graphite_loops_mapping_add_child_num,
7016         graphite_loops_mapping_insert_child,
7017         graphite_loops_mapping_parent,
7018         split_loop_mapped_depth_for_num,
7019         loop_mapped_depth_split_loop): New.
7020         (increment_loop_mapped_depths): Removed.
7021         (swap_loop_mapped_depth_for_num): Reimplemented.
7022         (new_scop): Call create_loops_mapping.
7023         (scop_record_loop): Call graphite_loops_mapping_insert_child.
7024         (translate_clast): Pass the old loop father in parameter, and pass
7025         it to get_old_iv_from_ssa_name.
7026         (remove_edges_around_useless_blocks, can_generate_code_stmt,
7027         can_generate_code, can_generate_for_scop): New.
7028         (graphite_trans_bb_block): Returns false when it fails to transform.
7029         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
7030
7031 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7032
7033         Reverted all the changes related to the streamization and
7034         loop fusion.
7035         These changes are now tracked in the streamization branch.
7036
7037 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7038             Jan Sjodin  <jan.sjodin@amd.com>
7039
7040         * graphite.c (gbb_compare): Correctly constify.
7041         (gbb_can_be_ignored): Indent.
7042         (graphite_trans_scop_swap_1and2): Add legality check.
7043         Remove dead FIXMEs.
7044
7045 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
7046
7047         Remove fallouts from "Reverted the Condate changes".
7048         * tree.h: Remove unused decl.
7049         * gcc.dg/tree-checker: Same.
7050         * timevar.def: Remove counter.
7051
7052 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
7053
7054         * Merge from mainline (135673:138072).
7055
7056         Reverted the MIRO changes (from 2008-04-05) that are now
7057         tracked in the miro branch.
7058         * tree-bounds.c: Removed.
7059         * tree-bounds.h: Removed.
7060
7061         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
7062         are now tracked in the condate branch.
7063         * tree-check.c: Removed.
7064         * tree-match.c: Removed.
7065         * condate.y: Removed.
7066
7067 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7068
7069         * common.opt: New user flag -floop-block, -floop-strip-mine
7070         and -floop-interchange.
7071         * toplev.c (process_options): Enable -fgraphite pass if any one of the
7072         graphite loop optimization flags is turned on.
7073         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
7074         flag_loop_strip_mine and flag_loop_interchange checks before
7075         optimizations.
7076         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
7077         -floop-strip-mine and -floop-interchange.
7078         * gcc.dg/graphite/block-0.c: Add -floop-block and remove
7079         -fgraphite.
7080         * gcc.dg/graphite/scop-16.c: Ditto.
7081         * gcc.dg/graphite/scop-17.c: Ditto.
7082         * gcc.dg/graphite/scop-18.c: Ditto.
7083
7084 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
7085             Sebastian Pop  <sebastian.pop@amd.com>
7086
7087         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
7088         (create_empty_loop_on_edge): More fixes.
7089         * tree-phinodes.c (resize_phi_node): Extern.
7090         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
7091         * cfghooks.c (update_dominator_information): New split from
7092         split_edge.
7093         * tree-vectorizer.c (rename_variables_in_bb): Extern.
7094         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
7095         successor of the function entry block.
7096
7097         * graphite.c: Include pointer-set.h.
7098         (debug_loop_mapping, increment_loop_mapped_depths,
7099         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
7100         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
7101         swap_loop_mapped_depth_for_num, get_num_from_index,
7102         swap_loop_mapped_depth, loop_iv_stack_debug,
7103         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
7104         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
7105         get_old_iv_from_ssa_name): New.
7106         (new_scop): Initialize SCOP_LOOPS_MAPPING.
7107         (free_scop): Free SCOP_LOOPS_MAPPING.
7108         (scop_record_loop): Record old ivs.
7109         (create_var_name): Removed.
7110         (initialize_cloog_names): Allocate double space in case strip mine
7111         applies to all loops once.
7112         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
7113         (clast_to_gcc_expression): Same.  Implement more clast to gimple
7114         translation.
7115         (graphite_create_new_loop): Pass in ivstack.
7116         (remove_all_edges): Pass in the construction_edge.
7117         (graphite_remove_iv): Removed.
7118         (graphite_rename_ivs, graphite_rename_ivs_stmt,
7119         remove_cond_exprs): Rewritten.
7120         (move_phi_nodes): New.
7121         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
7122         (translate_clast): Pass in ivstack.  Rewrite some cases.
7123         (set_cloog_options, debug_clast_stmt): New.
7124         (find_transform): Use set_cloog_options.
7125         (outermost_loop_layer): Removed.
7126         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
7127         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
7128         mark_old_loops, remove_dead_loops): New.
7129         (gloog): Rewritten.
7130         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
7131         (const_column_index, get_first_matching_sign_row_index,
7132         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
7133         get_upper_bound): New.
7134         (graphite_trans_bb_strip_mine): Also update the iv map.
7135
7136         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
7137         (struct name_tree): Add a loop field.
7138         (struct scop): Add a graphite_loops_mapping field.
7139         (SCOP_LOOPS_MAPPING): New.
7140         (debug_clast_stmt): Declare.
7141         * lambda.h (find_induction_var_from_exit_cond): Declare.
7142         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
7143         * cfgloop.h (update_dominators_in_loop): Removed declaration.
7144         (create_empty_loop_on_edge): Updated.
7145         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
7146         rename_variables_in_bb): Declare.
7147         * tree-cfg.c (remove_bb): Extern.
7148
7149         * gcc.dg/graphite/block-0.c: New.
7150
7151 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
7152             Sebastian Pop  <sebastian.pop@amd.com>
7153
7154         * graphite.c (strip_mine_profitable_p): New.
7155         (graphite_trans_bb_block): Disable strip mining if not profitable.
7156
7157         * gcc.dg/graphite/scop-18.c: New.
7158         * gcc.dg/graphite/scop-17.c: Fixed.
7159         * gcc.dg/graphite/scop-16.c: Fixed.
7160
7161 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
7162             Jan Sjodin  <jan.sjodin@amd.com>
7163             Sebastian Pop  <sebastian.pop@amd.com>
7164
7165         * graphite.c (is_interchange_valid): New.
7166         (graphite_trans_bb_block): Check loop nest of basic block for legality
7167         of interchange.
7168
7169         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
7170         outer_most_loop, gbb_outer_most_loop_index): New.
7171
7172         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
7173         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
7174         * gcc.dg/graphite/scop-16.c: New.
7175         * gcc.dg/graphite/scop-17.c: New.
7176
7177 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7178
7179         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
7180         (graphite_trans_scop_block): Ignore SCoPs without bbs.
7181
7182 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7183
7184         * graphite.c (new_scop): Initialize SCOP_EXIT.
7185         (scopdet_info): Add.
7186         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
7187         (build_scops_1): Cleanup, bugfixes.
7188         (build_scops): Cleanup.
7189
7190         * gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
7191         * gcc.dg/graphite/scop-15.c: Add SCoP numbers.
7192
7193 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7194
7195         * gfortran.dg/graphite/scop-1.f: Update to reduced test case.
7196
7197         * gfortran.dg/graphite/graphite.exp: Use
7198         DEFAULT_GRAPHITE_FLAGS.
7199
7200         * gcc.dg/graphite/scop-15.c: Update to reduced test case.
7201
7202 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7203
7204         * graphite.c (scan_tree_for_params): Do not assert any more if
7205         MULT_EXPR parameter is negative.
7206
7207         * gfortran.dg/graphite/scop-1.f: New.
7208
7209         * gfortran.dg/graphite/graphite.exp: New.
7210
7211         * gcc.dg/graphite/scop-15.c: New.
7212
7213 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
7214
7215         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
7216
7217 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7218
7219         * graphite.c (graphite_trans_bb_swap_loops): Rename from
7220         graphite_swap_loops.
7221         (graphite_trans_bb_move_loop): New.
7222         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
7223         (graphite_trans_bb_block): New.
7224         (graphite_trans_loop_block): New.
7225         (graphite_trans_scop_swap_1and2): Rename from
7226         graphite_trans_swap_1and2.
7227         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
7228         (graphite_trans_scop_block): New.
7229         (graphite_apply_transformations): Rename from
7230         graphite_transformations.
7231
7232         * gcc.dg/graphite/scop-matmult.c: New.
7233
7234 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7235
7236         * graphite.c (gbb_compare): New.
7237         (graphite_sort_gbbs): New.
7238         (gbb_can_be_ignored): New.
7239         (scop_remove_ignoreable_gbbs): New.
7240         (graphite_transformations): Cleanup and add
7241         scop_remove_ignoreable_gbbs.
7242         * lambda.h (lambda_vector_compare): New.
7243
7244 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
7245
7246         * graphite.c (print_graphite_bb): Correct printing of static schedule.
7247         (graphite_swap_loops): int -> unsigned
7248         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
7249         (graphite_transformations): New.
7250         (graphite_transform_loops): Move to graphite_transformations.
7251         * graphite.h (gbb_nb_loops): Return unsigned.
7252
7253 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7254
7255         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
7256         the domain matrix.  This makes scop-0.c work again.
7257
7258 2008-06-20  Richard Guenther  <rguenther@suse.de>
7259
7260         * graphite.h: Adjust copyright to GPLv3.
7261         * graphite.c: Likewise.
7262         (stmt_simple_memref_for_scop_p): Split out from ...
7263         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
7264         and simplify.
7265         (get_bb_type): Optimize.
7266         (is_pred): Remove.
7267         (is_bb_addable): Fix memleak, replace is_pred call with
7268         single_pred.
7269         (build_scops): Use current_loops.
7270         (param_index): Fix memleak.
7271
7272 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7273
7274         * graphite.c: Fix formatting.
7275
7276 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7277
7278         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
7279         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
7280         (create_var_name, save_var_name): Newly defined functions.
7281         (initialize_cloog_names): Part of the code factored out to
7282         save_var_name.
7283         (clast_to_gcc_expression): Now handles the case of clast_red_sum
7284         in clast_reduction statement.
7285         (graphite_create_new_loop): Now takes a new parameter
7286         for outer_loop.
7287         (translate_clast): Now also takes the context_loop and bb_exit
7288         parameters. Rewritten the code so that it creates a gimple code
7289         inside the given context.
7290         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
7291         remove_cond_expr, disconnect_cond_expr,
7292         disconnect_virtual_phi_nodes): Newly defined functions.
7293         * graphite.h (struct scop): added old_ivs vector.
7294         SCOP_OLDIVS: New macro.
7295
7296 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
7297
7298         * cfgloopmanip.c: Add missing function comments, fix formatting.
7299
7300 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7301
7302         * cfgloopmanip.c (update_dominators_in_loop): Defined.
7303         (create_empty_loop_on_edge): Defined.
7304         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
7305         instead of void.
7306         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
7307         (update_dominators_in_loop): Declared as extern
7308         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
7309
7310 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
7311
7312         * graphite.c (print_graphite_bb): Allow changing number of loops
7313         in SCoP domain.
7314         (initialize_cloog_names): Allow changing number of loops.
7315         (build_cloog_prog): Simplify.
7316         (find_transform): Enable cloog option --strides.
7317         (graphite_swap_loops): New.
7318         (graphite_strip_mine_loop): New.
7319         (graphite_trans_swap_1and2): New.
7320         (graphite_trans_strip): New.
7321         (graphite_transform_loops): Add graphite_trans_strip.
7322         * graphite.h (scop_max_loop_depth): New.
7323
7324 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7325
7326         * graphite.c (build_scop_iteration_domain): Remove forgotten
7327         line. (Fixes compile)
7328
7329 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
7330
7331         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
7332         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
7333         (build_bb_loops): New.
7334         (graphite_transform_loops): Add build_bb_loops.
7335         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
7336         numbers.
7337         * graphite.h (graphite_bb): Add loops.
7338         (gbb_nb_loops): New.
7339         (gbb_loop_at_index): New.
7340         (gbb_loop_index): New.
7341         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
7342         using nb_params_in_scop.
7343
7344 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7345
7346         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
7347         (build_scop_canonical_schedules): Build minimized schedule.
7348         (schedule_to_scattering): Adapt to minimized schedule.
7349         * graphite.h (graphite_bb): Add/Update descriptions.
7350
7351 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
7352             Tobias Grosser  <grosser@fim.uni-passau.de>
7353
7354         * graphite.c (print_graphite_bb): Add condition printing.
7355         (dump_value): New.
7356         (dump_gbb_conditions): New.
7357         (build_scop_conditions_1): New.
7358         (build_scop_conditions): New.
7359         * graphite.h (graphite_bb): Add conditions.
7360
7361 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
7362
7363         * graphite.c (print_graphite_bb):
7364         (free_graphite_bb): New.
7365         (free_scop): Free bbs.
7366         (get_bb_type): Free doms.
7367         (build_scop_context): Free context matrix.
7368         (build_loop_iteration_domains): Remove unused code.
7369         (build_cloog_prog): Free scattering function and blocklist.
7370         (find_transform): Free options.
7371
7372 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
7373
7374         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
7375         Remove unnecessery cloog data structures. Make a copy of the domain
7376         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
7377         unnecessary cloog data structures. Fix memory leaks. Remove insert
7378         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
7379         used.
7380         (build_scop_iteration_domain): Remove unnecessary cloog
7381         data structures.  Fix memory leaks.
7382         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
7383         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
7384
7385 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7386
7387         * graphite.c (find_scop_params): Remove initialize_cloog_names.
7388
7389 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7390
7391         * graphite.c (end_scop): Style fix.
7392         (schedule_to_scattering): Style and comment fix.
7393
7394 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7395         * graphite.c (print_graphite_bb): Fix definiton of
7396         schedule_to_scattering.
7397         (initialize_cloog_names): Change nb_scattdims to max loop
7398         depth in SCoP.
7399         (schedule_to_scattering): Take parameter for number of scattering
7400         dimensions.
7401         (build_cloog_prog): Only build as much scattering dimensions as
7402         necessary.
7403
7404 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
7405
7406         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
7407         in polyhedron/aermod.f90.
7408
7409 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
7410             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
7411             Harsha Jagasia  <harsha.jagasia@amd.com>
7412
7413         * graphite.c (is_bb_addable): Fix segfault.
7414
7415 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
7416
7417         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
7418         with multiple exits and conditional handling in edge cases.
7419         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
7420
7421         * gcc.dg/graphite/scop-14.c: New.
7422
7423 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7424             Adrien Eliche  <aeliche@isty.uvsq.fr>
7425
7426         * graphite.c (is_bb_addable): Add more comments and enhance
7427         readablity of the source code. Fix memory leak.
7428         (is_loop_exit): Fix memory leak.
7429
7430 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7431
7432         * graphite.c (first_loop_in_scop): Deleted.
7433         (setup_cloog_loop): Only walk the loop chain for inner loops.
7434         (build_scop_iteration_domain): Execute setup_cloog_loop for
7435         all loops in the first layer.
7436
7437 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
7438
7439         * graphite.c (scan_tree_for_params): Change the way params are
7440         added to be indepenent of the number of loops.
7441         (setup_cloog_loop): Revert to short matrix format. Fix parameter
7442         handling.
7443         (build_cloog_prog): Revert to short matrix format.
7444
7445 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7446             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
7447
7448         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
7449         warning.
7450
7451 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
7452
7453         * graphite.c (nb_data_refs_in_scop): New.
7454         (graphite_transform_loops): Print more stats: number of
7455         loops, basic blocks and data references per scop.
7456
7457 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7458             Jan Sjodin  <jan.sjodin@amd.com>
7459
7460         * graphite.c (loop_affine_expr, idx_record_params,
7461         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
7462         instead of instantiate_parameters.
7463
7464 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7465
7466         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
7467         add support for parameters, add STATIC_SCHEDULE at the right places,
7468         cleanup.
7469
7470 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7471
7472         * graphite.c (build_scop_loop_nests): Only add the loops, that
7473         are contained completely in the SCoP.
7474         (build_cloog_prog): Disable scattering, until schedule_to_scattering
7475         and the domains are fixed.
7476         (build_scop_canonical_schedules): Add support for bbs not contained
7477         in any SCoP.
7478
7479 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
7480
7481         * graphite.h (scop_contains_loop): Update comments to match
7482         the actual behavior.
7483         (scop_contains_loop): New.
7484         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
7485
7486 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7487
7488         * graphite.c (get_bb_type): On function body, i.e. loop_0,
7489         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
7490         as GBB_COND_HEADER.
7491
7492 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
7493             Tobias Grosser  <grosser@fim.uni-passau.de>
7494
7495         * graphite.c (graphite_transform_loops): Early return when
7496         there are no loops in the function.
7497
7498 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7499             Jan Sjodin  <jan.sjodin@amd.com>
7500
7501         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
7502         offset of the last loop.
7503         (setup_cloog_loop): Copy the entire outer constraint matrix.
7504
7505 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7506             Jan Sjodin  <jan.sjodin@amd.com>
7507
7508         * graphite.c (stmt_in_scop_p, function_parameter_p,
7509         invariant_in_scop_p): Removed.
7510         (scan_tree_for_params): Can be used with no constraint
7511         matrix for gathering parameters.
7512         (idx_record_params): Don't use idx_record_param, instead use
7513         scan_tree_for_params.
7514         (find_scop_parameters): Same.
7515         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
7516         Fix the size of loop domains.
7517         (schedule_to_scattering): Exit when the outer loop is not in scop.
7518         (find_transform): Enable build_cloog_prog.
7519
7520 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7521             Jan Sjodin  <jan.sjodin@amd.com>
7522
7523         * graphite.c (schedule_to_scattering): Make scattering domains
7524         uniformly of the same size, as required by CLooG 0.14.0 and before.
7525
7526 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
7527             Jan Sjodin  <jan.sjodin@amd.com>
7528
7529         * graphite.c (schedule_to_scattering): Rewrite, correct the
7530         translation of the scheduling function to scattering.
7531         (build_cloog_prog): Call schedule_to_scattering only once.
7532         * graphite.h (scop_loop_index): Do not fail for loops not
7533         in the scop: return -1.
7534
7535 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
7536
7537         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
7538         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
7539         (setup_cloog_loop): Export GBB_DOMAIN.
7540         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
7541         able to rebuild the original control flow.
7542         * graphite.h (graphite_bb): Add domain field and access macro.
7543         (GBB_DOMAIN): New.
7544
7545 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7546
7547         * graphite.c (debug_gbb): New.
7548         (print_scop, build_graphite_bb): Use SCOP_BBS.
7549         (build_scop_bbs): Reimplemented.
7550         (dfs_bb_in_scop_p): Removed.
7551         (build_scop_loop_nests): Reorder loops inserted in
7552         SCOP_LOOP_NEST: outer loops should come first.
7553         (build_scop_canonical_schedules): Reinitialize at zero
7554         the components of the SCOP_STATIC_SCHEDULE for the loops
7555         that have already been parsed.
7556
7557         * graphite.h (debug_gbb): Declared.
7558
7559 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
7560             Jan Sjodin  <jan.sjodin@amd.com>
7561
7562         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
7563         (graphite_loop_to_gcc_loop): Removed.
7564         (remove_all_edges): New.
7565         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
7566         (gloog): Remove useless code.
7567
7568 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7569
7570         * graphite.c (get_bb_type): Reworked. We distinguish between
7571         loops with one or multiple exits.
7572         (is_loop_exit): New.
7573         (is_pred): New.
7574         (is_bb_addable): Rework condition handling, now support for case
7575         case statements and loops with multiple exits.
7576
7577         * gcc.dg/graphite/scop-11.c: New.
7578         * gcc.dg/graphite/scop-12.c: New.
7579         * gcc.dg/graphite/scop-13.c: New.
7580
7581 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7582
7583         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
7584         we have too many colors.
7585
7586 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
7587
7588         * doc/invoke.texi (-ftree-loop-fusion): Document.
7589         * tree-pass.h (pass_loop_fusion): Declared.
7590         * tree-loop-fusion.c: New.
7591         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
7592         * tree-data-ref.c (find_data_references_in_loop): Make extern.
7593         * tree-data-ref.h (find_data_references_in_loop): Declared.
7594         * common.opt (ftree-loop-fusion): Declared.
7595         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
7596
7597 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
7598
7599         * graphite.c (build_access_matrix): Fix typo from the merge.
7600
7601 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
7602
7603         * Merge from mainline (130800:135673).
7604
7605 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7606
7607         * graphite.c (end_scop): The exit of the scop is not part of the scop.
7608         Update dominators after splitting.
7609
7610 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7611
7612         * graphite.c (is_bb_addable): Return the harmful statement.
7613         Factor up some code.
7614         (end_scop): New.  Splits end of scope bbs on a harmful statement.
7615         (build_scops_1): Call end_scop.
7616
7617 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
7618
7619         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
7620         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
7621         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
7622         build_scops_1): Removed.
7623         (build_scops_2): Renamed build_scops_1.
7624
7625 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7626
7627         * graphite.c: Fix formatting.
7628
7629 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7630
7631         * graphite.c (get_bb_type): New.
7632         (move_scops): New.
7633         (build_scops_2): New.
7634         (is_bb_addable): New.
7635         (build_scops): Switch the scop detection.
7636         (build_scop_bbs): Add entry bb to scop.
7637         * graphite.h (struct scop): Update comment.
7638
7639 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7640
7641         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
7642         more colors.
7643
7644 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7645
7646         * gcc.dg/graphite/scop-1.c: Update.
7647         * gcc.dg/graphite/scop-2.c: Update.
7648         * gcc.dg/graphite/scop-4.c: Update.
7649         * gcc.dg/graphite/scop-5.c: Add.
7650         * gcc.dg/graphite/scop-6.c: Add.
7651
7652 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
7653
7654         * gcc.dg/graphite/scop-0.c: Add.
7655         * gcc.dg/graphite/scop-7.c: Add.
7656         * gcc.dg/graphite/scop-8.c: Add.
7657         * gcc.dg/graphite/scop-9.c: Add.
7658         * gcc.dg/graphite/scop-10.c: Add.
7659
7660 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
7661
7662         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
7663         Check affine expressions depending on the outermost loop
7664         instead of a scop.
7665         (stmt_simple_for_scop_p): Same.
7666         (harmfule_stmt_in_scop): Same.
7667
7668 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
7669
7670         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
7671         mark entry and exit, that are not part of the SCoP and update HTML
7672         formatting.
7673
7674 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
7675
7676         * graphite.c (basic_block_simple_for_scop_p): Renamed
7677         harmful_stmt_in_bb.
7678         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
7679         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
7680         (all_preds_visited_p, all_succs_visited_p,
7681         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
7682         scop_end_loop): New.
7683         (build_scops): Do not use dfs_enumerate_from.
7684
7685         * gcc.dg/graphite/scop-{1,2,4}.c: Updated.
7686
7687 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7688
7689         * graphite.c: Add comments to functions that are missing a
7690         description.
7691         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
7692
7693 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
7694
7695         * graphite.c (nb_params_in_scop): Moved...
7696         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
7697         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
7698         (clast_to_gcc_expression): Reduce column size to less than 80.
7699         (graphite_create_iv): Return the new name of the IV.
7700         (find_transform): Set options->esp and options->cpp.
7701         (gloog): Comment out the invalidation of the old loop code.
7702         (initialize_dependence_polyhedron): Replace scop_nb_params with
7703         nb_params_in_scop.
7704
7705         * graphite.h (nb_params_in_scop): ... here.
7706         (scop_nb_params): Removed.
7707         (loop_domain_dim): Return something even when the loop was not
7708         found in the hash table: avoid ICEing on all the graphite.exp
7709         testcases.
7710
7711 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7712
7713         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
7714
7715         * graphite.c (build_scop_dynamic_schedules): Schedule is built
7716         according to nesting level.
7717         (find_scop_parameters): Call instantiate_parameters.
7718         (scan_tree_for_params): Extend it to handle general affine bounds.
7719         Inner loop bound can depend on outer loop induction variable.
7720         (setup_cloog_loop): tmp variable is allocated on stack. Call
7721         instantiate_parameters with respect to outermost_loop_in_scop.
7722         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
7723         graphite.h.
7724         (create_empty_loop): Function loopify should be given edge
7725         probability, instead of edge frequency. Dominance relation from
7726         switch_bb to loop_header.
7727         (clast_to_gcc_expression): Added handling of clast_reduction node.
7728         (gloog): New functionality for removing old loop.
7729         (test_dependence): Factored out from build_rdg_all_levels.
7730         (build_rdg_all_levels): Dependence testing factored out to
7731         test_dependence function.
7732
7733         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
7734         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
7735         from graphite.c
7736
7737 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
7738
7739         * graphite.c (free_scop, param_index, initialize_cloog_names,
7740         nb_params_in_scop): Use name_tree map instead of just a tree
7741         for keeping track of the variable name associated to that tree.
7742         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
7743         clast_to_gcc_expression, graphite_create_iv,
7744         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
7745         graphite_stmt_to_gcc_stmt): New.
7746         (gloog): Call these.
7747         * graphite.h (struct name_tree): New.
7748         (struct scop): Use name_tree instead of tree for params.
7749         Store a vector of name_tree for new_ivs.
7750         (SCOP_NEWIVS): New.
7751         (scop_nb_params): Use name_tree instead of tree.
7752
7753 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
7754             Sebastian Pop  <sebastian.pop@amd.com>
7755
7756         * tree-bounds.c: New.
7757         * tree-bounds.h: New.
7758         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
7759         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
7760         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
7761         flag_mudflap.
7762         * gcc.c: Same.
7763         * toplev.c: Same.
7764         * c-cppbuiltin.c: Same.
7765         * c-pragma.c: Same.
7766         * common.opt: Same.
7767         * varasm.c: Same.
7768         * tree-outof-ssa.c: Same.
7769         * c-common.c: Same.
7770         * Makefile.in: Same.
7771
7772 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
7773             Sebastian Pop  <sebastian.pop@amd.com>
7774
7775         * tree-loop-distribution.c (remaining_stmts,
7776         upstream_mem_writes): Removed static variables.
7777         (copy_loop_before, create_bb_after_loop,
7778         mark_nodes_having_upstream_mem_writes, free_rdg_components,
7779         rdg_build_components, rdg_build_partitions,
7780         dump_rdg_partitions): Extern.
7781         (generate_loops_for_partition, generate_code_for_partition): Do not
7782         return a bool.
7783         (already_processed_vertex_p, predecessor_has_mem_write,
7784         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
7785         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
7786         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
7787         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
7788         Pass remaining_stmts and upstream_mem_writes as parameters.
7789         (rdg_component): Moved...
7790         (build_rdg_partition_for_component): Do not aggregate components when
7791         flag_streamize_loops is set.
7792         (gen_sequential_loops): New.
7793         (ldist_gen): Call gen_sequential_loops.
7794
7795         * tree-pass.h (pass_loop_streamization): Declared.
7796
7797         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
7798         basic blocks when loops structures exist.
7799
7800         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
7801
7802         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
7803
7804         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
7805         eliminate_local_variables_stmt, eliminate_local_variables,
7806         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
7807         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
7808         of code delimited by two edges in the CFG.
7809         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
7810         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
7811         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
7812         the case of parallelisation of reductions.
7813         (create_loop_fn): Extern.
7814         (create_omp_parallel_region): New.
7815
7816         * tree-data-ref.c (dump_data_dependence_relation): Don't call
7817         dump_data_reference for printing dra and drb.
7818         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
7819         RDGE_RELATION.
7820         (build_rdg): Don't call free_dependence_relations for the moment, as
7821         we attach dependence relations on each edge of the RDG.
7822         To be fixed later.
7823
7824         * tree-data-ref.h (rdg_component): ...here.
7825         (struct rdg_edge): New field ddr_p relation.
7826         (RDGE_RELATION): New.
7827         (create_bb_after_loop, copy_loop_before,
7828         mark_nodes_having_upstream_mem_writes, rdg_build_components,
7829         rdg_build_partitions, dump_rdg_partitions,
7830         free_rdg_components): Declared.
7831
7832         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
7833         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
7834
7835         * tree-loop-streamization.c: New.
7836
7837         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
7838         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
7839
7840         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
7841
7842         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
7843
7844         * passes.c: Schedule pass_loop_streamization.
7845
7846 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
7847
7848         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
7849         update comment.
7850
7851 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
7852
7853         * graphite.c (dot_all_scops): Update formatting.
7854         Bbs can now be part of more than one SCoP.
7855
7856 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
7857
7858         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
7859         malloc problems.
7860         (loop_domain_dim): Check for unregistered toplev SCOP loop.
7861         * graphite.h (loop_to_cloog_loop): New.
7862
7863 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7864
7865         * graphite.c (loop_domain_dim, ref_nb_loops,
7866         loop_iteration_vector_dim): New.
7867         (build_access_matrix_with_af, build_access_matrix,
7868         initialize_dependence_polyhedron): Fixed for new matrix layout.
7869         No longer assume that all iteration domains are of the same
7870         dimensionality.
7871
7872 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
7873
7874         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
7875         defined in a loop at depth 0 is invariant.
7876         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
7877         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
7878         be called at loop depth 0.
7879
7880         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
7881         a parameter.
7882         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
7883         (down_open_scop): Removed.
7884         (loop_in_scop_p): Redefined.
7885         (scop_affine_expr): New argument: scop.
7886         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
7887         a harmful statement ending a scop.
7888         (basic_block_simple_for_scop_p): New argument: scop.
7889         (get_loop_start): Removed.
7890         (new_scop): Initialize SCOP_LOOPS.
7891         (free_scop): Free SCOP_LOOPS.
7892         (succs_at_same_depth, preds_at_same_depth): New.
7893         (end_scop): Test the validity of a scop.
7894         (add_dominators_to_open_scops): New.
7895         (test_for_scop_bound): Call add_dominators_to_open_scops.
7896         Add cases for opening and closing multiple scops.
7897         (build_scops, build_scop_bbs): Iterate over basic blocks in
7898         depth first order.
7899         (build_graphite_bb): Pass scop directly.
7900         (dfs_bb_in_scop_p): New.
7901         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
7902         several times.
7903         (nb_loops_around_gb): Use loop_in_scop_p.
7904         (schedule_to_scattering): Disabled for the moment the code computing
7905         the "textual order for outer loop".
7906
7907         * graphite.h (struct scop): New field loops.
7908         (SCOP_LOOPS): New.
7909         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
7910
7911         * gcc.dg/graphite/scop-{1,...,7}.c: Updated.
7912
7913 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
7914             Sebastian Pop  <sebastian.pop@amd.com>
7915
7916         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
7917         * common.opt (fstreamize-loops): New.
7918         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
7919         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
7920         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
7921         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
7922
7923 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7924
7925         * tree-data-ref.c (build_empty_rdg): New.
7926         (build_rdg): Use it.
7927         * tree-data-ref.h (build_empty_rdg): Declared.
7928         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
7929         (find_vertex_for_stmt): Removed.
7930         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
7931
7932 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
7933
7934         * tree-loop-distribution.c (generate_builtin): After cancelling the
7935         loop tree, also delete basic blocks.
7936         (rdg_flag_uses): Stop recursion when a vertex has already been
7937         processed.
7938
7939 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7940
7941         * graphite.c (build_scop_alpha): Removed.
7942         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
7943         and dump_dependence_graph to avoid compiler warnings.
7944
7945 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7946
7947         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
7948         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
7949         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
7950         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
7951         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
7952         (initialize_dependence_polyhedron, find_vertex_for_stmt,
7953         initialize_data_dependence_polyhedron, is_empty_polyhedron,
7954         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
7955         dump_dependence_graph): New.
7956         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
7957         (GBB_ALPHA): New.
7958         (struct scop): New field loop2cloog_loop.
7959         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
7960         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
7961
7962 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
7963
7964         * graphite.c (build_graphite_bb): Fix initialization
7965         of the graphite basic block.
7966
7967 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
7968
7969         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
7970         loop domain matrix.  Pass in the number of loops contained in the
7971         constraint matrix.
7972         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
7973         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
7974         loops that are not surrounding the current loop are not represented
7975         in the domain constraint matrix.
7976         (build_scop_iteration_domain): Initial domain constraint matrix
7977         contains only the eq/ineq, cst, and scop parameters columns.
7978
7979 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7980
7981         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
7982         (print_graphite_bb): Print scattering.
7983
7984 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7985
7986         * graphite.c (initialize_cloog_names): Initialize names of
7987         scattering variables.
7988
7989 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7990
7991         * graphite.c (dot_all_scops_1): Disable debug output while
7992         printing graph.
7993
7994 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
7995
7996         * graphite.c (find_transform): Change cloog output language to C.
7997
7998 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
7999
8000         * tree-loop-distribution.c (generate_memset_zero,
8001         generate_builtin, generate_code_for_partition,
8002         rdg_flag_all_uses): New.
8003         (rdg_flag_uses): Gather in the same partition the statements defining
8004         the VUSES of the current statement.
8005         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
8006         Gather in the same partition not only the stores to the same memory
8007         access, but also the reads.
8008         (ldist_generate_loops): Renamed ldist_gen.
8009
8010 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
8011             Tobias Grosser  <grosser@fmi.uni-passau.de>
8012
8013         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
8014         next pointer, don't use the inner pointer.
8015
8016 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
8017
8018         * graphite.c (dot_all_scops, dot_all_scops_1): New.
8019         (find_transform): Call dot_all_1.
8020         * graphite.h (dot_all_scops): Declared.
8021
8022 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
8023
8024         * tree-loop-distribution.c: Fix apsi.f ICE.
8025         (create_bb_after_loop): New.
8026         (generate_loops_for_partition): Use it.
8027         * gfortran.dg/ldist-1.f90: New.
8028
8029         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
8030         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
8031
8032 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8033
8034         * graphite.c (find_transform): Dump cloog program sent to cloog.
8035
8036 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8037
8038         * graphite.c (initialize_cloog_names): Initialize cloog
8039         iterator names.
8040
8041 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
8042
8043         * graphite.c (build_scop_context): Fix typo, for the matrix
8044         format: insert '0 >= 0' instead of '-1 >= 0'.
8045
8046 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8047
8048         * Fix merge problems.
8049
8050 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
8051
8052         * graphite.c (setup_cloog_loop): Fix typo.
8053
8054 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8055
8056         * doc/invoke.texi (-ftree-loop-distribution): Documented.
8057         * tree-loop-distribution.c: Reimplemented.
8058         * tree-pass.h (pass_loop_distribution): New.
8059         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
8060         print_loops.
8061         * graphds.h (struct graph): New field indexes.
8062         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8063
8064         * tree-vect-analyze.c: Remove declaration of static functions when not
8065         needed.
8066         * tree-vectorizer.c: Same.
8067         (rename_variables_in_loop): Now extern.
8068         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
8069         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
8070         calling redirect_edge_and_branch_force.
8071
8072         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
8073
8074         * tree-data-ref.c: Don't include tree-chrec.h.
8075         (debug_data_dependence_relations): New.
8076         (dump_data_dependence_relation): Call dump_data_reference on data refs
8077         in the relation.
8078         (same_access_functions): Moved...
8079         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
8080         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8081         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
8082         struct rdg_vertex_info, ): New.
8083         (create_rdg_edge_for_ddr): Compute the dependence level before looking
8084         at DDR_REVERSED_P.
8085         (create_rdg_vertices): Initialize the htab of graph->indexes.
8086         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
8087         (stmts_from_loop): Don't save LABEL_EXPR.
8088         (hash_stmt_vertex_info, eq_stmt_vertex_info,
8089         hash_stmt_vertex_del): New.
8090         (build_rdg): Initialize rdg->indexes.
8091         (free_rdg, stores_from_loop, ref_base_address,
8092         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
8093         have_similar_memory_accesses_1, ref_base_address_1,
8094         remove_similar_memory_refs): New.
8095
8096         * tree-data-ref.h: Include tree-chrec.h.
8097         (debug_data_dependence_relations): Declared.
8098         (same_access_functions): ...here.  Now static inline.
8099         (ddr_is_anti_dependent, ddrs_have_anti_deps,
8100         ddr_dependence_level): New.
8101         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
8102         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
8103         RDG_MEM_READS_STMT): New.
8104         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
8105         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
8106         rdg_vertex_for_stmt): Declared.
8107         (struct rdg_edge): New field level.
8108         (RDGE_LEVEL, free_rdg): New.
8109         (stores_from_loop, remove_similar_memory_refs,
8110         rdg_defs_used_in_other_loops_p,
8111         have_similar_memory_accesses): Declared.
8112         (rdg_has_similar_memory_accesses): New.
8113
8114         * lambda.h (dependence_level): New.
8115         * common.opt (ftree-loop-distribution): New.
8116         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
8117         (print_loop_ir): Renamed print_loops.
8118         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
8119         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
8120         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
8121         (tree-loop-distribution.o): Added.
8122         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
8123         (mark_virtual_ops_in_bb): New.
8124         (print_loops_bb, debug_loop_num, debug_loop): New.
8125         * passes.c: Scheduled pass_loop_distribution.
8126
8127 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
8128
8129         * graphite.c (scan_tree_for_params): Correct the number of columns
8130         for polylib format.
8131         (nb_flat_iterator): New.
8132         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
8133         (build_scop_iteration_domain): Correct the number of columns for
8134         polylib format.
8135
8136 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
8137
8138         * Merge from mainline (129697:130800).
8139
8140 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
8141
8142         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
8143         dominated by SCoP's exit.
8144         (graphite_transform_loops): Compute post dominators.
8145
8146 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8147
8148         * Merge from mainline (127169:129697).
8149
8150 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
8151
8152         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
8153         parameter for the basic block that contains the expression.  Use
8154         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
8155         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
8156         the expression.
8157         * graphite.h (gbb_loop): New.
8158         (GBB_LOOP): Removed.
8159
8160 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8161
8162         * Makefile.in: Fix merge problem.
8163
8164 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
8165
8166         * Merge from mainline (125309:127169).
8167         * tree-loop-distribution.c: Disabled.
8168
8169 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
8170
8171         * Merge from mainline (r123693:125309).
8172
8173 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
8174
8175         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
8176         correct_modify_p
8177         (correct_modify_p, check_statements, number_of_lvalue_uses,
8178         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
8179         instead of MODIFY_EXPR.
8180         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
8181         and push new edges.
8182
8183 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
8184
8185         * tree-loop-distribution.c (struct rdg): Replace arrays by
8186         VECs for edges and vertices.
8187         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
8188         (RDGV_NB_PARTITIONS): New.
8189         (PRDG_NBV, PRDG_NBE): Removed.
8190         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
8191         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
8192         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
8193
8194 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
8195             Sebastian Pop  <sebpop@gmail.com>
8196
8197         * doc/invoke.texi (-ftree-loop-distribution): Document.
8198         * tree-loop-distribution.c: New file.
8199         * tree-pass.h (pass_loop_distribution): Declared.
8200         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
8201         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
8202         and set reversed_p.
8203         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
8204         (DDR_REVERSED_P): New.
8205         * common.opt (-ftree-loop-distribution): New.
8206         * tree-flow.h (distribute_loops): Declared.
8207         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
8208         * passes.c (init_optimization_passes): Schedule loop distribution.
8209
8210 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
8211
8212         * graphite.c (print_graphite_bb): Don't call dump_data_references.
8213         (print_scop): Don't print when scop is NULL.
8214         (build_scop_context, find_transform): Don't output to stderr.
8215
8216 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
8217
8218         * tree-data-ref.c: Don't include graphite.h.
8219         Comment out the code for printing data reference's scop.
8220         (build_access_matrix_with_af): Moved...
8221         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
8222         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
8223         (print_graphite_bb): Print basic block's schedule.
8224         (print_scop): Don't print the schedule, call cloog's pretty printer.
8225         (bb_in_scop_p): A basic block is in a scop only if it is both
8226         dominated and postdominated by the scop's entry and exit basic blocks.
8227         (function_parameter_p): New.
8228         (invariant_in_scop_p): Use function_parameter_p.
8229         (new_scop, save_scop): New.
8230         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
8231         save_scop.
8232         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
8233         (loop_in_scop_p): New.
8234         (scop_record_loop): Use loop_in_scop_p.
8235         (build_scop_domain): Renamed build_scop_iteration_domain.
8236         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
8237         nb_params_in_scop, build_scop_context, first_loop_in_scop,
8238         setup_cloog_loop, dot_scop_1, dot_scop): New.
8239         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
8240         (struct scop): Add a pointer to cloog's representation of a program.
8241
8242 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8243
8244         * doc/invoke.texi (-ftree-check-verbose): Renamed
8245         -ftree-checks-verbose.
8246         * common.opt (flag_tree_check_verbose): Renamed
8247         flag_tree_checks_verbose.
8248         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
8249
8250 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
8251
8252         * configure: Regenerated.
8253         * config.in: Regenerated.
8254         * tree-ssa-loop.c (graphite_transforms): Execute
8255         graphite_transform_loops only when HAVE_cloog.
8256         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
8257         * graphite.c: Include polylibgmp.h and cloog.h.
8258         (graphite_transform_loops): Removed loops parameter.
8259         * tree-flow.h (graphite_transform_loops): Update declaration.
8260         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
8261         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
8262         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
8263         (OBJS-common): Remove dependence on graphite.o.
8264         (BACKEND): Depend on @GRAPHITE@.
8265
8266 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
8267
8268         * doc/invoke.texi (-ftree-check-verbose): Documented.
8269         * gcc.dg/tree-checker/tree-checks-1.c: New.
8270         * gcc.dg/tree-checker/tree-checks-2.c: New.
8271         * gcc.dg/tree-checker/tree-checks-3.c: New.
8272         * gcc.dg/tree-checker/tree-checks-4.c: New.
8273         * gcc.dg/tree-checker/tree-checks.exp: New.
8274         * gcc.dg/tree-checker/condates.crp: New.
8275         * common.opt (ftree-checks-verbose): New.
8276         * tree-check.c (tree_check_warning): Move extra stderr output
8277         under control of flag_tree_check_verbose.
8278
8279 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
8280
8281         * tree-match.c: Fix comments formatting.
8282         * tree-match.h: Fix comments formatting.
8283         * tree-check.c: Fix comments formatting.
8284         (tree_check_init): Restructure.
8285
8286 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
8287
8288         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
8289
8290 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
8291
8292         * Merge from mainline (r120733:123693).
8293
8294 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
8295
8296         * condate.y: New file.
8297         * tree-match.h (struct patt_info_s): New field sign.
8298         (struct condate_s): New field msg.
8299         (normalize_condate, name_condate, add_condate): New.
8300         (conds[], condate_parse): Made extern.
8301         * tree-check.c (tree_check_warning): First arg changed to cond;
8302         warning reformatted.
8303         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
8304         (tree_scan): New.
8305         (tree_check): Process trivial condates.
8306         (read_delimited_string): Removed.
8307         (print_cond): Print name and msg.
8308         (conds[]): Made extern.
8309         (parse_tree_check_file_once): Rewritten to use the parser in
8310         condate.y.
8311         Processing of option --tree_check_string moved to tree_scan().
8312         * Makefile.in: Added condate.y
8313
8314 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
8315
8316         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
8317         Use VECs instead of varrays.
8318         * diagnostic.h (lazy_dump_generic_node): Update declaration.
8319         * Makefile.in (pretty-print.o): Depend on vec.h.
8320         * pretty-print.c: Include tree.h and vec.h.
8321         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
8322         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
8323         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
8324         pp_free_list): Use VECs instead of varrays.
8325         * pretty-print.h: Do not include varray.h.
8326         (struct tree_chunk_s): Declaration moved before its use.
8327         (output_buffer): Rename varray field to chunks.
8328         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
8329         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
8330         save_global_holes): Use VECs instead of varrays.
8331         * tree-match.h: Declare VECs of cfg_node, and hole_p.
8332         * tree-check.c (scan_cfg_stmts, push_node,
8333         print_matching_stmt): Removed.
8334         (tree_check_instance, push_global_holes_if_new, tree_check,
8335         execute_tree_check): Use VECs instead of varrays.
8336         (gate_tree_check): Don't execute the CFG check when basic_block_info
8337         is not available.
8338
8339 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8340
8341         * Merge from mainline (r115016:120733).
8342
8343 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8344
8345         * Merge from mainline (r117632:117661).
8346
8347 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
8348
8349         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
8350         * tree-pass.h (TDF_DEBUG, debug_p): New.
8351         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
8352         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
8353         get_loop_exit_condition, analyze_evolution_in_loop,
8354         analyze_initial_condition, analyze_scalar_evolution,
8355         instantiate_parameters, number_of_latch_executions): Use debug_p.
8356         * tree-chrec.c (chrec_apply): Use debug_p.
8357         * tree-data-ref.c: Include graphite.h.
8358         (dump_data_reference): Print also the access matrix.
8359         (analyze_array, analyze_indirect_ref, init_data_ref,
8360         analyze_offset_expr, address_analysis, object_analysis,
8361         create_data_ref, finalize_ddr_dependent,
8362         non_affine_dependence_relation, analyze_ziv_subscript,
8363         analyze_siv_subscript_cst_affine,
8364         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
8365         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
8366         analyze_miv_subscript, analyze_overlapping_iterations,
8367         build_classic_dist_vector, subscript_dependence_tester,
8368         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
8369         (build_access_matrix_with_af): No longer static.
8370         * tree-data-ref.h (scop_p): ... declaration here.
8371         (data_reference.scop): New field.
8372         (DR_SCOP, DR_ACCESS_MATRIX): New.
8373         (build_access_matrix_with_af, dr_num_subscripts): Declared.
8374         * graphite.c (print_graphite_bb): Call dump_data_references.
8375         (print_scop): Use scop_nb_loops and scop_dim_domain.
8376         (test_for_scop_bound): Use debug_p.
8377         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
8378         scop_nb_params.
8379         (scop_loop_index): Moved...
8380         (scop_record_loop): New.
8381         (build_scop_loop_nests): Use scop_record_loop.
8382         (build_scop_domain): Use scop_dim_domain.
8383         (build_access_matrix): Implemented.
8384         (build_scop_canonical_schedules): Use scop_nb_loops.
8385         (build_graphite_bb): Initialize GBB_SCOP.
8386         * graphite.h (scop_p): Moved...
8387         (graphite_bb.scop): New field.
8388         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
8389         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
8390         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
8391         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
8392         scop_loop_index): New.
8393         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
8394
8395 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
8396
8397         * Merge from mainline (r117661:120450).
8398
8399 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
8400
8401         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
8402         at the first declaration outside the varying loop, instantiate as
8403         far as possible.
8404         * tree-chrec.c (for_each_scev_op): New.
8405         * tree-chrec.h (for_each_scev_op): Declared.
8406         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
8407         * tree-data-ref.c (get_references_in_stmt,
8408         find_data_references_in_stmt): New, from trunk.
8409         (find_data_references_in_loop): Use get_references_in_stmt
8410         and find_data_references_in_loop, modified as in trunk.
8411         (build_access_matrix_with_af): New.
8412         * tree-data-ref.h (data_reference): Add a field access_matrix.
8413         (data_ref_loc): New, as in trunk.
8414         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
8415         invariant_in_scop_p, param_index, scan_tree_for_params,
8416         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
8417         idx_record_param, idx_record_params, build_access_matrix,
8418         build_scop_data_accesses, build_scop_canonical_schedules,
8419         build_graphite_bb, build_scop_bbs, find_params_in_bb,
8420         build_scop_params): New.
8421         * graphite.h (graphite_bb): New.
8422         (scop): Add fields static_schedule, params, loop_nest,
8423         iteration_domain.
8424         * lambda.h: Declare vecs of lambda_matrix.
8425         * tree-flow.h (print_loop_ir_bb): Declared.
8426         * tree-cfg.c (print_loop_ir_bb): New.
8427         (print_loop): Use print_loop_ir_bb.
8428
8429 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
8430
8431         * Merge from mainline (r115016:117632).
8432
8433 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
8434
8435         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
8436         break due to a warning.
8437
8438 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
8439
8440         * graphite.c (print_scops, debug_scops): New.
8441         (graphite_transform): Renamed graphite_find_transform.
8442         * graphite.h (debug_scops): Declared.
8443
8444 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
8445
8446         * tree-match.c: Reformat following the GNU style.
8447         * tree-match.h: Reformat following the GNU style.
8448         * tree-pattern.h: Removed empty file.
8449         * Makefile.in: Remove references to tree-pattern.h.
8450         * tree-check.c: Reformat following the GNU style.
8451         (execute_tree_check): Move gate condition code to...
8452         (gate_tree_check): ...here.  New function.
8453         (pass_check): Use the gate function.
8454
8455 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
8456
8457         * tree-pattern.h: New. Tree pattern matching and checking using
8458         concrete syntax.
8459         * tree-check.c: New. Tree/CFG checking pass.
8460         * tree-match.c: New. Library for tree pattern matching.
8461         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
8462         * toplev.c, flags.h: Add globals for tree-check pass.
8463         * Makefile.in: Integrate the files in tree-check pass.
8464         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
8465         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
8466         Introduce a "lazy" pretty-print mode.
8467         * tree.c, tree.h: Add tree_name.
8468
8469 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
8470
8471         * doc/invoke.texi (-fgraphite): Correct typo.
8472         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
8473         use of print_loop_ir.
8474         * gcc.dg/graphite/scop-1.c: New.
8475         * gcc.dg/graphite/scop-2.c: New.
8476         * gcc.dg/graphite/graphite.exp: New.
8477         * graphite.c: Include domwalk.h.
8478         (print_scop): Print only the entry and exit blocks.
8479         (debug_scop): No longer static.
8480         (affine_expr): Fix formating.  Return also true when the expression is
8481         constant.
8482         (stmt_simple_for_scop_p): Fix formating.
8483         (build_scops): Use domwalk.
8484         (get_loop_start, end_scop, test_for_scop_bound): New.
8485         (graphite_transform_loops): Avoid printing on stderr.
8486         * graphite.h (debug_scop): Declared.
8487         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
8488         * Makefile.in (graphite.o): Depend on domwalk.h.
8489         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
8490         declarations for static functions.
8491         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
8492         controlling output verbosity.
8493
8494 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
8495             Plesco Alexandru  <shurikx@gmail.com>
8496
8497         * doc/invoke.texi (-fgraphite): Document.
8498         * tree-pass.h (pass_graphite_transforms): Declared.
8499         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
8500         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
8501         (pass_graphite_transforms): Defined.
8502         * tree-data-ref.c (free_data_ref, data_reference): Extern.
8503         * tree-data-ref.h (free_data_ref, data_reference): Declared.
8504         * graphite.c, graphite.h: New.
8505         * common.opt (fgraphite): Declared.
8506         * tree-flow.h (graphite_transform_loops): Declared.
8507         * Makefile.in (OBJS-common): Add graphite.o.
8508         (graphite.o): New rule.
8509         * passes.c (pass_graphite_transforms): Scheduled.
8510