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