OSDN Git Service

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