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