OSDN Git Service

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