OSDN Git Service

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