OSDN Git Service

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