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