OSDN Git Service

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