OSDN Git Service

Fix 473.astar miscompile.
[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.