OSDN Git Service

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