OSDN Git Service

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