OSDN Git Service

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