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