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