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