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