OSDN Git Service

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