OSDN Git Service

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