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