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