OSDN Git Service

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