OSDN Git Service

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