OSDN Git Service

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