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