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