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