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