OSDN Git Service

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