OSDN Git Service

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