OSDN Git Service

PR c++/39413
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * graphite-dependences.c (graphite_legal_transform_bb): Call
4         pbb_remove_duplicate_pdrs.
5         * graphite-poly.c (can_collapse_pdr): Removed.
6         (pdr_find_duplicate): Removed.
7         (can_collapse_pdrs): New.
8         (pbb_remove_duplicate_pdrs): New.
9         (new_poly_dr): Do not look for duplicates.
10         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
11         (PBB_PDR_DUPLICATES_REMOVED): New.
12         (pbb_remove_duplicate_pdrs): Declared.
13
14 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
15
16         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
17         the strides by multiplying by PDR_NB_REFS.
18         * graphite-poly.c (can_collapse_pdr): New.
19         (pdr_find_duplicate): New.
20         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
21         Initialize PDR_NB_REFS.
22         * graphite-poly.h (struct poly_dr): Add field nb_refs.
23         (PDR_NB_REFS): New.
24         (new_poly_dr): Number of subscripts is a graphite_dim_t.
25
26 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
27
28         Revert one of the previous commits:
29         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
30         the computation of symmetric data dependence relations.
31         (dependency_between_pbbs_p): Same.
32
33 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
34
35         PR middle-end/40965
36         * graphite-poly.c (apply_poly_transforms): Remove legality test before
37         any transform.
38
39 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
40
41         * graphite-dependences.c (pddr_original_scattering): Return NULL
42         for read-read dependence relations.
43         * graphite-poly.h (enum poly_dr_type): Fix comment.
44         (pdr_read_p): New.
45         (pdr_write_p): New.
46         (pdr_may_write_p): New.
47
48 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
49
50         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
51         (struct poly_dr): Same.
52         (new_poly_dr): Same.
53         * graphite-poly.c (new_poly_dr): Same.
54
55 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
56             Sebastian Pop  <sebastian.pop@amd.com>
57
58         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
59         pbb_strip_mine_time_depth.  Changed the implementation so that
60         transformation is expressed as a transformation on
61         time (scatttering) dimensions.  Also, ensures that the 2d+1
62         scheduling format is preserved.
63         (pbb_strip_mine_profitable_p): Profitability is based on the
64         iteration number of a given time (scattering) dimension,
65         and not on a original loop depth dimension.
66         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
67         (pbb_do_strip_mine): Call psct_dynamic_dim.
68         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
69         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
70         (pbb_nb_dynamic_scattering_transform): New.
71         (psct_dynamic_dim): New.
72
73 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
74
75         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
76         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
77         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
78         * graphite-interchange.c (build_linearized_memory_access): Same.
79         (memory_stride_in_loop): Same.
80
81 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
82
83         * graphite-dependences.c (pddr_original_scattering): New.
84         (graphite_legal_transform_dr): Call pddr_original_scattering.
85         (dot_deps_1): New.
86         (dot_deps): New.
87         * graphite-dependences.h (dot_deps): Declared.
88         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
89         (print_pdr): Print PDR_ID.
90         * graphite-poly.h (struct poly_dr): Add field id.
91         (PDR_ID): New.
92         (pbb_index): New.
93         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
94
95 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
96
97         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
98         not delete the original dependence relation.
99
100 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
101
102         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
103         the computation of symmetric data dependence relations.
104         (dependency_between_pbbs_p): Same.
105
106 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
107
108         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
109         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
110         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
111         (free_poly_ddr): New.
112         (pddr_is_empty): New.
113         (dependence_polyhedron_1): Now returns a poly_ddr_p.
114         (dependence_polyhedron): Same.  Remove useless gcc_assert.
115         Remove fprintfs.
116         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
117         (graphite_carried_dependence_level_k): Call pddr_is_empty.
118         * graphite-dependences.h (enum poly_dependence_kind): New.
119         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
120         (PDRP_SOURCE): Renamed PDDR_SOURCE.
121         (PDRP_SINK): Renamed PDDR_SINK.
122         (PDRP_DDP): Renamed PDDR_DDP.
123         (PDDR_KIND): New.
124         (free_poly_ddr): Declared.
125         * graphite-poly.c (new_scop): Use the new hash function names.
126         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
127         into original_pddrs.
128         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
129
130 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
131
132         * Merge from mainline (150764:150992).
133
134 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
135
136         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
137         bounds with LT_EXPR to make niter analysis more precise on code
138         generated by Graphite.
139
140 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
141
142         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
143         (graphite_legal_transform_bb): Same.
144         (poly_drs_may_alias_p): Same.
145
146 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
147
148         PR middle-end/40981
149         * graphite-ppl.c (ppl_max_for_le): Correct the use of
150         ppl_Pointset_Powerset_C_Polyhedron_maximize.
151
152 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
153
154         * graphite-poly.c (print_pbb): Print PBB index.
155
156 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
157
158         * Merge from mainline (r150672:150764).
159
160 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
161
162         * graphite-interchange.c (ppl_max_for_le): Moved...
163         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
164         * graphite-ppl.c (ppl_max_for_le): ... here.
165         * graphite-ppl.h (ppl_max_for_le): Declared.
166
167 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
168
169         * Merge from mainline (r150372:150672).
170
171 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
172
173         PR middle-end/40980
174         * sese.c (convert_for_phi_arg): New.
175         (add_guard_exit_phis): Use convert_for_phi_arg.
176
177         * testsuite/gfortran.dg/graphite/id-17.f: New.
178
179 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
180
181         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
182         unknown subscript upper bounds.
183
184         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
185
186 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
187             Pranav Garg  <pranav.garg2107@gmail.com>
188
189         * graphite-interchange.c (gather_access_strides): Removed.
190         (ppl_max_for_le): New.
191         (build_linearized_memory_access): New.
192         (memory_stride_in_loop): New.
193         (pbb_interchange_profitable_p): Reimplemented.
194         * graphite-ppl.h (ppl_new_id_map): New.
195         (ppl_interchange): New.
196
197         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
198
199 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
200
201         * graphite-interchange.c (compute_subscript): Removed.
202         (compute_array_size_cstr): Removed.
203         (compute_array_size_poly): Removed.
204         (compute_array_size): Removed.
205         (gather_access_strides_poly): Removed.
206         (gather_access_strides): Empty.
207
208 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
209
210         * graphite-dependences.c (dependence_polyhedron_1): Replace
211         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
212         (graphite_legal_transform_dr): Same.
213         (graphite_carried_dependence_level_k): Same.
214         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
215         Initialize PDR_NB_SUBSCRIPTS.
216         (print_pdr_access_layout): Replace pdr_nb_subscripts with
217         PDR_NB_SUBSCRIPTS.
218         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
219         (PDR_NB_SUBSCRIPTS): New.
220         (pdr_nb_subscripts): Removed.
221         (pdr_dim): Simplified.
222         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
223         with PDR_NB_SUBSCRIPTS.
224
225 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
226
227         * graphite-interchange.c (compute_array_size): Remove use of
228         PDR_DATA_CONTAINER.
229         * graphite-poly.c (new_poly_dr): Remove argument data_container.
230         Do not initialize PDR_DATA_CONTAINER.
231         (print_pdr): Do not print PDR_DATA_CONTAINER.
232         * graphite-poly.h (struct poly_dr): Remove data_container field.
233         (PDR_DATA_CONTAINER): Removed.
234         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
235         PDR_DATA_CONTAINER.
236         (build_poly_dr): Same.
237
238 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
239
240         * testsuite/gcc.dg/graphite/interchange-9.c: New.
241
242 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
243             Sebastian Pop  <sebastian.pop@amd.com>
244
245         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
246         copy of the dependence polyhedron.  Free the temporary objects.
247         (graphite_carried_dependence_level_k): Free unused objects before
248         returning.
249
250         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
251         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
252         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
253         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
254         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
255
256 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
257
258         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
259         Early return without analyzing the data dependences if no
260         transform has been done.  Call restore_scattering if the transform
261         is not legal.
262         (graphite-interchange.c): Same.
263         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
264         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
265         (apply_poly_transforms): Do not gcc_assert that
266         the transform is legal.
267         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
268         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
269         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
270         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
271         * graphite-poly.h (struct poly_scattering): New.
272         (struct poly_bb): Add original, transformed, and saved fields.
273         Remove transformed_scattering, original_scattering, nb_local_variables,
274         and nb_scattering_transform fields.
275         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
276         (poly_scattering_new): New.
277         (poly_scattering_free): New.
278         (poly_scattering_copy): New.
279         (store_scattering_pbb): New.
280         (store_scattering): New.
281         (restore_scattering_pbb): New.
282         (restore_scattering): New.
283         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
284         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
285
286 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
287
288         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
289         (print_scop): Same.
290
291 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
292
293         * Makefile.in (graphite.o): Depends on PREDICT_H.
294         * graphite.c: Include predict.h.
295         (graphite_finalize): Call tree_estimate_probability.
296         * predict.c (predict_loops): Do not call scev_initialize and
297         scev_finalize.
298         (tree_estimate_probability_bb): New.
299         (tree_estimate_probability): Do not initialize loops: move that
300         code to the driver.  Call tree_estimate_probability_bb.
301         (tree_estimate_probability_driver): New.
302         (pass_profile): Use tree_estimate_probability_driver.
303         * predict.h (tree_estimate_probability): Declared.
304
305 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
306
307         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
308         * graphite-dependences.c (graphite_legal_transform): Add time to
309         TV_GRAPHITE_DATA_DEPS.
310         (dependency_between_pbbs_p): Same.
311         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
312
313 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
314
315         * Merge from mainline (r149952:150372).
316
317 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
318
319         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
320         * graphite-blocking.c: Same.
321         * graphite-clast-to-gimple.c: Same.
322         * graphite-dependences.c: Same.
323         * graphite-poly.c: Same.
324         * graphite-poly.h: Same.
325         * graphite-ppl.c: Same.
326         * graphite-scop-detection.c: Same.
327         * graphite-sese-to-poly.c: Same.
328         * graphite.c: Same.
329
330 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
331
332         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
333         (remove_simple_copy_phi): New.
334         (remove_invariant_phi): New.
335         (simple_copy_phi_p): New.
336         (reduction_phi_p): New.
337         (gsi_for_ssa_name_def): New.
338         (insert_out_of_ssa_copy): New.
339         (insert_out_of_ssa_copy_on_edge): New.
340         (create_zero_dim_array): New.
341         (scalar_close_phi_node_p): New.
342         (rewrite_close_phi_out_of_ssa): New.
343         (rewrite_phi_out_of_ssa): New.
344         (rewrite_reductions_out_of_ssa): New.
345         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
346
347         * testsuite/gcc.dg/graphite/id-11.c: New.
348         * testsuite/gcc.dg/graphite/id-15.c: New.
349         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
350         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
351         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
352         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
353         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
354         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
355         * testsuite/gfortran.dg/graphite/id-13.f: New.
356         * testsuite/gfortran.dg/graphite/id-5.f: New.
357
358 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
359
360         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
361         check that nb_reductions_in_loop is zero.
362         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
363         reduction phi nodes.
364         (nb_reductions_in_loop): Removed.
365         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
366         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
367         (bb_contains_non_iv_scalar_phi_nodes): Removed.
368         (scop_contains_non_iv_scalar_phi_nodes): Removed.
369         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
370
371 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
372
373         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
374         statements that have an empty iteration domain.
375         * testsuite/gfortran.dg/graphite/id-16.f: New.
376
377 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
378
379         * tree-scalar-evolution.c (instantiate_scev_1): Return
380         chrec_dont_know when the result is not above instantiate_below.
381         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
382         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
383         the tree has a known scalar evolution.
384         * testsuite/gfortran.dg/graphite/id-14.f: New.
385         * testsuite/gfortran.dg/graphite/id-15.f: New.
386
387 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
388
389         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
390         insert_gsi.
391         (rename_variables): Keep inserting renames after the ones already
392         inserted.
393
394 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
395
396         * graphite-sese-to-poly.c (compare_bb_depths): New.
397         (graphite_sort_dominated_info): New.
398         (build_scop_bbs_1): Call graphite_sort_dominated_info.
399         (build_scop_scattering): Fix comment.
400
401 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
402
403         * graphite.c (graphite_finalize): Call print_loops instead of
404         dump_function_to_file.
405         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
406         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
407         loops generated in the graphite output file.
408         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
409         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
410         * testsuite/gfortran.dg/graphite/id-12.f: New.
411
412 2009-07-24  Li Feng  <nemokingdom@gmail.com>
413
414         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
415         Remove 2 XFAIL.
416
417 2009-07-24  Li Feng  <nemokingdom@gmail.com>
418             Tobias Grosser  <grosser@fim.uni-passau.de>
419
420         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
421         alias set number build alias in ACCESSES polyhedron.
422         (build_alias_set_for_drs): New.
423         (build_pbb_drs): Added build_alias_set_for_drs.
424         * graphite-dependences.c (poly_drs_may_alias_p): New.
425         (graphite_carried_dependence_level_k): Check alias information
426         before building polyhedron.
427
428 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
429
430         * Makefile.in (lambda-code.o): Fix formatting.
431
432 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
433
434         * Merge from mainline (r149350-149952)
435
436 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
437
438         * graphite-poly.c (apply_poly_transforms): Move strip_mine
439         before interchange to prepare for loop blocking.
440
441 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
442
443         * graphite-poly.c (apply_poly_transforms): Add checks after every
444         transformation.
445         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
446         done in apply_poly_transforms.
447
448 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
449
450         * graphite-dependences.c (build_lexicographically_gt_constraint):
451         Replace RES parameter with *RES.
452         (dependence_polyhedron_1): Pass an address of the parameter RES
453         instead of value of RES.
454
455 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
456
457         * graphite.c (graphite_finalize): Fix comment.
458         (graphite_transform_loops): Reset scev info after code generation
459         of each scop.
460
461 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
462
463         * graphite.c (graphite_finalize): Call scev_reset.
464
465 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
466
467         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
468         GBB_CLOOG_IV_TYPES hash table twice.
469         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
470         (add_condition_to_domain): Clear GMP values.
471
472 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
473
474         * graphite-dependences.c: Fix formatting.
475         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
476         (pbb_number_of_iterations): Free ppl_Linear_Expression.
477         * graphite-sese-to-poly.c: Fix formatting.
478         * graphite.c (graphite_transform_loops): Create the hash table
479         after the early return.
480
481 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
482
483         * testsuite/gcc.dg/graphite/id-14.c: New.
484         * testsuite/gcc.dg/graphite/pr40157.c: New.
485         * testsuite/gfortran.dg/graphite/id-11.f: New.
486
487 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
488
489         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
490         (build_poly_scop): Return false when there are no pbbs within
491         loops to avoid to pass to cloog scops with no loops.
492
493 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
494
495         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
496         useless test "i % 2".
497         (build_pbb_scattering_polyhedrons): Fix formatting.
498         (build_poly_dr): Same.
499         * graphite.c (graphite_transform_loops): Restructure.
500
501 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
502
503         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
504         reduction_list parameter.
505         (rewrite_all_phi_nodes_with_iv): Same.
506         (canonicalize_loop_ivs): Same.
507         * tree-parloops.c (struct brli): Removed.
508         (build_reduction_list_info): Removed.
509         (build_new_reduction): New.
510         (analyze_reduction_list): Removed.
511         (gather_scalar_reductions): Find reductions instead of phi
512         nodes that can't be canonicalized.
513         (try_create_reduction_list): Remove reduction_list parameter.
514         (gen_parallel_loop): Same.
515         (parallelize_loops): Remove analyze_reductions variable,
516         initialization and free.
517         Change reduction_list htab initialization to reduction_info
518         elements instead of ssa names.
519         Call try_create_reduction_list and gen_parallel_loop without
520         analyzed_reduction argument.
521         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
522         canonicalize_loop_ivs with one less argument.
523         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
524
525 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
526
527         * graphite-dependences.c (new_poly_dr_pair): New.
528         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
529         (new_poly_dr_pair): New.
530         (eq_poly_dr_pair_p): New.
531         (hash_poly_dr_pair_p): New.
532         * graphite-dependences.h (struct poly_dr_pair): New.
533         (eq_poly_dr_pair_p): Declared.
534         (hash_poly_dr_pair_p): Declared.
535         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
536         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
537         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
538         * Makefile.in (graphite-poly.o): Add dependence on
539         graphite-dependences.h.
540
541 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
542
543         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
544         polynomials of degree > 1 pass to Graphite.
545         * tree-chrec.c (scev_is_linear_expression): Call
546         evolution_function_is_affine_multivariate_p.
547         * testsuite/gfortran.dg/graphite/id-10.f90: New.
548
549 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
550
551         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
552         Instantiate scevs varying in outer loops.
553         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
554
555 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
556
557         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
558         redundant constraint.
559
560 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
561
562         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
563         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
564         based on the file names as in the C testsuite.
565         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
566         * testsuite/gfortran.dg/graphite/block-2.f: Same.
567         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
568         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
569         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
570         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
571         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
572         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
573         * testsuite/gfortran.dg/graphite/id-6.f: Same.
574         * testsuite/gfortran.dg/graphite/id-9.f: Same.
575         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
576         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
577         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
578
579 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
580
581         * sese.c (expand_scalar_variables_call): New.
582         (expand_scalar_variables_ssa_name): Handle calls in expander.
583
584 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
585
586         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
587         Expect to see the pattern twice.
588         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
589         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
590         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
591
592 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
593
594         * testsuite/gcc.dg/graphite/id-10.c: New.
595         * testsuite/gcc.dg/graphite/id-12.c: New.
596         * testsuite/gfortran.dg/graphite/id-7.f: New.
597         * testsuite/gfortran.dg/graphite/id-8.f: New.
598
599 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
600
601         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
602         zero.
603
604 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
605
606         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
607
608 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
609
610         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
611
612 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
613
614         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
615         building PDR subscripts.
616
617 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
618
619         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
620         computation of array sizes.
621
622 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
623
624         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
625
626 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
627
628         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
629         build_pairwise_constraint, dr_equality_constraints,
630         build_pairwise_scheduling_equality,
631         build_pairwise_scheduling_inequality, lexicographically_gt_p,
632         build_lexicographically_gt_constraint, dependence_polyhedron,
633         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
634         Move from NNC_Polyhedron to C_Polyhedron.
635         * graphite-interchange.c (compute_array_size_poly,
636         gather_access_strides): Dito.
637         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
638         free_scop, pbb_number_of_iterations): Dito.
639         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
640         pbb_dim_iter_domain, struct scop): Dito.
641         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
642         new_Cloog_Domain_from_ppl_Polyhedron,
643         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
644         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
645         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
646         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
647         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
648         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
649         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
650         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
651         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
652         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
653         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
654         build_scop_iteration_domain, build_poly_dr): Dito
655
656 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
657
658         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
659         run-id-*.c files.
660         * testsuite/gcc.dg/graphite/run-id-1.c: New.
661
662 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
663
664         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
665         positivity constraint on the symbolic number of iterations.
666
667 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
668
669         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
670
671 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
672             Tobias Grosser  <grosser@fim.uni-passau.de>
673
674         * graphite-clast-to-gimple.c (build_scop_context): Removed.
675         (build_cloog_prog): Directly use SCOP_CONTEXT.
676         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
677         (free_scop): Free SCOP_CONTEXT.
678         (print_scop_context): New.
679         (print_scop): Call print_scop_context.
680         (debug_scop_context): New.
681         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
682         (struct scop): Added field context.
683         (SCOP_CONTEXT): New.
684         * graphite-sese-to-poly.c (add_param_constraints): New.
685         (build_scop_context): New.
686         (build_poly_scop): Call build_scop_context.
687
688 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
689
690         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
691         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
692         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
693         * graphite-ppl.h: Include double-int.h and tree.h.
694         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
695         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
696         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
697         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
698
699 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
700
701         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
702         POINTER_PLUS_EXPR for pointer types.
703         (clast_to_gcc_expression): Same.
704
705 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
706
707         * graphite-poly.c (print_scattering_function): Early return when
708         PBB_TRANSFORMED_SCATTERING is not initialized.
709         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
710
711 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
712
713         * tree-parloops.c (analyze_reduction_list): Remove unused variable
714         to fix bootstrap.
715
716 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
717
718         * tree-parloops.c (analyze_reduction_list): Change return
719         value to void.
720         (try_create_reduction_list): Move the call to
721         analyze_reduction_list to the beginining.
722         Call reduction_phi with analyzed_reductions as argument
723         instead of reduction_list.
724
725 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
726
727         *  Merge from mainline (r148296:149346)
728
729 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
730
731         * graphite-scop-detection.c (graphite_can_represent_init): New.
732         (graphite_can_represent_scev): Call graphite_can_represent_init:
733         check that the initial value does not contain multiplications of
734         parameters.
735         (stmt_has_simple_data_refs_p): New.
736         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
737         (is_simple_operand): Fix formatting.
738         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
739
740 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
741
742         * testsuite/gcc.dg/graphite/id-13.c: New.
743         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
744         analyze_scalar_evolution, use scalar_evolution_in_region.
745         (scan_tree_for_params_right_scev): Add extra assert.
746         (parameter_index_in_region_1): Split from parameter_index_in_region.
747         (idx_record_params): Use scalar_evolution_in_region.
748         (find_params_in_bb): Same.
749         (find_scop_parameters): Same.
750         (build_loop_iteration_domains): Same.
751         (create_linear_expr_from_tree): Same.
752         * sese.c (scalar_evolution_in_region): New.
753         * sese.h (scalar_evolution_in_region): Declared.
754         (defined_in_sese_p): New.
755         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
756         static anymore.
757         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
758         Declared.
759
760 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
761
762         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
763         TREE_DATA_REF_H also implies SCEV_H.
764
765 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
766
767         * graphite-poly.c (print_scop_params): New.
768         (print_scop): Call print_scop_params.
769         (debug_scop_params): New.
770         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
771
772 2009-07-07  Li Feng  <nemokingdom@gmail.com>
773
774         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
775         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
776         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
777         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
778         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
779         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
780
781 2009-07-07  Li Feng  <nemokingdom@gmail.com>
782
783         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
784         for dependency checking part.
785         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
786         tests for dependency checking.
787         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
788         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
789         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
790         flag -fdump-tree-graphite-all for autopar testsuites.
791
792 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
793
794         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
795         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
796         canonicalize_loop_ivs): Moved...
797         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
798
799 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
800
801         * tree-parloops.c (try_create_reduction_list): Pass an extra
802         argument analyzed_reductions.  Call analyze_reduction_list.
803         (gen_parallel_loop): Do not call analyze_reduction_list.
804         (parallelize_loops): Init and finalize analyzed_reductions.
805
806 2009-07-06  Li Feng  <nemokingdom@gmail.com>
807
808         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
809         Added flag -fno-loop-strip-mine for autopar testcase.
810
811 2009-07-04  Li Feng  <nemokingdom@gmail.com>
812
813         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
814         transformed scattering dimension instead of unmatch orignal when
815         calling dependence_polyhedron.
816
817 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
818
819         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
820
821 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
822
823         * graphite-poly.c (pbb_number_of_iterations): Check for returned
824         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
825
826 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
827
828         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
829         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
830         * graphite-poly.c (pbb_number_of_iterations): New.
831         * graphite-poly.h (pbb_number_of_iterations): Declared.
832         (pbb_iterator_dim, pbb_parameter_dim): New.
833
834 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
835
836         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
837         last commit on type of lower and upper bound of loops.
838
839 2009-06-29  Li Feng  <nemokingdom@gmail.com>
840
841         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
842         graphite-dependences.h.
843         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
844         (mark_bb_with_pbb): New.
845         (get_stmtfor_depth): New.
846         (find_pbb_via_hash): New.
847         (dependency_in_loop_p): New.
848         (mark_loops_parallel): New.
849         (free_aux_in_new_loops): New.
850         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
851         bb with it's relevant pbb. Mark newly created loops.  Remove mark
852         innermost loop parallel without checking.
853         (gloog): Add parameter BB_PBB_MAPPING.
854         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
855         (gloog): Change declaration.
856         (mark_loop_parallel): Make extern.
857         (free_aux_in_new_loops): Declare.
858         (bb_pbb_map_hash): New.
859         (eq_bb_pbb_map): New.
860         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
861         auto parallelization when flag_graphite_force_parallel is set.
862         (graphite_finalize): Added free_aux_in_new_loops.
863         * tree-parloops.c (parallelize_loops): Only generate parallel code for
864         the innermost loop that marked parallel.  Use
865         flag_graphite_force_parallel instead of loop->can_be_parallel.
866         (loop_parallel_p): Move inner most checking out of function.
867
868 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
869
870         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
871         type of lower and upper bound of loops signed long int.
872
873 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
874
875         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
876         expression outside the loop.
877
878 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
879
880         * gcc.dg/graphite/interchange-8.c: New.
881
882 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
883
884         * gcc.dg/graphite/interchange-0.c: XFailed.
885         * gcc.dg/graphite/interchange-5.c: XFailed.
886         * gcc.dg/graphite/interchange-6.c: XFailed.
887
888 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
889
890         * graphite-interchange.c (compute_array_size_poly): The end of the
891         recursion should return 1.
892
893 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
894
895         * graphite-interchange.c (compute_array_size_cstr): Allow the
896         subscript multiplier to be -1.
897         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
898         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
899         data_container.  Initializes PDR_DATA_CONTAINER.
900         (print_pdr_access_layout): New.
901         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
902         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
903         data_container.
904         (PDR_DATA_CONTAINER): New.
905         (new_poly_dr): Update declaration.
906         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
907         (build_poly_dr): Call pdr_add_data_dimensions.
908
909 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
910
911         * graphite-poly.h (struct poly_dr): Fix comment.
912         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
913         (pdr_add_memory_accesses): New.
914         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
915
916 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
917
918         * graphite-poly.c (print_pdrs, debug_pdrs): New.
919         (print_pbb): Add call to print_pdrs.
920         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
921
922 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
923             Li Feng <nemokingdom@gmail.com>
924
925         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
926         (dependency_between_pbbs_p): New.
927         (lexicographically_gt_p): Assure !empty_p before polyhedron
928         intersection assign.
929         (build_lexicographically_gt_constraint): Correct lexicographically
930         judging.
931         * graphite-dependences.h: New.
932         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
933
934 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
935
936         * graphite-clast-to-gimple.c (print_clast_stmt): New.
937         (gloog): Print to dump_file the generated clast.
938         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
939         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
940
941 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
942
943         * graphite-poly.c (extend_scattering): Increment
944         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
945
946 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
947
948         * graphite-interchange.c (compute_array_size_poly): Added exit of
949         recursion condition.  Continue iterating even after the first equality.
950         (compute_array_size): Same.
951
952 2009-06-24  Li Feng  <nemokingdom@gmail.com>
953
954         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
955         -fdump-tree-final_cleanup to -fdump-tree-optimized.
956         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
957         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
958         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
959
960 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
961
962         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
963         only when the use verifies is_gimple_reg.
964
965 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
966
967         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
968         Allocate scaldims after call to unify_scattering_dimensions.
969
970 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
971
972         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
973
974 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
975             Albert Cohen  <albert.cohen@inria.fr>
976
977         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
978         variables for the strip mining.
979
980 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
981             Pranav Garg  <pranav.garg2107@gmail.com>
982
983         * Makefile.in (OBJS-common): Added graphite-blocking.o.
984         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
985         (graphite-blocking.o): New rule.
986         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
987         * graphite-blocking.c: New.
988         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
989         flag_loop_strip_mine.
990         (psct_scattering_dim_for_loop_depth): New.
991         * graphite-poly.h (scop_do_strip_mine): Declared.
992         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
993         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
994         flag_loop_strip_mine.
995
996 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
997
998         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
999         a GMP value and a PPL coefficient at each iteration of a loop.
1000
1001 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1002
1003         * graphite-dependences.c (dependence_polyhedron): Do not use
1004         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
1005         pbb_nb_scattering_transform.
1006         (graphite_legal_transform_dr): Same.
1007         * graphite-poly.c (extend_scattering): Same.
1008         (unify_scattering_dimensions): Same.
1009         (print_scattering_function): Same.
1010         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1011         PBB_NB_LOCAL_VARIABLES.
1012         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1013         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1014         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1015         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1016         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1017         (pbb_nb_scattering_transform): New.
1018         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1019         (psco_scattering_dim): Add assert on parameters.
1020         (psct_scattering_dim): Same.
1021         (psct_scattering_dim_for_loop_depth): Declared.
1022         (psct_local_var_dim): New.
1023         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1024         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
1025         correct layout, call pbb_nb_local_vars.
1026         (psct_add_local_variable, psct_add_scattering_dimension): New.
1027         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1028         Initialize PBB_NB_SCATTERING_TRANSFORM.
1029
1030 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1031
1032         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1033         (set_coef): Renamed ppl_set_coef.
1034         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1035
1036 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1037
1038         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1039         test a boolean against 1.
1040         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1041         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1042         (pbb_do_interchange): Returns true when a transform has been performed.
1043         (scop_do_interchange): Same.
1044         * graphite-poly.c (apply_poly_transforms): Use the return value of
1045         scop_do_interchange.
1046         * graphite-poly.h (scop_do_interchange): Update declaration.
1047
1048 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1049
1050         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1051         after last use.
1052         * sese.c (sese_reset_aux_in_loops): New.
1053         * sese.h (sese_reset_aux_in_loops): New.
1054
1055 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1056
1057         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1058         multiplier and multiply the constant by the multiplier.
1059         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1060         (build_poly_dr): Do not use the multiplier to define the subscript.
1061
1062 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1063
1064         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1065         compiler's data reference.  Initialize PDR_CDR.
1066         (print_pdr): Call dump_data_reference.
1067         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1068         Add compiler_dr field.
1069         (PDR_BB): Renamed PDR_PBB.
1070         (PDR_CDR): New.
1071         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1072         GCC's data reference representation.
1073         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1074         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1075
1076 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1077
1078         * graphite-poly.c (print_scattering_function): Also print the layout.
1079         * graphite-poly.h (pbb_nb_local_vars): New.
1080
1081 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1082
1083         * graphite-poly.c (print_pbb_domain): Also print the layout names.
1084
1085 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1086
1087         * graphite-poly.c (print_pdr, debug_pdr): New.
1088         * graphite-poly.h (print_pdr, debug_pdr): Declared.
1089         (PDR_BASE): Removed.
1090
1091 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1092
1093         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1094         ltrans-{1..6,8}.c.
1095
1096 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1097
1098         * graphite-interchange.c (compute_subscript): Allow also -1 in the
1099         subscript identification column.
1100         (pbb_do_interchange): Print to dump_file that some loops "will be
1101         interchanged".  Rely on that chain of characters in the testcases.
1102         * gcc.dg/graphite/interchange-0.c: New.
1103         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1104         interchange-*.c files and compile them with -floop-interchange.
1105
1106 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
1107
1108         * graphite-interchange.c (interchange_profitable_p): Renamed
1109         pbb_interchange_profitable_p.
1110
1111 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1112             Harsha Jagasia  <harsha.jagasia@amd.com>
1113             Pranav Garg  <pranav.garg2107@gmail.com>
1114
1115         * graphite-interchange.c (interchange_profitable_p): Make static.
1116         (pbb_interchange_loop_depths, pbb_do_interchange,
1117         scop_do_interchange): New.
1118         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1119         for flag_loop_interchange.
1120         * graphite-poly.h (scop_do_interchange): Declared.
1121         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1122         flag_loop_interchange is used.
1123
1124 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1125
1126         * graphite-dependences.c (dependence_polyhedron): Update use of
1127         pbb_nb_scattering_dims.
1128         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1129         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1130         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1131         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1132
1133 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1134
1135         * graphite.c: Cleanup foo.
1136
1137 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1138
1139         * Merge from mainline (r143684:148293).
1140         * Disabled libpcp until it gets fixed.
1141
1142 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1143             Harsha Jagasia  <harsha.jagasia@amd.com>
1144
1145         * graphite-interchange.c: New.
1146         * Makefile.in (graphite-interchange.o): New.
1147         * graphite-poly.h (interchange_profitable_p): Declared.
1148         * graphite-ppl.h (value_max): New.
1149
1150 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1151
1152         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1153         * graphite-poly.h: Fix some comments.
1154         (pdr_dim): New.
1155         (pdr_scop): New.
1156
1157 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1158
1159         * graphite-poly.h
1160         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1161         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1162         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1163         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1164         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1165         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1166         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1167         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1168         * graphite-clast-to-gimple.c: Same.
1169         * graphite-dependences.c: Same.
1170         * graphite-poly.c: Same.
1171         * graphite-sese-to-poly.c: Same.
1172
1173 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1174
1175         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1176         expressions for an IV rename, as returned by clast_to_gcc_expression.
1177         (copy_renames): Rename new_name to expr.
1178         * sese.c (debug_rename_elt): Same.
1179         (get_rename): Same.
1180         (set_rename): Same.
1181         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1182         the information from the rename map.
1183         (rename_variables_in_stmt): Same.
1184         (add_loop_exit_phis): Rename new_name to expr.
1185         (insert_loop_close_phis): Same.
1186         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1187         * sese.h (struct rename_map_elt): Rename new_name to expr.
1188         (new_rename_map_elt): Same.
1189
1190 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1191
1192         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1193         * sese.c (set_rename): Make it extern.
1194         * sese.h (set_rename): Declared.
1195
1196 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1197
1198         * graphite-poly.c (extend_scattering): Free values.
1199         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1200         Free iterators.
1201         (ppl_print_powerset_matrix): Same.
1202         * graphite-scop-detection.c (free_scops_1): New.
1203         (limit_scops): Call free_scops_1.
1204         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1205         (build_poly_dr): Free PPL coefficients.
1206         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1207
1208 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1209
1210         * graphite-dependences.c: New.
1211         * graphite-data-ref.c: Removed.
1212         * graphite-data-ref.h: Removed.
1213         * Makefile.in (graphite-data-ref.o): Removed.
1214         (graphite-dependences.o): Added.
1215         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1216         * graphite-poly.c: Same.
1217         Move the data dependence testing to graphite-dependences.c.
1218
1219 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1220
1221         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1222         from graphite_cannot_represent_loop. Code refactored.
1223         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1224
1225 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1226
1227         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1228         Cover all the testcases (not only the filtered ones).
1229
1230 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1231
1232         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1233         unnecessary check. Update comments. Move check for REAL_TYPE here.
1234         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1235         done in (stmt_simple_for_scop_p).
1236
1237 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1238
1239         * graphite.c (print_global_statistics): New.
1240         (print_graphite_scop_statistic): New.
1241         (print_graphite_statistics): New.
1242         (graphite_initialize, graphite_transform_loops): Print statistics.
1243         * graphite-scop-detection (build_scops): Print statistics.
1244         (print_graphite_scop_statistics): New.
1245         (print_graphite_statistics): New.
1246
1247 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1248
1249         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1250         (debug_clast_name_index): Removed.
1251         (debug_clast_name_indexes_1): Removed.
1252         (debug_clast_name_indexes): Removed.
1253         (clast_name_index_elt_info): Removed.
1254         (eq_clast_name_indexes): Removed.
1255         (clast_name_to_index): Removed.
1256         (new_clast_name_index): Removed.
1257         (save_clast_name_index): Removed.
1258         (save_var_name): Moved...
1259         (init_sese_params_index): Removed.
1260         (clast_name_to_gcc): Remove use of name_tree.
1261         (initialize_cloog_names): Same.
1262         (gloog): Do not call init_sese_params_index.
1263         * graphite-sese-to-poly.c (save_var_name): ...here.
1264         (parameter_index_in_region): New.
1265         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1266         (parameter_index_in_region): Removed.
1267         (is_parameter): Remove use of name_tree.
1268         * sese.h (struct name_tree): Removed.
1269         (struct sese): Remove use of name_tree.  New field params_names.
1270         (SESE_PARAMS_NAMES): New.
1271         (SESE_PARAMS): Remove duplicate.
1272         (parameter_index_in_region): Removed.
1273         (sese_nb_params): Remove use of name_tree.
1274         (struct clast_name_index): New.
1275         (new_clast_name_index): New.
1276         (clast_name_to_index): New.
1277         (save_clast_name_index): New.
1278         (debug_clast_name_index): New.
1279         (debug_clast_name_indexes_1): New.
1280         (debug_clast_name_indexes): New.
1281         (clast_name_index_elt_info): New.
1282         (eq_clast_name_indexes): New.
1283
1284 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1285
1286         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1287         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1288         (graphite_loop_normal_form): Do not pass region.  Do not
1289         initialize SESE_OLDIVS.
1290         (build_graphite_loop_normal_form): Update call to
1291         graphite_loop_normal_form.
1292         * sese.c (debug_oldivs): Removed.
1293         (new_sese): Do not initialize SESE_OLDIVS.
1294         (free_sese): Do not free SESE_OLDIVS.
1295         (oldiv_for_loop): Removed.
1296         * sese.h (struct sese): Remove old_ivs.
1297         (SESE_OLDIVS): Removed.
1298         (oldiv_for_loop): Removed.
1299
1300 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1301
1302         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1303         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1304         replaced by a call to newivs_to_depth_to_newiv.
1305         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1306         (clast_to_gcc_expression_red): Same.
1307         (gcc_type_for_clast_expr): Same.
1308         (gcc_type_for_clast_eq): Same.
1309         (graphite_translate_clast_equation): Same.
1310         (graphite_create_guard_cond_expr): Same.
1311         (graphite_create_new_guard): Same.
1312         (graphite_create_new_loop): Same.
1313         (build_iv_mapping): Same.
1314         (translate_clast): Same.
1315         (gloog): Same.
1316         (loop_iv_stack_patch_for_consts): Removed.  *
1317         sese.c (iv_stack_entry_is_constant): Removed.
1318         (iv_stack_entry_is_iv): Removed.
1319         (loop_iv_stack_push_iv): Removed.
1320         (loop_iv_stack_insert_constant): Removed.
1321         (loop_iv_stack_pop): Removed.
1322         (loop_iv_stack_get_iv): Removed.
1323         (loop_iv_stack_get_iv_from_name): Removed.
1324         (debug_loop_iv_stack): Removed.
1325         (free_loop_iv_stack): Removed.
1326         (loop_iv_stack_remove_constants): Removed.  *
1327         sese.h (iv_stack_entry_kind): Removed.
1328         (iv_stack_entry_data_union): Removed.
1329         (iv_stack_entry_struct): Removed.
1330         (iv_stack_entry_p): Removed.
1331         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1332         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1333         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1334         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1335         (gbb_loop_at_index): Fix indenting.
1336         (gbb_loop_index): Removed.
1337
1338 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1339
1340         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1341         Call clast_name_to_index.
1342
1343 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1344
1345         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1346         do not pass params.  Get params from SESE_PARAMS.
1347         (clast_to_gcc_expression): Same.
1348         (clast_to_gcc_expression_red): Same.
1349         (gcc_type_for_clast_eq): Same.
1350         (graphite_translate_clast_equation): Same.
1351         (graphite_create_new_loop): Same.
1352         * sese.c (rename_variables_in_stmt): Fix comment.
1353
1354 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1355
1356         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1357         newivs_index.
1358         Call save_clast_name_index.
1359         (translate_clast): Pass newivs_index.
1360         (gloog): Create and free newivs_index.
1361
1362 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1363
1364         * graphite-clast-to-gimple.c (clast_name_index): New structure.
1365         (clast_name_index_p): New type.
1366         (debug_clast_name_index): New.
1367         (debug_clast_name_indexes_1): New.
1368         (debug_clast_name_indexes): New.
1369         (clast_name_index_elt_info): New.
1370         (eq_clast_name_indexes): New.
1371         (clast_name_to_index): New.
1372         (new_clast_name_index): New.
1373         (save_clast_name_index): New.
1374         (init_sese_params_index): New.
1375         (gloog): Call init_sese_params_index.
1376         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1377         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1378         (free_sese): Free SESE_PARAMS_INDEX.
1379         * sese.h (struct sese): Add params_index.
1380         (SESE_PARAMS_INDEX): New.
1381
1382 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1383
1384         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1385         (graphite_create_new_loop): Pass the newivs vector.  Push the
1386         newly created IV to newivs.
1387         (translate_clast): Pass the newivs vector.
1388         (gloog): Create and destroy the newivs vector.
1389
1390 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1391
1392         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1393         (graphite_loop_normal_form): Initialize loop->aux with the unique
1394         IV that has been created.
1395
1396 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
1397
1398         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1399         scev with parameters in the base part. They where forbidden
1400         exidently.
1401
1402 2009-05-11  Li Feng  <nemokingdom@gmail.com>
1403
1404         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1405         compile options by file names.
1406         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1407         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1408         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1409         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1410
1411 2009-05-08  Li Feng <nemokingdom@gmail.com>
1412
1413         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1414         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1415         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1416         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1417
1418 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1419
1420         * graphite-scop-detection (build_scops_1): Fix little bug introduced
1421         by final cleanup.
1422
1423 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1424
1425         * graphite-scop-detection.c (graphite_can_represent_scev): Only
1426         allow integer constant strides.
1427         (graphite_can_represent_expr): Depend on outermost_loop.
1428         (stmt_simple_memref_p, graphite_cannot_represent_loop,
1429         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1430         build_scops_1): Same.
1431         (scopdet_basic_block_info): Same and insert layered SCoP
1432         detection.
1433         (try_generate_gimple_bb): Cleanup.
1434         (build_scops): Enable data references.
1435
1436         * testsuite/gcc.dg/graphite/id-5.c: New.
1437         * testsuite/gcc.dg/graphite/id-9.c: New.
1438         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1439         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1440
1441 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1442
1443         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1444         that we have not yet built for this SCoP.
1445
1446 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1447
1448         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1449         for complex numbers.
1450
1451 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1452
1453         * graphite-ppl.c: Fix build if cloog is not available.
1454
1455 2009-05-04  Li Feng  <nemokingdom@gmail.com>
1456
1457         * tree-parloops.c (loop_parallel_p): Remove construction of
1458         NITER and REDUCTION_LIST.
1459         (try_get_loop_niter): New.
1460         (try_create_reduction_list): New.
1461         (parallelize_loops): Bypass the failed checkings in autopar
1462         when can_be_parallel in loop structure is set to true.
1463
1464 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1465
1466         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1467         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1468
1469 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1470
1471         * graphite-scop-detection.c (stmt_simple_for_scop_p):
1472         Enable EQ_EXPR and NE_EXPR again.
1473
1474 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1475
1476         * graphite-scop-detection.c (graphite_can_represent_scev):
1477         Add check if scev is affine multivariate.
1478         (harmful_stmt_in_bb): Check if we can represent the conditions.
1479         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1480         harmful_stmt_in_bb.
1481         * testsuite/gcc.dg/graphite/id-7.c: New.
1482
1483 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1484
1485         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1486         Check all bbs in region, not only the bbs that are represented in
1487         GRAPHITE.
1488         (build_poly_scop): Add newline.
1489         * testsuite/gcc.dg/graphite/id-8.c: New.
1490
1491 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1492
1493         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1494         when loop initialize.
1495         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1496         * common.opt: Declare flag_graphite_force_parallel.
1497         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1498         loop parallel.
1499         * graphite-poly.c (apply_poly_transforms): Introduce
1500         flag_graphite_force_parallel.
1501         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1502         * toplev.c (process_options): ditto and replace a not correctly
1503         encoded space.
1504
1505 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1506
1507         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1508         Change the call of gbb_loop_at_index and/or gbb_loop_index due
1509         to the redefinition.
1510         (compute_cloog_iv_types_1): ditto.
1511         (build_iv_mapping): ditto.
1512         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1513         initialization.
1514         (free_gimple_bb): Removed GBB_LOOPS related free part.
1515         (build_bb_loops): Removed.
1516         * sese.h (struct gimple_bb): Removed loops.
1517         (GBB_LOOPS): Removed.
1518         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1519         (gbb_loop_index): ditto.
1520
1521 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1522
1523         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1524         allow non constant strides.
1525         * testsuite/gcc.dg/graphite/scop-20.c: New.
1526
1527 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1528
1529         * graphite-scop-detection.c (dot_all_scops): Fix system call
1530         return value warning.
1531         (dot_scop): Same.
1532
1533 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1534
1535         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1536         * testsuite/gcc.dg/graphite/scop-3.c: Same.
1537
1538 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1539
1540         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1541         build_pairwise_constraint, dr_equality_constraints,
1542         build_pairwise_scheduling_equality,
1543         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1544         build_lexicographically_gt_constraint, dependence_polyhedron,
1545         graphite_legal_transform_dr, graphite_legal_transform_bb,
1546         graphite_legal_transform): New.
1547         * graphite-poly.h (graphite_legal_transform): Declared.
1548         * graphite-sese-to-poly.c (build_poly_scop): Call to
1549         graphite_legal_transform is disabled for the moment.
1550
1551 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1552
1553         * graphite-poly.h (pbb_nb_scattering_dims): New.
1554         (pbb_nb_scattering): Use it.
1555
1556 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1557
1558         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1559         Pointset_Powerset version of ppl_insert_dimensions.
1560         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1561
1562 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1563
1564         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1565
1566 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1567
1568         * graphite-poly.h: Fix comment.
1569
1570 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1571
1572         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1573
1574 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1575
1576         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1577         statements.
1578
1579 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1580
1581         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1582         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1583         conditions.
1584
1585 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
1586
1587         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1588         handle EQ_EXPR and NE_EXPR.
1589
1590 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1591
1592         * graphite-poly.h (poly_dr): Fix comment.
1593
1594 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1595             Tobias Grosser  <grosser@fim.uni-passau.de>
1596
1597         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1598         with a zero dimension polyhedron.
1599         (find_scop_parameters): Move the call to scop_set_nb_params here.
1600         (build_loop_iteration_domains): Store in loop->aux the iteration
1601         domain polyhedron.
1602         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1603         by any loop in scop.
1604         (build_poly_scop): Do not call scop_set_nb_params.
1605
1606 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1607             Tobias Grosser  <grosser@fim.uni-passau.de>
1608
1609         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1610         add_condition_to_domain not GT_EXPR.
1611
1612 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1613
1614         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1615         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1616         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1617         upper_bound_assign to calculate unions.
1618         * testsuite/gcc.dg/graphite/id-6.c: New.
1619
1620 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1621
1622         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1623         handle abnormal edges.
1624
1625 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1626
1627         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1628         (free_poly_bb): Also free poly_drs.
1629         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1630         (poly_dr): Polyhedron to Pointset_Powerset.
1631         (pdr_accessp_nb_subscripts): Same.
1632         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1633         poly_drs.
1634
1635 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1636
1637         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1638         names into more meaningful names.
1639
1640 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1641
1642         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1643         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1644
1645 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1646
1647         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1648         the reduction_list.
1649         * tree-parloops.c (rewrite_phi_with_iv): New.
1650         (rewrite_all_phi_nodes_with_iv): New.
1651         (canonicalize_loop_ivs): Call them.
1652
1653 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1654
1655         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1656         graphite_find_data_references_in_stmt.
1657         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1658         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1659
1660 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1661
1662         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1663
1664 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1665
1666         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1667         instead of bb_in_region.
1668         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
1669         (build_sese_conditions): Use flag_bb_in_sese.
1670         * sese.c (register_bb_in_sese): Removed.
1671         (new_sese): Remove initialization of SESE_REGION_BBS.
1672         (free_sese): Do not free SESE_REGION_BBS.
1673         * sese.h (struct sese): Remove field region_basic_blocks.
1674         (SESE_REGION_BBS): Removed.
1675         (bb_in_sese_p): Implement in function of bb_in_region.
1676
1677 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1678
1679         * graphite-scop-detection.c (limit_scops): Deal only with single exit
1680         loops.
1681
1682 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1683
1684         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1685         and EQ_EXPR.
1686         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1687         (add_condition_to_domain): New.
1688         (add_condition_to_pbb): New.
1689         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1690         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1691
1692 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1693
1694         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1695         ppl_Pointset_Powerset.
1696         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1697         * graphite-poly.h (poly_bb): poly_bb.domain Same.
1698         (pbb_nb_loops): Same.
1699         * graphite-sese-to-poly.c (build_loop_iteration_domains,
1700         add_conditions_to_domain): Same.
1701         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1702         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1703         ppl_const_Polyhedron_t.
1704         (ppl_print_powerset_matrix): New.
1705         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1706         ppl_print_powerset_matrix): New.
1707         (ppl_print_polyhedron_matrix): Updated.
1708
1709 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1710
1711         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1712
1713 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1714
1715         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
1716         (print_iteration_domains, debug_iteration_domain,
1717         debug_iteration_domains): New.
1718         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1719         debug_iteration_domains): Declared.
1720         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1721         indenting.
1722
1723 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
1724             Sebastian Pop  <sebastian.pop@amd.com>
1725
1726         * graphite-poly.h (print_iteration_domain): New.
1727         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1728         (build_sese_conditions_1, build_sese_conditions_after,
1729         build_sese_conditions_before): New.
1730         (build_sese_conditions): Rewritten.
1731
1732 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1733             Tobias Grosser  <grosser@fim.uni-passau.de>
1734
1735         Cleanup of code generation liveouts.
1736         * graphite-clast-to-gimple.c (translate_clast): Use a single
1737         rename_map instead of one per translated statement.
1738         Do not use SESE_LIVEOUT_RENAMES.
1739         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1740         (gloog): Do not use SESE_LIVEOUT_RENAMES.
1741         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1742         phi node of a reduction: when a loop contains a reduction used outside
1743         the loop, there should be a scalar close phi node on the exit block.
1744         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1745         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1746         (free_sese): Do not free them.
1747         (sese_build_liveouts_use): Do not use them.
1748         (sese_build_liveouts_bb): Same.
1749         (sese_build_liveouts): Same.
1750         (sese_insert_phis_for_liveouts): Same.
1751         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
1752         (defined_in_loop_p): New.
1753         (alive_after_loop): New.
1754         (close_phi_not_yet_inserted_p): New.
1755         (struct alep, alep_p): New.
1756         (add_loop_exit_phis): Remove from the rename_map all the names defined
1757         in the code generated loop.
1758         (insert_loop_close_phis): Traverse the rename_map passed to it.
1759         Don't use SESE_LIVEOUT_RENAMES.
1760         (default_liveout_before_guard): Renamed default_before_guard.
1761         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1762         (graphite_copy_stmts_from_block): Do not directly call set_rename.
1763         (register_sese_liveout_renames): Removed.
1764         (copy_bb_and_scalar_dependences): Do not call it.
1765         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1766         reduction_list.
1767         (SESE_LIVEOUT): Removed.
1768         (SESE_LIVEOUT_RENAMES): Removed.
1769         (SESE_REDUCTION_LIST): Removed.
1770         (sese_build_liveouts): Removed.
1771         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1772         (insert_loop_close_phis): Pass a htab_t instead of a sese.
1773         (insert_guard_phis): Same.
1774         (rename_map_elt): Declare a VEC of them.
1775         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1776         trees not pointers to trees.
1777
1778         Rewrite in canonical close SSA form:
1779         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1780         (limit_scops): Close the scop after the block containing the close phi
1781         nodes.
1782         (canonicalize_loop_closed_ssa): New.
1783         (canonicalize_loop_closed_ssa_form): New.
1784         (build_scops): Call canonicalize_loop_closed_ssa_form.
1785
1786         * graphite-sese-to-poly.c: Fix typos.
1787
1788 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1789
1790         * graphite-poly.c (print_scattering_function, print_pbb_domain):
1791         Extended.
1792         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1793         (print_pbb): Add conditions.
1794
1795 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1796             Sebastian Pop  <sebastian.pop@amd.com>
1797
1798         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1799         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1800         (build_scop_bbs_1): New.
1801         (build_scop_bbs): Rewrite.
1802         * sese.h (bb_in_region): New.
1803
1804 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1805
1806         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1807         poly_drs vector.
1808         (print_scop): Style.
1809         * graphite-poly.h (poly_bb): Add drs vector.
1810         (PBB_DRS): Add accessor.
1811         * graphite-sese-to-poly.c (build_poly_dr): New.
1812         (build_pbb_drs, build_scop_drs): New.
1813         (build_poly_scop): call build_scop_drs (Disabled at the moment).
1814
1815 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1816
1817         * tree-ssa-loop.c: Include forgotten toplev.h
1818
1819 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1820
1821         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1822         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1823         * testsuite/gcc.dg/graphite/pr37928.c: Same
1824         * testsuite/gcc.dg/graphite/pr38409.c: Same
1825         * testsuite/gcc.dg/graphite/pr38498.c: Same
1826         * testsuite/gcc.dg/graphite/pr38559.c: Same
1827         * testsuite/gcc.dg/graphite/pr39335.c: Same
1828         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1829         * testsuite/gfortran.dg/graphite/block-2.f: Same
1830         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1831         with -floop-*.
1832
1833 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
1834
1835         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1836         build_access_matrix, build_scop_data_accesses): Remove access function
1837         building. (We get a new version soon).
1838         (build_bb_loops, scan_tree_for_params_right_scev): Update.
1839         * sese.h (nb_loops_around_loop_in_sese): Remove.
1840         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1841
1842 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1843             Sebastian Pop  <sebastian.pop@amd.com>
1844
1845         * graphite-scop-detection.c (struct scopdet_info): Rename last
1846         field to exit.
1847         (scopdet_basic_block_info, build_scops_1): Don't use
1848         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
1849
1850 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
1851             Sebastian Pop  <sebastian.pop@amd.com>
1852
1853         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1854         * sese.c (sese_build_liveouts_use): Renamed from
1855         sese_build_livein_liveouts_use. Remove liveins.
1856         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1857         Call sese_build_liveouts_use.
1858         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1859         Call sese_build_liveouts_bb.
1860         (new_sese, free_sese): Remove liveins.
1861         (sese_add_exit_phis_var): Deleted.
1862         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1863         directly.
1864         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1865
1866         * sese.h (sese): Remove num_ver and livein.
1867         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1868
1869 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
1870
1871         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1872
1873 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
1874
1875         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1876         (build_scop_scattering): Do not use compare_prefix_loops any more.
1877         (nb_common_loops): New.
1878
1879 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1880
1881         * sese.c (get_new_name_from_old_name): Renamed get_rename.
1882         (register_old_and_new_names): Renamed set_rename.
1883
1884 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1885
1886         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1887         of the decl from the previous commit.
1888
1889 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1890
1891         * graphite-scop-detection.c (dot_scop): New.
1892         * graphite-scop-detection.h (dot_scop): Declared.
1893
1894 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1895
1896         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1897
1898 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1899
1900         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1901         condition at the end of the loop.
1902         * graphite.c (graphite_initialize, graphite_finalize): Print to
1903         dump_file the compiled function.
1904         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1905         of create_empty_loop_on_edge.
1906         (translate_clast): Update the code generation of loops for the new
1907         shape of loops.
1908         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1909
1910 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1911
1912         Reverted the patch from 2009-03-19.
1913
1914 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1915
1916         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1917         poly_drs vector.
1918         (print_scop): Style.
1919         * graphite-poly.h (poly_bb): Add drs vector.
1920         (PBB_DRS): Add accessor.
1921         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1922         (build_access_matrix_with_af, build_access_matrix,
1923         build_scop_data_accesses): Delete.
1924         (build_poly_dr): New.
1925         (build_pbb_drs, build_scop_drs): New.
1926         (build_poly_scop): call build_scop_drs.
1927
1928 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1929
1930         * graphite-scop-detection.c (dot_all_scops_1): Close the table
1931         once per basic block.
1932
1933 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1934
1935         * graphite-scop-detection.c (graphite_can_represent_scev): New.
1936         (graphite_can_represent_expr): Renamed from loop_affine_expr
1937         and enhanced.
1938         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1939         (graphite_cannot_represent_loop): Add scop_entry to parameters.
1940         (scopdet_basic_block_info): Actually define entry_block.
1941         (stmt_simple_memref_p): Moved here from ...
1942
1943         * tree-data-ref.c (stmt_simple_memref_p): here.
1944         * tree-data-ref.h (stmt_simple_memref_p): Removed.
1945
1946 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1947
1948         * testsuite/gcc.dg/graphite/id-4.c: New.
1949
1950 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
1951
1952         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1953         (register_old_and_new_names): Update the content of the map.
1954         When there was already a rename_map_elt in the map at that
1955         location, free it.
1956         (copy_bb_and_scalar_dependences): Do rename_variables after
1957         expand_scalar_variables.
1958         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1959         of the map.  When there was already a rename_map_elt in the
1960         map at that location, free it.
1961         (translate_clast): Pass the rename_map.  Do not initialize and free
1962         a rename_map per stmt_user.
1963         (gloog): Initialize and free one rename_map and pass it to
1964         translate_clast.
1965
1966 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
1967
1968         * sese.c (expand_scalar_variables_stmt,
1969         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1970         parameter.
1971         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1972         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1973         the gimple_stmt_iterator of the statement to be expanded.
1974         * graphite-scop-detection.c (is_simple_operand): Do handle
1975         REALPART_EXPR.
1976
1977 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
1978
1979         * graphite-scop-detection.c (is_simple_operand): Do not handle
1980         REALPART_EXPR.
1981         * testsuite/gcc.dg/graphite/id-2.c: New.
1982
1983         * graphite-sese-to-poly.c (build_bb_loops,
1984         add_value_to_dim, scan_tree_for_params_right_scev,
1985         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
1986         find_params_in_bb, build_loop_iteration_domains,
1987         add_conditions_to_domain): Remove subtract.
1988
1989 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
1990
1991         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
1992         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
1993         pbb_loop_at_index -> gbb_loop_at_index.
1994         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
1995         (debug_loop_vec): Delete.
1996         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
1997         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
1998         (PBB_LOOPS): Removed.
1999         (PBB_BLACK_BOX): Insert cast.
2000         (pbb_set_black_box): New setter.
2001         (pbb_loop_at_index, pbb_loop_index): Removed.
2002         (scop_set_region, scop_set_nb_params): New.
2003         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2004         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2005         (build_poly_scop): Use scop_set_nb_params.
2006         * sese.h (gimple_bb): Add LOOPS.
2007         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2008
2009 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2010
2011         Revert previous commit.
2012
2013 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2014
2015         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2016         (register_old_and_new_names): Update the content of the map.
2017         When there was already a rename_map_elt in the map at that
2018         location, free it.
2019         (copy_bb_and_scalar_dependences): Do rename_variables after
2020         expand_scalar_variables.
2021         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2022         of the map.  When there was already a rename_map_elt in the
2023         map at that location, free it.
2024         (translate_clast): Pass the rename_map.  Do not initialize and free
2025         a rename_map per stmt_user.
2026         (gloog): Initialize and free one rename_map and pass it to
2027         translate_clast.
2028
2029 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2030
2031         Remove forgotten line in revert.
2032
2033 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2034
2035         Revert previous commit.
2036
2037 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2038
2039         * sese.c (register_old_and_new_names): Update the content
2040         of the map.  When there was already a rename_map_elt in the
2041         map at that location, free it.
2042         (copy_bb_and_scalar_dependences): Do rename_variables after
2043         expand_scalar_variables.
2044         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2045         of the map.  When there was already a rename_map_elt in the
2046         map at that location, free it.
2047         (translate_clast): Pass the rename_map.  Do not initialize and free
2048         a rename_map per stmt_user.
2049         (gloog): Initialize and free one rename_map and pass it to
2050         translate_clast.
2051
2052 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2053
2054         * graphite-clast-to-gimple.c (translate_clast): context_loop
2055         is never NULL.
2056
2057 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2058             Sebastian Pop  <sebastian.pop@amd.com>
2059
2060         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2061         of the use of ppl_Polyhedron_map_space_dimensions.
2062
2063 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2064             Sebastian Pop  <sebastian.pop@amd.com>
2065
2066         * graphite-poly.c (unify_scattering_dimensions): Fix types.
2067         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2068         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2069         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2070         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2071         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2072         pbb_nb_params): New.
2073         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2074         nb_loops_around_pbb): Adapt return types.
2075
2076 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2077
2078         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2079         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2080         graphite-scop-detection.o, graphite-poly.o): Add
2081         more headers.
2082
2083 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
2084
2085         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2086         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2087         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2088
2089 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2090
2091         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2092         * testsuite/gcc.dg/graphite/pr37828.c: Same.
2093         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2094         * testsuite/gcc.dg/graphite/block-0.c: Same.
2095         * testsuite/gcc.dg/graphite/block-1.c: Same.
2096         * testsuite/gcc.dg/graphite/block-2.c: Same.
2097         * testsuite/gcc.dg/graphite/block-3.c: Same.
2098         * testsuite/gcc.dg/graphite/block-4.c: Same.
2099         * testsuite/gcc.dg/graphite/block-5.c: Same.
2100         * testsuite/gcc.dg/graphite/block-6.c: Same.
2101         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2102         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2103         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2104         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2105         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2106         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2107         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2108         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2109         * opts.c: Remove -floop-block from -O2.
2110         * graphite-poly.c: Fail if -floop-block -floop-interchange or
2111         -floop-strip-mine are used.
2112
2113 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2114             Sebastian Pop  <sebastian.pop@amd.com>
2115
2116         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2117         dimensions.
2118         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2119         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2120         strip_mine_profitable_p, is_interchange_valid,
2121         graphite_trans_bb_block, graphite_trans_loop_block,
2122         graphite_trans_scop_block): Temporary removed.
2123         (extend_scattering, unify_scattering_dimensions): New.
2124         (print_scattering_function, graphite_read_transforms):
2125         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2126         (graphite_generate_scattering_fns): Removed.
2127         (apply_poly_transforms): Cleanup.
2128         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2129         (schedule_to_scattering): Moved.
2130         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2131         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2132         (pbb_nb_scattering): New.
2133         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2134         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2135         Removed.
2136         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2137         shift_poly.
2138         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2139         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2140         -> PBB_TRANSFORMED_SCATTERING.
2141         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2142         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2143         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2144         (check_poly_representation): Do not return bool.
2145         (graphite_transform_loops): Reformat.
2146         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2147
2148 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2149
2150         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2151         debug_pbb_domain, debug_pbb, debug_scop): New.
2152         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2153         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2154
2155 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2156
2157         PR middle-end/39335
2158         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2159         when the type precision of the induction variable should be
2160         larger than the type precision of nit.
2161         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2162         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2163         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2164
2165         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2166         * testsuite/gcc.dg/graphite/pr39335.c: New.
2167
2168 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2169
2170         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2171         SSA_NAMES not struct reduction_info.
2172
2173 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2174
2175         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2176
2177 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2178             Tobias Grosser  <grosser@fim.uni-passau.de>
2179
2180         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2181         (free_sese): Free SESE_REDUCTION_LIST.
2182         * sese.h (struct sese): Add field reduction_list.
2183         (SESE_REDUCTION_LIST): New.
2184         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2185         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2186
2187 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2188             Tobias Grosser  <grosser@fim.uni-passau.de>
2189
2190         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2191         of loop_p.
2192
2193 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2194             Tobias Grosser  <grosser@fim.uni-passau.de>
2195
2196         * tree-parloops.c (struct brli, build_reduction_list_info,
2197         analyze_reduction_list, gather_scalar_reductions): New.
2198         (loop_parallel_p): Build a reduction list containing only
2199         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2200         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2201         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2202         * tree-flow.h (gather_scalar_reductions): Declared.
2203
2204 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2205
2206         PR middle-end/39308
2207         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2208         number_of_iterations_exit from a gcc_assert.
2209
2210 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2211             Jan Sjodin  <jan.sjodin@amd.com>
2212
2213         * output.h (graphite_out_file, graphite_in_file): Declared.
2214         * toplev.c (graphite_out_file, graphite_in_file): New.
2215         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2216         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2217         Don't call schedule_to_scattering.
2218         * common.opt (fgraphite-write, fgraphite-read): New.
2219         * graphite-poly.c: Include output.h.
2220         (print_scattering_function, print_scattering_functions,
2221         debug_scattering_function, debug_scattering_functions,
2222         graphite_write_transforms, graphite_read_transforms,
2223         graphite_generate_scattering_fns): New.
2224         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2225         Call graphite_generate_scattering_fns, graphite_write_transforms,
2226         graphite_read_transforms.
2227         (new_poly_bb): Initialize PBB_SCATTERING.
2228         (free_poly_bb): Free PBB_SCATTERING.
2229         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2230         * graphite-poly.h (struct poly_bb): Add field scattering.
2231         (PBB_SCATTERING): New.
2232         (print_scattering_function, print_scattering_functions,
2233         debug_scattering_function, debug_scattering_functions): Declared.
2234         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2235         GMP values, not integers!
2236         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2237         ppl_read_polyhedron_matrix): New.
2238         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2239         debug_ppl_polyhedron_matrix,
2240         ppl_read_polyhedron_matrix): Declared.
2241         * Makefile.in (graphite-poly.o): Depends on output.h.
2242
2243 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2244             Tobias Grosser  <grosser@fim.uni-passau.de>
2245
2246         Revert this change:
2247         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2248         scalar evolutions in the scop_entry->loop_father.
2249
2250 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2251             Tobias Grosser  <grosser@fim.uni-passau.de>
2252
2253         * graphite.h (ref_nb_loops): Remove declaration.
2254         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2255         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2256         debug_gbb): Moved to sese.h.
2257         * sese.h: As said.
2258
2259 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2260             Tobias Grosser  <grosser@fim.uni-passau.de>
2261
2262         * graphite-data-ref.[ch]: Disable.
2263
2264 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2265             Tobias Grosser  <grosser@fim.uni-passau.de>
2266
2267         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2268         scalar evolutions in the scop_entry->loop_father.
2269
2270 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2271
2272         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2273         (graphite_cannot_represent_loop_niter): Renamed
2274         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2275         (limit_scops): build_sese_loop_nests does not return a bool.
2276         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2277         * sese.c (nb_reductions_in_loop): ... from here.
2278         (graphite_loop_normal_form): ... from here.
2279         (sese_record_loop): Does not fail, so does not return a bool.
2280         (build_sese_loop_nests): Same.
2281         * sese.h (build_sese_loop_nests): Update declaration.
2282         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2283         (build_graphite_loop_normal_form): New.
2284         (gloog): Call build_graphite_loop_normal_form.
2285         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2286         build_sese_loop_nests.
2287
2288         * testsuite/gcc.dg/graphite/id-1.c: New.
2289
2290 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2291             Tobias Grosser  <grosser@fim.uni-passau.de>
2292
2293         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2294         The SCoP detection fix is sufficient.
2295
2296 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2297
2298         PR tree-optimization/39260
2299         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2300         the basic block contains a condition with a real type.
2301         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2302
2303         * gcc.dg/graphite/pr39260.c: New.
2304
2305 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2306
2307         * graphite-poly.c: Inlcude params.h.
2308         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2309         the size of a tile.
2310         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2311         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2312
2313 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2314             Tobias Grosser  <grosser@fim.uni-passau.de>
2315
2316         * graphite-scop-detection.c (dot_all_scops_1,
2317         dot_all_scops): Moved here.
2318         * graphite-scop-detection.h (dot_all_scops): Declared here.
2319         * graphite.c (graphite_initialize, graphite_finalize): New.
2320         (graphite_transform_loops): Cleaned up.
2321         * sese.c (debug_oldivs): Moved here.
2322         * graphite-poly.c (graphite_apply_transformations): Renamed
2323         apply_poly_transforms.
2324         (debug_loop_vec): Moved here.
2325         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2326         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2327         find_scop_parameters, build_scop_iteration_domain,
2328         add_conditions_to_constraints, build_scop_canonical_schedules,
2329         build_scop_data_accesses): Now static.
2330         (build_poly_scop, check_poly_representation): New.
2331
2332 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2333
2334         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2335         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2336         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2337         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2338         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2339         scan_tree_for_params, struct irp_data, dx_record_params,
2340         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2341         build_loop_iteration_domains, add_conditions_to_domain,
2342         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2343         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2344         build_sese_conditions, add_conditions_to_constraints,
2345         build_scop_iteration_domain, build_access_matrix_with_af,
2346         build_access_matrix,
2347         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2348
2349         * graphite-sese-to-poly.c: New.
2350         * graphite-sese-to-poly.h: New.
2351
2352         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2353
2354 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2355
2356         * graphite.c: Split graphite code generation to a new file.
2357         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2358         max_precision_type, clast_to_gcc_expression_red,
2359         clast_to_gcc_expression, gcc_type_for_clast_expr,
2360         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2361         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2362         graphite_create_new_guard, clast_get_body_of_loop,
2363         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2364         graphite_create_new_loop, build_iv_mapping, copy_renames,
2365         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2366         compute_cloog_iv_types, free_scattering, save_var_name,
2367         initialize_cloog_names, build_scop_context, build_cloog_prog,
2368         set_cloog_options, debug_clast_stmt, scop_to_clast,
2369         print_generated_program, debug_generated_program,
2370         gloog): Moved to graphite-clast-to-gimple.c.
2371
2372         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2373
2374         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2375         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2376         loop_iv_stack_pop, loop_iv_stack_get_iv,
2377         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2378         free_loop_iv_stack, loop_iv_stack_remove_constants,
2379         debug_rename_elt, debug_rename_map_1, debug_rename_map,
2380         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2381         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2382         eq_ivtype_map_elts, sese_add_exit_phis_edge,
2383         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2384         get_vdef_before_sese, sese_adjust_vphi,
2385         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2386         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2387         is_iv, expand_scalar_variables_ssa_name,
2388         expand_scalar_variables_expr, expand_scalar_variables_stmt,
2389         expand_scalar_variables, rename_variables, remove_condition,
2390         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2391         add_loop_exit_phis, insert_loop_close_phis, struct igp,
2392         default_liveout_before_guard, add_guard_exit_phis,
2393         insert_guard_phis, register_old_and_new_names,
2394         graphite_copy_stmts_from_block, register_sese_liveout_renames,
2395         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2396         if_region_set_false_region, create_if_region_on_edge,
2397         move_sese_in_condition): Moved to sese.c.
2398
2399         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2400         if_region_exit, if_region_get_condition_block,
2401         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2402         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2403         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2404         ivtype_map_elt, new_ivtype_map_elt,
2405         recompute_all_dominators): Moved to sese.h.
2406
2407         * graphite-clast-to-gimple.c: New.
2408         * graphite-clast-to-gimple.h: New.
2409         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2410         * sese.c: Modified as said above.
2411         * sese.h: Same.
2412
2413 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2414
2415         * graphite.c: Split scop detection to a new file.
2416         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2417         move_sd_regions, loop_affine_expr, exclude_component_ref,
2418         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2419         graphite_cannot_represent_loop_niter, struct scopdet_info,
2420         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2421         find_single_entry_edge, find_single_exit_edge,
2422         create_single_entry_edge, sd_region_without_exit,
2423         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2424         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2425         Moved to graphite-scop-detection.c.
2426
2427         * graphite-scop-detection.c: New.
2428         * graphite-scop-detection.h: New.
2429         * Makefile.in: Add new rule for graphite-scop-detection.o.
2430
2431         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2432         tree-scalar-evolution.h.
2433         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2434         build_sese_loop_nests): Moved here from graphite.c.
2435         (param_index): Renamed parameter_index_in_region.
2436
2437 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2438             Sebastian Pop  <sebastian.pop@amd.com>
2439
2440         * gcc.dg/graphite/block-0.c: Expected to fail now.
2441         * gcc.dg/graphite/block-1.c: Same.
2442         * gcc.dg/graphite/block-5.c: Same.
2443         * gcc.dg/graphite/block-6.c: Same.
2444
2445 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2446             Sebastian Pop  <sebastian.pop@amd.com>
2447
2448         * graphite.h: Separate from graphite_bb_p the polyhedral
2449         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2450         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2451         graphite-data-ref.h.
2452         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2453         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2454         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2455         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2456         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2457         scop_nb_params): Moved to graphite-poly.h.
2458         * graphite-data-ref.c: Same.
2459         * graphite-data-ref.h: New.
2460         * graphite.c: Same.
2461         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2462         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2463         is_interchange_valid, graphite_trans_bb_block,
2464         graphite_trans_loop_block, scop_max_loop_depth,
2465         graphite_trans_scop_block, graphite_apply_transformations,
2466         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2467         graphite-poly.c.
2468         * graphite-poly.h: New.
2469         * graphite-poly.c: New.
2470         * Makefile.in (OBJS-common): Add graphite-poly.o.
2471         (graphite-poly.o): New rule.
2472         * tree-data-ref.h (struct data_reference): Remove unused scop field.
2473         (DR_SCOP): Removed.
2474
2475 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2476             Tobias Grosser  <grosser@fim.uni-passau.de>
2477
2478         * graphite.c: Replace gb -> gbb.
2479         * graphite.h: Same.
2480         * graphite-data-ref.c: Same.
2481
2482 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2483             Tobias Grosser  <grosser@fim.uni-passau.de>
2484
2485         * Makefile.in (OBJS-commmon): Add sese.o.
2486         (sese.o): New.
2487         (graphite.o): Add sese.h.
2488         * graphite.c (bb_in_ss_p, loop_in_sese_p,
2489         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2490         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2491         Move to sese.
2492         (block_before_scop): Add missing return.
2493         (new_scop, free_scop): Remove SESE data structures.
2494         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2495         find_scop_parameters, build_loop_iteration_domains,
2496         add_conditions_to_domain, register_scop_liveout_renames,
2497         copy_bb_and_scalar_dependences): Scop -> SESE.
2498
2499         (add_conditions_to_domain): SCoP -> SESE and remove check
2500         (scop_contains_non_iv_scalar_phi_nodes): New.
2501         (build_scop_conditions_1, build_scop_conditions): Remove check for
2502         non iv scalar phi nodes.
2503         (print_scop_statistics): New.
2504         (graphite_transform_loops): Cleanup.
2505
2506         * graphite.h: Move to sese & cleanup.
2507         * sese.c: New.
2508         * sese.h: New.
2509
2510 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2511             Tobias Grosser  <grosser@fim.uni-passau.de>
2512
2513         * graphite.c (build_scop_conditions_1): Conditions are only
2514         at the end of a basic block.
2515
2516 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2517             Tobias Grosser  <grosser@fim.uni-passau>
2518
2519         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2520         field.
2521         (GBB_ALPHA): Removed.
2522
2523 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2524             Tobias Grosser  <grosser@fim.uni-passau.de>
2525
2526         * graphite-data-ref.c (graphite_test_dependence): Don't use
2527         GBB_DYNAMIC_SCHEDULE.
2528         * graphite.c (new_graphite_bb): Same.
2529         (free_graphite_bb): Same.
2530         (build_scop_dynamic_schedules): Removed.
2531         (graphite_transform_loops): Don't call it.
2532         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2533         (GBB_DYNAMIC_SCHEDULE): Removed.
2534
2535 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2536             Tobias Grosser  <grosser@fim.uni-passau.de>
2537
2538         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2539         (print_graphite_bb): Same.
2540         (build_cloog_prog): Same.
2541
2542 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2543             Tobias Grosser  <grosser@fim.uni-passau.de>
2544
2545         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2546
2547 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2548             Tobias Grosser  <grosser@fim.uni-passau.de>
2549
2550         * graphite.c (build_scop_context): Don't use CloogMatrix.
2551         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2552         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2553
2554 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2555             Tobias Grosser  <grosser@fim.uni-passau.de>
2556
2557         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2558         liveout_renames, add_params fields...
2559         (struct sese): ... here.
2560         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2561         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2562
2563 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2564             Tobias Grosser  <grosser@fim.uni-passau.de>
2565
2566         * graphite.c (print_scop): Do not print the CLooG program.
2567         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2568         build_cloog_prog, gloog): Don't use SCOP_PROG.
2569         (find_transform): Renamed scop_to_clast.
2570         (print_generated_program, debug_generated_program): New.
2571         (graphite_transform_loops): Adapt to new interface.
2572         * graphite.h (struct scop): Remove program field.
2573         (SCOP_PROG): Removed.
2574         (print_generated_program, debug_generated_program): Declared.
2575
2576 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2577
2578         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2579         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2580         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2581         free_graphite_bb, build_scop_canonical_schedules,
2582         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2583         schedules are now represented using a ppl_Linear_Expression_t.
2584         * graphite.h (struct graphite_bb): Same.
2585         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2586         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2587
2588 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2589
2590         * graphite.c: Free local memory.
2591         * graphite-ppl.c: Same.
2592
2593 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2594
2595         * graphite.c (const_column_index, get_first_matching_sign_row_index,
2596         get_lower_bound_row, get_upper_bound_row, copy_constraint,
2597         swap_constraint_variables, scale_constraint_variable): Removed.
2598         (graphite_trans_bb_strip_mine): Remove pong.
2599         * graphite-ppl.c: Include missing header files.
2600         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2601         * graphite-ppl.h (ppl_strip_loop): Declared.
2602         * Makefile.in (graphite-ppl.o): Adjust dependences.
2603
2604 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
2605
2606         * graphite.c (build_loop_iteration_domains): Remove ping pong.
2607         (build_scop_iteration_domain): Same.
2608
2609 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2610
2611         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2612         ping pong.
2613         (add_value_to_dim, scan_tree_for_params_right_scev,
2614         scan_tree_for_params_int): New.
2615         * graphite-ppl.c (oppose_constraint): New.
2616         (insert_constraint_into_matrix): Implement missing cases.
2617         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2618
2619 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2620
2621         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2622         use ppl_move_dimension.
2623
2624 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2625
2626         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2627         * graphite.c: Same.
2628         * graphite.h: Same.
2629         * graphite-ppl.c: Same.
2630         * graphite-ppl.h: Same.
2631
2632 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2633
2634         Revert last 3 commits.
2635
2636 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2637
2638         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2639         ping pong.
2640         (add_value_to_dim, scan_tree_for_params_right_scev,
2641         scan_tree_for_params_int): New.
2642         * graphite-ppl.c (oppose_constraint): New.
2643         (insert_constraint_into_matrix): Implement missing cases.
2644         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2645
2646 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2647
2648         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2649
2650 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2651             Tobias Grosser  <grosser@fim.uni-passau.de>
2652
2653         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2654         use ppl_move_dimension.
2655         * graphite-ppl.c (ppl_move_dimension): New.
2656         * graphite-ppl.h (ppl_move_dimension): Declared.
2657
2658 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2659
2660         * graphite.c: Do not include cloog/cloog.h.
2661         (print_graphite_bb): Remove ping pong, call PPL print function.
2662
2663 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2664
2665         * Makefile.in (OBJS-common): Add graphite-ppl.o.
2666         (graphite.o): Add dependence on graphite-ppl.h.
2667         (graphite-ppl.o): New.
2668         (graphite-data-ref.c): Ping pong between PPL data structures
2669         and matrices.
2670         * graphite-ppl.c: New.
2671         * graphite-ppl.h: New.
2672         * graphite.c: Include graphite-ppl.h.
2673         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2674         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2675         Ping pong between PPL data structures and matrices.
2676         (new_graphite_bb): Create a PPL constraint system.
2677         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2678         (build_loop_iteration_domains): Use PPL functions.
2679         * graphite.h: Include graphite-ppl.h.  Fix comments.
2680         (graphite_bb): Use a ppl_Constraint_System_t instead of
2681         CloogMatrix for representing the domain.
2682         (scop): Remove static_schedule.
2683         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2684
2685 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
2686
2687         * graphite.c: Fix some comments.
2688
2689 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
2690
2691         PR middle-end/38953
2692         * graphite.c (if_region_set_false_region): After moving a region
2693         in the false branch of a condition, remove the empty dummy
2694         basic block.
2695         (gloog): Remove wrong fix for PR38953.
2696
2697 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2698
2699         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2700         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2701         register_bb_in_sese, new_sese, free_sese): Moved.
2702         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2703         outermost_loop_in_scop, build_scop_iteration_domain,
2704         expand_scalar_variables_ssa_name, get_vdef_before_scop,
2705         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2706         Use loop_in_sese_p instead of loop_in_scop_p.
2707         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2708         (free_scop): Do not free SCOP_BBS_B.
2709         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2710         ref_nb_loops): Moved here...
2711         * graphite.h (ref_nb_loops): ... from here.
2712         (struct scop): Remove bbs_b bitmap.
2713         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2714         * testsuite/gcc.dg/graphite/scop-19.c: New
2715
2716 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2717
2718         * graphite.c (scopdet_basic_block_info): Fix bug in scop
2719         detection.
2720
2721 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2722
2723         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2724         eq_loop_to_cloog_loop): Remove.
2725         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2726         * graphite.h (struct scop): Remove loop2cloog_loop.
2727         (loop_domain_dim, loop_iteration_vector_dim): Remove.
2728
2729 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2730
2731         * opts.c (decode_options): Only add graphite options to O2
2732         if we compile with graphite enabled.
2733
2734 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2735
2736         * Merge from mainline (r143163:143684).
2737
2738 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2739
2740         * graphite.c (debug_value): Removed.
2741         * graphite.h (debug_value): Removed.
2742
2743 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2744
2745         * passes.c (init_optimization_passes): Do not call pass_copy_prop
2746         after graphite: pass_copy_prop does not maintain a proper loop closed
2747         SSA form.  pass_copy_prop should be fixed.
2748
2749 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2750
2751         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2752
2753 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2754
2755         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2756         (gloog): Split the exit of the scop when the scop exit is a loop exit.
2757         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2758         changed the CFG.
2759
2760 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2761
2762         * graphite.c (gloog): Return true when code gen succeeded.
2763         (graphite_transform_loops): Do not call cleanup_tree_cfg if
2764         the code of the function did not changed.  After cleanup_tree_cfg
2765         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2766         form.
2767
2768 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
2769
2770         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2771         gimple_call_lhs is NULL.
2772
2773 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
2774             Tobias Grosser  <tobi.grosser@amd.com>
2775
2776         * graphite.c (graphite_trans_scop_block): Do not block single
2777         nested loops.
2778
2779 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2780             Tobias Grosser  <tobi.grosser@amd.com>
2781
2782         * graphite.c (build_scop_canonical_schedules): Start schedules at
2783         zero.
2784
2785 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2786             Tobias Grosser  <tobi.grosser@amd.com>
2787
2788         * graphite.c (compare_prefix_loops): New.
2789         (build_scop_canonical_schedules): Rewritten.
2790         (graphite_transform_loops): Move build_scop_canonical_schedules
2791         after build_scop_iteration_domain.
2792
2793 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2794             Tobias Grosser  <tobi.grosser@amd.com>
2795
2796         * graphite.c (add_conditions_to_domain): Add the loops to
2797         the dimension of the iteration domain.  Do copy the domain
2798         only when it exists.
2799         (build_scop_conditions_1): Do not call add_conditions_to_domain.
2800         (add_conditions_to_constraints): New.
2801         (can_generate_code_stmt, can_generate_code): Removed.
2802         (gloog): Do not call can_generate_code.
2803         (graphite_transform_loops): Call add_conditions_to_constraints
2804         after building the iteration domain.
2805
2806 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2807             Tobias Grosser  <tobi.grosser@amd.com>
2808             Jan Sjodin  <jan.sjodin@amd.com>
2809
2810         * graphite.c (scan_tree_for_params): On substractions negate
2811         all the coefficients of the term.
2812         (clast_to_gcc_expression_red): New.  Handle reduction expressions
2813         of more than two operands.
2814         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2815         (get_vdef_before_scop): Handle also the case of default definitions.
2816
2817 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2818
2819         PR middle-end/38431
2820         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2821         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2822         (gloog): Do not call cleanup_tree_cfg.
2823         (graphite_transform_loops): Call cleanup_tree_cfg after all
2824         scops have been code generated.
2825
2826 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2827
2828         * passes.c (init_optimization_passes): Schedule after
2829         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2830
2831 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2832
2833         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2834         Fix comment.
2835         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
2836         Set the type of an expression to the type of its assign statement.
2837         (expand_scalar_variables_expr):  Do not pass loop_p.
2838         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
2839         (copy_bb_and_scalar_dependences): Do not pass loop_p.
2840         (translate_clast): Update call to copy_bb_and_scalar_dependences.
2841
2842 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2843
2844         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2845         an expression to the gimple_expr_type of its assign statement.
2846         (expand_scalar_variables_expr): Stop recursion on tcc_constant
2847         or tcc_declaration.
2848
2849 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2850
2851         PR tree-optimization/38786
2852         * testsuite/gcc.dg/graphite/pr38786.c: New.
2853         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2854         the SSA_NAME case of expand_scalar_variables_expr.
2855         (expand_scalar_variables_expr): Also gather the scalar computation
2856         used to index the memory access.
2857         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2858         the gimple_stmt_iterator where it inserts new code.
2859
2860 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
2861
2862         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2863
2864 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
2865
2866         * opts.c (decode_options): Enable flag_graphite_identity and
2867         flag_loop_block in -O2 and above.
2868
2869 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2870
2871         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2872         Fix merge problem: replace with the file from trunk.
2873
2874 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2875
2876         * Merge from mainline (r141727:143163).
2877
2878 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2879             Jan Sjodin  <jan.sjodin@amd.com>
2880
2881         PR tree-optimization/38559
2882         * testsuite/gcc.dg/graphite/pr38559.c: New.
2883
2884         * graphite.c (debug_value, copy_constraint,
2885         swap_constraint_variables, scale_constraint_variable, ): New.
2886         (get_lower_bound, get_upper_bound): Removed.
2887         (graphite_trans_bb_strip_mine): Clean up this code that works
2888         only for constant number of iterations.  Fully copy upper and
2889         lower bound constraints, not only the constant part of them.
2890         * graphite.h (debug_value): Declared.
2891
2892 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
2893
2894         PR tree-optimization/38492
2895         PR tree-optimization/38498
2896         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2897         * tree-chrec.h (scev_is_linear_expression): Declared.
2898         * graphite.c (graphite_cannot_represent_loop_niter): New.
2899         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2900         (graphite_loop_normal_form): Use gcc_assert.
2901         (scan_tree_for_params): Use CASE_CONVERT.
2902         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2903         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2904         Use gcc_assert.  Discard scops that contain unhandled cases.
2905         (build_scop_conditions): Return a boolean status for unhandled cases.
2906         (strip_mine_profitable_p): Print the loop number, not its depth.
2907         (is_interchange_valid): Pass the depth of the loop nest, don't
2908         recompute it wrongly.
2909         (graphite_trans_bb_block): Same.
2910         (graphite_trans_bb_block): Print tentative of loop blocking.
2911         (graphite_trans_scop_block): Do not print that the loop has been
2912         blocked.
2913         (graphite_transform_loops): Do not handle scops that contain condition
2914         scalar phi nodes.
2915
2916         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2917         in trunk.
2918         * testsuite/gcc.dg/graphite/block-0.c: Update test.
2919         * testsuite/gcc.dg/graphite/block-1.c: Same.
2920         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2921         blocking.
2922         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2923         * testsuite/gcc.dg/graphite/block-3.c: New.
2924         * testsuite/gcc.dg/graphite/pr38498.c: New.
2925
2926 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
2927
2928         PR tree-optimization/38510
2929         * gcc.dg/graphite/pr38510.c: New.
2930         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2931           (translate_clast): Call recompute_all_dominators before
2932           graphite_verify.
2933           (gloog): Call recompute_all_dominators before graphite_verify.
2934
2935 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
2936
2937         PR tree-optimization/38492
2938         * graphite.c (rename_map_elt, debug_rename_elt,
2939         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2940         rename_map_elt_info, eq_rename_map_elts,
2941         get_new_name_from_old_name, bb_in_sese_p): Moved around.
2942         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2943         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2944         (sese_build_livein_liveouts): New.
2945         (new_sese, free_sese): New.
2946         (new_scop): Call new_sese.
2947         (free_scop): Call free_sese.
2948         (rename_variables_from_edge, rename_phis_end_scop): Removed.
2949         (register_old_new_names): Renamed register_old_and_new_names.
2950         (register_scop_liveout_renames, add_loop_exit_phis,
2951         insert_loop_close_phis, struct igp,
2952         default_liveout_before_guard, add_guard_exit_phis,
2953         insert_guard_phis, copy_renames): New.
2954         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2955         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2956         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2957         (scop_adjust_phis_for_liveouts): New.
2958         (gloog): Call scop_adjust_phis_for_liveouts.
2959
2960         * graphite.h (struct sese): Documented.  Added fields liveout,
2961         num_ver and livein.
2962         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2963         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2964         (struct scop): Added field liveout_renames.
2965         (SCOP_LIVEOUT_RENAMES): New.
2966
2967 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
2968
2969         PR tree-optimization/38409
2970         * gcc.dg/graphite/pr38409.c: New.
2971         * graphite.c (nb_reductions_in_loop): Use simple_iv.
2972
2973 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
2974
2975         * graphite.c (gcc_type_for_cloog_iv): By default return
2976         integer_type_node.
2977         (graphite_create_new_loop): Don't fold_convert the already
2978         fold_convert-ed expression.
2979
2980 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
2981
2982         PR tree-optimization/38446
2983         * gcc.dg/graphite/pr38446.c: New.
2984         * graphite.c (register_bb_in_sese): New.
2985         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
2986         looking at the bbs in the region.
2987         * graphite.h (sese): Add region_basic_blocks pointer set to
2988         structure and initialize at the time of defining new scop.
2989
2990 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2991
2992         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
2993         (find_params_in_bb): Do not free data refs.
2994         (free_graphite_bb): Add FIXME on disabled free_data_refs.
2995
2996 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
2997
2998         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
2999         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3000         * testsuite/gcc.dg/graphite/block-5.c: New.
3001         * testsuite/gcc.dg/graphite/block-6.c: New.
3002         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3003         * testsuite/gcc.dg/graphite/pr37684.c: Same.
3004         * testsuite/gcc.dg/graphite/block-2.c: Same.
3005
3006         * graphite.c (struct ivtype_map_elt): New.
3007         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3008         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3009         gcc_type_for_cloog_iv): New.
3010         (loop_iv_stack_patch_for_consts): Use the type of the induction
3011         variable from the original loop, except for the automatically
3012         generated loops, i.e., in the case of a strip-mined loop, in
3013         which case there is no original loop: in that case just use
3014         integer_type_node.
3015         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3016         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3017         (clast_name_to_gcc): Accept params to be NULL.
3018         (clast_to_gcc_expression): Take an extra parameter for the type.
3019         Convert to that type all the expressions built by this function.
3020         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3021         (graphite_translate_clast_equation): Compute the type of the
3022         clast_equation before translating its LHS and RHS.
3023         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3024         (graphite_create_new_loop): Compute the type of the induction
3025         variable before translating the lower and upper bounds and before
3026         creating the induction variable.
3027         (rename_variables_from_edge, rename_phis_end_scop): New.
3028         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3029         (sese_add_exit_phis_edge): Do not use integer_zero_node.
3030         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3031         compute_cloog_iv_types): New.
3032         (gloog): Call compute_cloog_iv_types before starting the
3033         translation of the clast.
3034
3035         * graphite.h (struct graphite_bb): New field cloog_iv_types.
3036         (GBB_CLOOG_IV_TYPES): New.
3037         (debug_ivtype_map): Declared.
3038         (oldiv_for_loop): New.
3039
3040 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3041
3042         PR middle-end/38459
3043         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3044         (param_index): Assert if parameter is not know after parameter
3045         detection.
3046         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3047         (find_scop_parameters): Mark, that we have finished parameter
3048         detection.
3049         (graphite_transform_loops): Move condition detection before parameter
3050         detection.
3051         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3052         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3053
3054 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3055
3056         * graphite.c (graphite_transform_loops): Always call find_transform ()
3057         in ENABLE_CHECKING.  So we test these code paths, even if we do not
3058         generate code.
3059
3060 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3061
3062         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3063         (print_scop): Ditto.
3064
3065 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3066
3067         PR middle-end/38084
3068         Fix testsuite/gfortran.dg/graphite/id-3.f90.
3069         * graphite.c (scopdet_basic_block_info): Fix bug that found some
3070         regions more than once.
3071
3072 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3073
3074         Fix testsuite/gfortran.dg/graphite/id-4.f90.
3075         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3076         when not needed.
3077
3078 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3079
3080         Fix testsuite/gfortran.dg/graphite/id-1.f90.
3081         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3082         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3083         (max_precision_type): New.
3084         (value_clast): Removed.
3085         (clast_to_gcc_expression): Be more careful to types of expressions.
3086         Use max_precision_type and update use of gmp_cst_to_tree.
3087         (graphite_translate_clast_equation): Use max_precision_type.
3088         (graphite_create_guard_cond_expr): Do not use integer_type_node,
3089         use the type of the condition.
3090         (graphite_create_new_loop): Do not use integer_type_node, use the
3091         max_precision_type of lb and ub.
3092
3093 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3094
3095         * graphite.c (build_scops_1): Initialize open_scop.exit
3096         and sinfo.last.
3097
3098 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3099
3100         * testsuite/gcc.dg/graphite/pr38084.c: New.
3101         * testsuite/gfortran.dg/graphite/id-1.f90: New.
3102         * testsuite/gfortran.dg/graphite/id-2.f90: New.
3103         * testsuite/gfortran.dg/graphite/id-3.f90: New.
3104         * testsuite/gfortran.dg/graphite/id-4.f90: New.
3105         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3106
3107 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3108             Jan Sjodin  <jan.sjodin@amd.com>
3109             Harsha Jagasia  <harsha.jagasia@amd.com>
3110
3111         PR middle-end/37852
3112         PR middle-end/37883
3113         PR middle-end/37928
3114         PR middle-end/37980
3115         PR middle-end/38038
3116         PR middle-end/38039
3117         PR middle-end/38073
3118         PR middle-end/38083
3119         PR middle-end/38125
3120
3121         * testsuite/gcc.dg/graphite/pr38073.c: New.
3122         * testsuite/gcc.dg/graphite/pr37928.c: New.
3123         * testsuite/gcc.dg/graphite/pr37883.c: New.
3124         * testsuite/gcc.dg/graphite/pr38125.c: New.
3125         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3126         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3127         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3128
3129         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3130         the number of detected scops.  Copy exact same test for loop
3131         blocking...
3132         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3133         loops to be blocked as reductions are not handled.
3134         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
3135
3136         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3137         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3138         ...here.
3139         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3140         * Makefile.in (graphite.o): Depend on value-prof.h.
3141         (graphite.o-warn): Removed -Wno-error.
3142         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3143         to be a NULL pointer.  Call update_stmt.  Return the newly created
3144         cannonical induction variable.
3145
3146         * graphite.h (debug_rename_map): Declared.  Fix some comments.
3147
3148         * graphite.c: Reimplement the code generation from graphite to gimple.
3149         Include value-prof.h.
3150         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3151         (get_old_iv_from_ssa_name): Removed.
3152         (graphite_stmt_p): New.
3153         (new_graphite_bb): Test for useful statements before building a
3154         graphite statement for the basic block.
3155         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3156         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3157         reason.
3158         (recompute_all_dominators, graphite_verify,
3159         nb_reductions_in_loop, graphite_loop_normal_form): New.
3160         (scop_record_loop): Call graphite_loop_normal_form.
3161         (build_scop_loop_nests): Iterate over all the blocks of the
3162         function instead of relying on the incomplete information from
3163         SCOP_BBS.  Return the success of the operation.
3164         (find_params_in_bb): Use the data from GBB_DATA_REFS.
3165         (add_bb_domains): Removed.
3166         (build_loop_iteration_domains): Don't call add_bb_domains.
3167         Add the iteration domain only to the basic blocks that have been
3168         translated to graphite.
3169         (build_scop_conditions_1): Add constraints only if the basic
3170         block have been translated to graphite.
3171         (build_scop_data_accesses): Completely disabled until data
3172         dependence is correctly implemented.
3173         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3174         (remove_all_edges_1, remove_all_edges): Removed.
3175         (get_new_name_from_old_name): New.
3176         (graphite_rename_variables_in_stmt): Renamed
3177         rename_variables_in_stmt.  Call get_new_name_from_old_name.
3178         Use replace_exp and update_stmt.
3179         (is_old_iv): Renamed is_iv.
3180         (expand_scalar_variables_stmt): Extra parameter for renaming map.
3181         Use replace_exp and update_stmt.
3182         (expand_scalar_variables_expr): Same.  Use the map to get the
3183         new names for the renaming of induction variables and for the
3184         renaming of variables after a basic block has been copied.
3185         (expand_scalar_variables): Same.
3186         (graphite_rename_variables): Renamed rename_variables.
3187         (move_phi_nodes): Removed.
3188         (get_false_edge_from_guard_bb): New.
3189         (build_iv_mapping): Do not insert the induction variable of a
3190         loop in the renaming iv map if the basic block does not belong
3191         to that loop.
3192         (register_old_new_names, graphite_copy_stmts_from_block,
3193         copy_bb_and_scalar_dependences): New.
3194         (translate_clast): Heavily reimplemented: copy basic blocks,
3195         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
3196         At each translation step call graphite_verify ensuring the
3197         consistency of the SSA, loops and dominators information.
3198         (collect_virtual_phis, find_vdef_for_var_in_bb,
3199         find_vdef_for_var_1, find_vdef_for_var,
3200         patch_phis_for_virtual_defs): Removed huge hack.
3201         (mark_old_loops, remove_dead_loops, skip_phi_defs,
3202         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3203         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3204         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3205         if_region_get_condition_block, if_region_set_false_region,
3206         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3207         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3208         sese_add_exit_phis_edge, sese_add_exit_phis_var,
3209         rewrite_into_sese_closed_ssa): New.
3210         (gloog): Remove dead code.  Early return if code cannot be
3211         generated.  Call cleanup_tree_cfg once the scop has been code
3212         generated.
3213         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3214         block loops with less than two loops.
3215         (graphite_apply_transformations): Remove the call to
3216         scop_remove_ignoreable_gbbs.
3217         (limit_scops): When build_scop_loop_nests fails, continue on
3218         the next scop.  Fix open_scop.entry.
3219         (graphite_transform_loops): Call recompute_all_dominators: force the
3220         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3221         Call initialize_original_copy_tables and free_original_copy_tables
3222         to be able to copy basic blocks during code generation.
3223         When build_scop_loop_nests fails, continue on next scop.
3224         (value_clast): New union.
3225         (clast_to_gcc_expression): Fix type cast warning.
3226
3227 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
3228
3229         * Merge from mainline (r140838:141727).
3230
3231 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3232
3233         PR middle-end/37833
3234
3235         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3236
3237 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3238
3239         PR middle-end/37943
3240
3241         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3242         exits and conditions.
3243         * testsuite/gcc.dg/graphite/pr37943.c: New.
3244
3245 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3246
3247         PR middle-end/37886
3248         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3249
3250 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3251
3252         * doc/invoke.texi: Fix spaces.
3253
3254 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
3255
3256         PR tree-optimization/37891
3257         Reverted last commit.
3258         * graphite.c (create_single_entry_edge): Set
3259         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3260
3261 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
3262             Mitul Thakkar  <mitul.thakkar@amd.com>
3263
3264         * graphite.c (create_single_entry_edge): Set
3265         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3266
3267 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
3268
3269         * doc/invoke.texi: Add -fgraphite-identity.
3270         * graphite.c (graphite_apply_transformations): Check for
3271         -fgraphite-identity.
3272         * toplev.c (process_options): Add flag_graphite_identity.
3273         * tree-ssa-loop.c: Add flag_graphite_identity.
3274
3275 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3276
3277         Undo changes from 2008-10-02:
3278         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3279         operand type when copying the operand to a variable of different type.
3280         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3281         with the IV name after increment.
3282
3283 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3284             Harsha Jagasia  <harsha.jagasia@amd.com>
3285
3286         PR tree-optimization/37828
3287         * testsuite/gcc.dg/graphite/pr37828.c: New.
3288         * graphite.c (graphite_trans_loop_block): Do not loop block
3289         single nested loops.
3290
3291 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
3292             Sebastian Pop  <sebastian.pop@amd.com>
3293
3294         * graphite.c (struct rename_map_elt, new_rename_map_elt,
3295         rename_map_elt_info, eq_rename_map_elts): New.
3296         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3297         (expand_scalar_variables_expr): Change parameters.
3298         (expand_scalar_variables_stmt): Same.
3299         (expand_scalar_variables): Same.
3300         (graphite_rename_ivs): Rename graphite_rename_variables.
3301         (build_iv_mapping): New.
3302         (translate_clast): Call build_iv_mapping.
3303         * graphite.h (gbb_p): New name.
3304
3305 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
3306
3307         PR tree-optimization/37684
3308         * gcc.dg/graphite/pr37684.c: New.
3309         * graphite.c (exclude_component_ref): New.
3310         (is_simple_operand): Call exclude_component_ref.
3311
3312 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
3313             Harsha Jagasia  <harsha.jagasia@amd.com>
3314
3315         PR tree-optimization/37485
3316         * gcc.dg/graphite/block-2.c: New
3317         * graphite.c (gmp_cst_to_tree): Moved.
3318         (iv_stack_entry_is_constant): New.
3319         (iv_stack_entry_is_iv): New.
3320         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3321         (loop_iv_stack_insert_constant): New.
3322         (loop_iv_stack_pop): Use new datatpype.
3323         (loop_iv_stack_get_iv): Same.
3324         (loop_iv_stack_get_iv_from_name): Same.
3325         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3326         (loop_iv_stack_patch_for_consts): New.
3327         (loop_iv_stack_remove_constants): New.
3328         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3329         (translate_clast): Call loop_iv_stack_patch_for_consts and
3330         loop_iv_stack_remove_constants.
3331         (gloog): Use new datatype.  Redirect construction edge to end
3332         block to avoid accidental deletion.
3333         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
3334         iv stack entry.
3335         (union iv_stack_entry_data): New.  Data in iv stack entry.
3336         (struct iv_stack_entry): New.  Datatype for iv stack entries.
3337
3338 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3339
3340         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3341         operand type when copying the operand to a variable of different type.
3342
3343 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3344
3345         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3346         with the IV name after increment.
3347
3348 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3349
3350         * Merge from mainline (r140164:140838).
3351
3352 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
3353
3354         * graphite-data-ref.c: New.
3355         * graphite.c (print_scop): Also dump the dependence graph.
3356         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3357         (new_scop): Initialize SCOP_DEP_GRAPH.
3358         (build_scop_dynamic_schedules): New.
3359         (build_access_matrix_with_af): Fixed column numbering.
3360         (graphite_transform_loops): Call build_scop_dynamic_schedules.
3361         * graphite.h: Add ifndef/define guards against multiple inclusion.
3362         (struct scop): Add dep_graph field.
3363         (SCOP_DEP_GRAPH): Defined.
3364         (ref_nb_loops): Fixed and moved to other position.
3365         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3366         (nb_loops_around_loop_in_scop): New.
3367         (graphite_dump_dependence_graph): Declared.
3368         (graphite_build_rdg_all_levels): Declared.
3369         (graphite_test_dependence): Declared.
3370         * Makefile.in (graphite-data-ref.o): New target.
3371
3372 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
3373
3374         * Merge from mainline (139870:140164).
3375
3376 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3377
3378         * Merge from mainline (138275:139870).
3379         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3380         the commits from trunk broke the niter detection.
3381
3382 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3383
3384         * graphite.c: Add more documentation.  Fix formatting.
3385         (debug_loop_vec, debug_oldivs, loop_iv_stack,
3386         loop_iv_stack_debug): Moved...
3387         (schedule_to_scattering): Move before use.
3388         (dot_all_scops): Include in "#if 0" the code for system
3389         call dotty.
3390
3391         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3392         loop_iv_stack_debug): ...here.
3393
3394 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
3395
3396         * tree-phinodes.c (make_phi_node): Extern.
3397         (add_phi_node_to_bb): New.
3398         (create_phi_node): Call add_phi_node_to_bb.
3399         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3400         (remove_statement): Handle case where stored phi was updated
3401         and is no longer the same.
3402         * graphite.c (is_parameter): New.
3403         (is_old_iv): New.
3404         (expand_scalar_variables_expr): New.
3405         (expand_scalar_variables_stmt): New.
3406         (expand_scalar_variables): New.
3407         (move_phi_nodes): Create new phi instead of moving old one.
3408         (translate_clast): Call expand_scalar_variables.
3409         (find_vdef_for_var_in_bb): Also scan regular definitions.
3410         (skip_phi_defs): New.
3411         (collect_scop_exit_phi_args): New.
3412         (patch_scop_exit_phi_args): New.
3413         (gloog): Patch phis after scop.
3414         * tree-flow.h: (add_phi_node_to_bb): Declared.
3415         (make_phi_node): Declared.
3416
3417 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3418
3419         * graphite.c (end_scop): Split the entry of the scop when it
3420         is the header of the loop in which the scop is ending.
3421         (build_scops_1, limit_scops): Update uses of end_scop.
3422
3423 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3424
3425         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3426         SCOP_ENTRY or SCOP_EXIT.
3427
3428 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3429
3430         * graphite.c (get_construction_edge): Removed.
3431         (gloog): Construction edge is the scop entry edge.
3432
3433 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3434
3435         * graphite.c (can_generate_for_scop): Removed.
3436         (gloog): Do not call it.
3437
3438 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3439
3440         * graphite.c (new_scop): Entry of a scop is an edge.
3441         Initialize SESE region.
3442         (free_scop): Free SESE region.
3443         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3444         (split_difficult_bb): New, split from end_scop.
3445         (end_scop): Exit of a scop is an edge.
3446         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3447         not automatically updated and thus is always wrong.
3448         * graphite.h (struct sese): New.
3449         (SESE_ENTRY): New.
3450         (SESE_EXIT): New.
3451         (struct scop): New field for a SESE region.  Remove entry, exit.
3452         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3453         semantics as before.  Moved comment around.
3454
3455 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3456             Sebastian Pop  <sebastian.pop@amd.com>
3457
3458         * graphite.c (graphite_transform_loops): Always enable gloog
3459         and find_transform when ENABLE_CHECKING.
3460
3461 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3462
3463         * graphite.c (graphite_transform_loops): Move pretty printer
3464         of SCOPs before doing any transform.  Remove call to print_scops
3465         and dot_all_scops_1.
3466
3467 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3468
3469         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3470         (print_graphite_bb): Same.
3471
3472 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3473
3474         * graphite.c (dot_all_scops_1): Cleanup.
3475         (move_scops): Fix comment.
3476
3477 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3478
3479         * graphite.c (build_scop_bbs): Revert commit 139355:
3480
3481         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3482                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3483
3484                 * graphite.c (build_scop_bbs): Factor up code.
3485
3486 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3487
3488         * graphite.c (gloog): Update dominator info.
3489
3490 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3491
3492         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3493
3494 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3495
3496         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3497         initialization.
3498         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3499         (translate_clast): Correct formatting.
3500         * graphite.h (struct num_map): Removed.
3501         (struct graphite_bb): Remove num_map field.
3502         (GBB_INDEX_TO_NUM_MAP): Removed.
3503
3504 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3505
3506         * graphite.c (build_access_matrix_with_af): Fix comments.
3507         (build_scop_data_accesses): Same.
3508
3509 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3510
3511         * graphite.c (build_scop_data_accesses): Don't construct
3512         access matrices.  Add a FIXME and an assert condition that
3513         should pass when the access matrices will be needed.
3514
3515 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3516
3517         * tree-data-ref.c (stmt_simple_memref_p): Don't call
3518         really_constant_p.
3519         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3520         Moved close by free_graphite_bb.
3521         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
3522         (new_scop): Move close by free_scop.
3523         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3524
3525 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
3526
3527         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3528         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3529         instead of recursive call.
3530         (graphite_translate_clast_equation): New.
3531         (graphite_create_guard_cond_expr): New.
3532         (graphite_create_new_guard): New.
3533         (get_stack_index_from_iv): Removed.
3534         (graphite_rename_ivs_stmt): Use gbb_loop_index.
3535         (get_true_edge_from_guard_bb): New.
3536         (translate_clast): Handle stmt_guard in clast.
3537         (get_construction_edge): Allow construction edge detection for
3538         a scope entry with multiple predecessors if one predecessor is
3539         the immediate dominator of scope entry.
3540         (can_generate_code_stmt): Enable code generation for clast_guard.
3541         (gloog): Use correct context loop.  Removed check for post dominators.
3542         * cfgloop.h (create_empty_if_region_on_edge): Declared.
3543
3544 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3545
3546         * graphite.c (remove_dead_loops): Document better which
3547         loops are removed.
3548
3549 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3550
3551         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3552         and PPLINC.
3553         (graphite.o): Also depends on pointer-set.h.
3554
3555 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3556
3557         * graphite.c (scop_record_loop): Fix compile warning.
3558
3559 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
3560             Sebastian Pop  <sebastian.pop@amd.com>
3561
3562         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3563
3564 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3565
3566         * graphite.c (build_graphite_bb): Initialize bb->aux to
3567         point to the graphite_bb_p.
3568         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3569         content of bb->aux.
3570         (add_bb_domains): Does not use the scop parameter.
3571         (graphite_transform_loops): Clean bb->aux at the end.
3572
3573 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3574             Sebastian Pop  <sebastian.pop@amd.com>
3575
3576         * testsuite/lib/target-supports.exp
3577         (check_effective_target_fgraphite): New.
3578
3579         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3580         check_effective_target_fgraphite returns false.
3581         Set dg-do-what-default to compile.
3582         (scan-graphite-dump-times): Removed.
3583         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3584
3585         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3586         Use scan-tree-dump-times instead of scan-graphite-dump-times.
3587         * testsuite/gcc.dg/graphite/scop-1.c: Same.
3588         * testsuite/gcc.dg/graphite/scop-2.c: Same.
3589         * testsuite/gcc.dg/graphite/scop-3.c: Same.
3590         * testsuite/gcc.dg/graphite/scop-4.c: Same.
3591         * testsuite/gcc.dg/graphite/scop-5.c: Same.
3592         * testsuite/gcc.dg/graphite/scop-6.c: Same.
3593         * testsuite/gcc.dg/graphite/scop-7.c: Same.
3594         * testsuite/gcc.dg/graphite/scop-8.c: Same.
3595         * testsuite/gcc.dg/graphite/scop-9.c: Same.
3596         * testsuite/gcc.dg/graphite/scop-10.c: Same.
3597         * testsuite/gcc.dg/graphite/scop-11.c: Same.
3598         * testsuite/gcc.dg/graphite/scop-12.c: Same.
3599         * testsuite/gcc.dg/graphite/scop-13.c: Same.
3600         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3601         * testsuite/gcc.dg/graphite/scop-14.c: Same.
3602         * testsuite/gcc.dg/graphite/scop-15.c: Same.
3603         * testsuite/gcc.dg/graphite/block-0.c: Same.
3604         * testsuite/gcc.dg/graphite/scop-16.c: Same.
3605         * testsuite/gcc.dg/graphite/block-1.c: Same.
3606         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3607         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3608         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3609         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3610         * testsuite/gfortran.dg/graphite/block-2.f: Same.
3611
3612 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3613
3614         * graphite.c: Fix some XXX comments.
3615         (build_scop_dynamic_schedules): Removed.
3616
3617 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3618
3619         * graphite.h (scop_max_loop_depth): Moved...
3620         * graphite.c (scop_max_loop_depth): ...here.
3621         (remove_all_edges_1): New.
3622         (remove_all_edges): Factored code.
3623         (remove_cond_exprs): Check only the last statement for
3624         a GIMPLE_COND expression.
3625
3626 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3627
3628         * graphite.c (scan_tree_for_params): Early return when the
3629         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
3630         (find_scop_parameters): Factor out code.
3631         (graphite_trans_bb_strip_mine): Remove dead code.
3632
3633 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3634
3635         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3636         graphite_trans_bb_move_loop): Factor asserts.
3637         (gloog): Perform sanity checks only for ENABLE_CHECKING.
3638         Do not call calculate_dominance_info and estimate_bb_frequencies.
3639
3640 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
3641
3642         * graphite.c (create_loops_mapping, free_loops_mapping,
3643         create_loops_mapping_num, debug_loop_mapping_1,
3644         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3645         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3646         graphite_loops_mapping_add_child_num,
3647         graphite_loops_mapping_insert_child,
3648         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3649         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3650         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3651         create_num_from_index, get_num_from_index,
3652         swap_loop_mapped_depth): Removed.
3653         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3654         (free_scop): Do not call free_loops_mapping.
3655         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3656         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
3657         get_loop_mapped_depth.
3658         (graphite_trans_bb_move_loop): Do not update the loop mapping.
3659         (graphite_trans_bb_strip_mine): Same.
3660         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3661         (struct scop): Remove field loops_mapping.
3662
3663 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3664             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3665
3666         * graphite.c (scop_record_loop): Factor out one level of the
3667         condition by early return.
3668         (build_scop_loop_nests): Format following FSF coding style.
3669         (build_scop_dynamic_schedules): Factor out code.
3670         (scopdet_bb_info): Reindent.  Default case should not be reachable.
3671
3672 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3673             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3674
3675         * graphite.c (loop_affine_expr): Check for DECL_P or struct
3676         assignments that are not handled as simple operands for now.
3677
3678 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3679             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3680
3681         * graphite.c (build_scop_bbs): Factor up code.
3682
3683 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3684             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3685
3686         * graphite.c (stmt_simple_for_scop_p): Factor code out
3687         of the loop.
3688         (enum gbb_type): New.  Group all the GBB_* types under it.
3689         (is_loop_exit): Moved...
3690         (end_scop): Enable BB spliting.
3691         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
3692         * cfgloop.h (is_loop_exit): Declared.
3693
3694 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3695
3696         * doc/invoke.texi: Remove strides from examples containing
3697         DO loops when the strides are equal to 1.
3698
3699 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
3700             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3701
3702         * graphite.c (graphite_trans_scop_block): Or the result with
3703         the result from graphite_trans_loop_block.
3704         * testsuite/gcc.dg/graphite/block-1.c: New.
3705         * testsuite/gfortran.dg/graphite/block-1.f90: New.
3706         * testsuite/gfortran.dg/graphite/block-2.f: New.
3707
3708 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3709
3710         * graphite.c (graphite_transform_loops): Call cloog_initialize
3711         and cloog_finalize.
3712
3713 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3714
3715         * tree-data-ref.c) (stmt_simple_memref_p): New.
3716         * tree-data-ref.h (stmt_simple_memref_p): Declared.
3717         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3718         (is_simple_operand): Call stmt_simple_memref_p.
3719
3720         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3721         using pointer arithmetic, as this is optimized by PRE and
3722         makes the code too difficult to analyze.
3723
3724         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3725
3726 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3727
3728         * gdbinit.in (pgg): New.
3729
3730 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3731
3732         * graphite.c (graphite_trans_loop_block): Fix warning.
3733
3734 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3735
3736         * graphite.c (graphite_trans_loop_block): Fix my merge error.
3737
3738 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3739
3740         * graphite.c (graphite_trans_bb_block): Remove check for
3741         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3742         Check if loop blocking is profitable for every loop, before applying
3743         the changes.
3744         (graphite_apply_transformations): Call graphite_trans_bb_block only,
3745         if flag_loop_block is set.
3746
3747 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3748
3749         * graphite.c: Add some more documentation for the loop
3750         mapping.
3751
3752 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3753
3754         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3755         * graphite.c: Format on less than 80 columns.
3756         * graphite.h: Same.
3757
3758 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3759
3760         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3761
3762 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3763
3764         * doc/invoke.texi (floop-block, floop-strip-mine,
3765         floop-interchange): Update documentation with examples.
3766
3767 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3768
3769         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3770         add_referenced_var.
3771         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3772
3773 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3774
3775         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3776         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
3777         * tree-scalar-evolution.c: Revert useless changes.
3778         * tree-phinodes.c: Same.
3779         * cfghooks.c: Same.
3780         * vec.h: Same.
3781         * tree-vectorizer.h: Same.
3782         * tree-flow.h: Same.
3783         * tree-cfg.c: Same.
3784         * common.opt (fgraphite): Update documentation.
3785
3786 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
3787
3788         * doc/invoke.texi (-floop-block, -floop-strip-mine,
3789         -floop-interchange): Add more text for explaining what each of these
3790         flags is doing.
3791         * tree-into-ssa.c (gimple_vec): Moved to...
3792         * graphite.c: Include gimple.h.
3793         (gimple_vec): Moved to...
3794         (del_loop_to_cloog_loop): Removed.
3795         (loop_affine_expr): Do not call create_data_ref when the
3796         operand is a constant.
3797         (new_scop): Use free instead of del_loop_to_cloog_loop.
3798         * Makefile.in (graphite.o): Depend on GIMPLE_H.
3799         * gimple.h (gimple_vec): ... here.
3800
3801 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3802
3803         * graphite.c (scopdet_bb_info): Only allow loops with known number of
3804         latch executions.
3805         (build_loop_iteration_domains): Fail, if latch executions unknown.
3806
3807 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3808
3809         * graphite.c (add_conditions_to_domain): New.
3810         (build_scop_conditions_1): Call add_conditions_to_domain.
3811         (set_cloog_options): Allow to disable optimizations.
3812
3813 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3814
3815         * graphite.c (find_params_in_bb): Look for parameters in conditions.
3816         Do not use walk_dominator_tree.
3817         (find_scop_parameters): Do not use walk_dominator_tree.
3818
3819 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3820
3821         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3822         (idx_record_params): Adapt.
3823         * graphite.h (scop_gimple_loop_depth): New.
3824
3825 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3826
3827         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3828         (scan_tree_for_params): Remove value_init.
3829         (build_scop_context): Remove value_init.
3830         (build_loop_iteration_domains): Remove value_init.
3831         (schedule_to_scattering): Remove value_init.
3832         (graphite_trans_bb_strip_mine): Remove value_init.
3833
3834 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3835
3836         * gcc/graphite.c (limit_scops): New.
3837         (graphite_transform_loops): Add limit SCoPs.
3838         * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3839         * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3840         * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3841         * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3842         * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3843         * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3844         * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3845         * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3846         * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3847         Change loop numbers.
3848         * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3849         Change loop numbers.
3850         * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3851         * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3852         * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3853         * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3854         * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3855         * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3856         * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3857         * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3858         * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3859         * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3860
3861 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3862
3863         * graphite.c (graphite_transform_loops): Call always find_transform.
3864
3865 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3866
3867         * graphite.c (free_loops_mapping): New.
3868         (stmt_simple_for_scop_p): Fix typo.
3869         (stmt_simple_for_scop_p): Fix tuples functions, that
3870         broke polyhedron.
3871         (free_graphite_bb): Fix some memleaks.
3872         (free_scop): Fix some memleaks.
3873         (scopdet_bb_info): Do not forget some tmp SCoPs.
3874         (find_params_in_bb): Fix some memleaks.
3875         (clast_to_gcc_expression): Fix warning.
3876
3877 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
3878
3879         * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3880         * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3881
3882 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
3883
3884         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3885         Move code ifdef-ed HAVE_cloog...
3886         * graphite.c: Include toplev.h.
3887         ... here.
3888         * Makefile.in (OBJS-common): Always build graphite.o.
3889         (BACKEND): Remove @GRAPHITE@.
3890         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3891         (graphite.o): Depend on TOPLEV_H.
3892
3893 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
3894
3895         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3896         Remove typo left from polylib to ppl conversion.
3897         * graphite.c (graphite_transforms): Use sorry instead of fatal.
3898
3899 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3900
3901         * toplev.c (process_options): Move the graphite loop optimization
3902         flags...
3903         * tree-ssa-loop.c (graphite_transforms): ... here.
3904         When not configured with CLooG, print to dump_file that
3905         Graphite transforms were not performed.
3906         * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3907         New.
3908         * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3909         scan-graphite-dump-times.
3910
3911 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
3912
3913         * graphite.c (dot_scop, dot_all_scops): Do not call system.
3914         Do not open /tmp/scop.dot and /tmp/allscops.dot.
3915
3916 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
3917             Jan Sjodin  <jan.sjodin@amd.com>
3918
3919         * configure: Regenerated.
3920         * omp-low.c (expand_omp_sections): Remove now unused code.
3921         * config.in (HAVE_polylib): Removed.
3922         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3923         (PPLLIBS, PPLINC): Added.
3924         * graphite.c: Replace unsigned with int wherever possible.
3925         Don't access Cloog's data structures, but use accessor functions.
3926         Clast's stmt->type is now implemented as a vtable: change the
3927         switches of stmt->type into ifs.
3928         (polylib/polylibgmp.h): Don't include.
3929         (initialize_dependence_polyhedron,
3930         initialize_data_dependence_polyhedron, is_empty_polyhedron,
3931         statement_precedes_p, test_dependence, build_rdg_all_levels,
3932         dump_dependence_graph): Removed until this code is cleaned up
3933         or ported to Cloog.
3934         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3935         (POLYLIBINC): Renamed PPLINC.
3936
3937 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
3938             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3939             Jan Sjodin  <jan.sjodin@amd.com>
3940
3941         Finish the merge and tuplification of graphite.
3942
3943 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
3944             Jan Sjodin  <jan.sjodin@amd.com>
3945
3946         Partial merge from mainline (138072:138275).
3947         * graphite.c still has to be tuplified.
3948
3949 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
3950
3951         * graphite.c (graphite_loops_mapping_max_loop_num): New.
3952         (create_num_from_index): New.
3953         (get_num_from_index): Also pass in the graphite BB.
3954         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3955         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3956         (graphite_trans_bb_strip_mine): Call create_num_from_index.
3957         (is_interchange_valid): Return false when failing.
3958         * graphite.h (struct num_map): New.
3959         (struct graphite_bb): New field num_map.
3960         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3961
3962 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
3963
3964         * graphite.c (dump_gbb_conditions): Print also conditions like
3965         "if (a)".  Remove dublicated code and use print_generic_expr ().
3966         (stmt_simple_for_scop_p): Only allow conditions we can handle
3967         {<, <=, >, >=}.
3968
3969 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
3970
3971         * graphite.h (struct scop): Removed new_ivs field.
3972         (SCOP_NEWIVS): Deleted.
3973         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3974         clast_to_gcc_expression, graphite_create_new_loop):
3975         Removed use of new_ivs.
3976
3977 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
3978
3979         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3980         create_loops_mapping_num, debug_loop_mapping_1): New.
3981         (debug_loop_mapping): Call debug_loop_mapping_1.
3982         (get_loop_mapping_for_num,
3983         graphite_loops_mapping_add_child,
3984         graphite_loops_mapping_add_child_num,
3985         graphite_loops_mapping_insert_child,
3986         graphite_loops_mapping_parent,
3987         split_loop_mapped_depth_for_num,
3988         loop_mapped_depth_split_loop): New.
3989         (increment_loop_mapped_depths): Removed.
3990         (swap_loop_mapped_depth_for_num): Reimplemented.
3991         (new_scop): Call create_loops_mapping.
3992         (scop_record_loop): Call graphite_loops_mapping_insert_child.
3993         (translate_clast): Pass the old loop father in parameter, and pass
3994         it to get_old_iv_from_ssa_name.
3995         (remove_edges_around_useless_blocks, can_generate_code_stmt,
3996         can_generate_code, can_generate_for_scop): New.
3997         (graphite_trans_bb_block): Returns false when it fails to transform.
3998         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
3999
4000 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4001
4002         Reverted all the changes related to the streamization and
4003         loop fusion.
4004         These changes are now tracked in the streamization branch.
4005
4006 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4007             Jan Sjodin  <jan.sjodin@amd.com>
4008
4009         * graphite.c (gbb_compare): Correctly constify.
4010         (gbb_can_be_ignored): Indent.
4011         (graphite_trans_scop_swap_1and2): Add legality check.
4012         Remove dead FIXMEs.
4013
4014 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4015
4016         Remove fallouts from "Reverted the Condate changes".
4017         * tree.h: Remove unused decl.
4018         * testsuite/gcc.dg/tree-checker: Same.
4019         * timevar.def: Remove counter.
4020
4021 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
4022
4023         * Merge from mainline (135673:138072).
4024
4025         Reverted the MIRO changes (from 2008-04-05) that are now
4026         tracked in the miro branch.
4027         * tree-bounds.c: Removed.
4028         * tree-bounds.h: Removed.
4029
4030         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4031         are now tracked in the condate branch.
4032         * tree-check.c: Removed.
4033         * tree-match.c: Removed.
4034         * condate.y: Removed.
4035
4036 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4037
4038         * common.opt: New user flag -floop-block, -floop-strip-mine
4039         and -floop-interchange.
4040         * toplev.c (process_options): Enable -fgraphite pass if any one of the
4041         graphite loop optimization flags is turned on.
4042         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4043         flag_loop_strip_mine and flag_loop_interchange checks before
4044         optimizations.
4045         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4046         -floop-strip-mine and -floop-interchange.
4047         * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4048         -fgraphite.
4049         * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4050         * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4051         * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4052
4053 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
4054             Sebastian Pop  <sebastian.pop@amd.com>
4055
4056         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4057         (create_empty_loop_on_edge): More fixes.
4058         * tree-phinodes.c (resize_phi_node): Extern.
4059         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4060         * cfghooks.c (update_dominator_information): New split from
4061         split_edge.
4062         * tree-vectorizer.c (rename_variables_in_bb): Extern.
4063         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4064         successor of the function entry block.
4065
4066         * graphite.c: Include pointer-set.h.
4067         (debug_loop_mapping, increment_loop_mapped_depths,
4068         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4069         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4070         swap_loop_mapped_depth_for_num, get_num_from_index,
4071         swap_loop_mapped_depth, loop_iv_stack_debug,
4072         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4073         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4074         get_old_iv_from_ssa_name): New.
4075         (new_scop): Initialize SCOP_LOOPS_MAPPING.
4076         (free_scop): Free SCOP_LOOPS_MAPPING.
4077         (scop_record_loop): Record old ivs.
4078         (create_var_name): Removed.
4079         (initialize_cloog_names): Allocate double space in case strip mine
4080         applies to all loops once.
4081         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4082         (clast_to_gcc_expression): Same.  Implement more clast to gimple
4083         translation.
4084         (graphite_create_new_loop): Pass in ivstack.
4085         (remove_all_edges): Pass in the construction_edge.
4086         (graphite_remove_iv): Removed.
4087         (graphite_rename_ivs, graphite_rename_ivs_stmt,
4088         remove_cond_exprs): Rewritten.
4089         (move_phi_nodes): New.
4090         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4091         (translate_clast): Pass in ivstack.  Rewrite some cases.
4092         (set_cloog_options, debug_clast_stmt): New.
4093         (find_transform): Use set_cloog_options.
4094         (outermost_loop_layer): Removed.
4095         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4096         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4097         mark_old_loops, remove_dead_loops): New.
4098         (gloog): Rewritten.
4099         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4100         (const_column_index, get_first_matching_sign_row_index,
4101         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4102         get_upper_bound): New.
4103         (graphite_trans_bb_strip_mine): Also update the iv map.
4104
4105         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4106         (struct name_tree): Add a loop field.
4107         (struct scop): Add a graphite_loops_mapping field.
4108         (SCOP_LOOPS_MAPPING): New.
4109         (debug_clast_stmt): Declare.
4110         * lambda.h (find_induction_var_from_exit_cond): Declare.
4111         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4112         * cfgloop.h (update_dominators_in_loop): Removed declaration.
4113         (create_empty_loop_on_edge): Updated.
4114         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4115         rename_variables_in_bb): Declare.
4116         * tree-cfg.c (remove_bb): Extern.
4117
4118         * testsuite/gcc.dg/graphite/block-0.c: New.
4119
4120 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4121             Sebastian Pop  <sebastian.pop@amd.com>
4122
4123         * graphite.c (strip_mine_profitable_p): New.
4124         (graphite_trans_bb_block): Disable strip mining if not profitable.
4125
4126         * testsuite/gcc.dg/graphite/scop-18.c: New.
4127         * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4128         * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4129
4130 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
4131             Jan Sjodin  <jan.sjodin@amd.com>
4132             Sebastian Pop  <sebastian.pop@amd.com>
4133
4134         * graphite.c (is_interchange_valid): New.
4135         (graphite_trans_bb_block): Check loop nest of basic block for legality
4136         of interchange.
4137
4138         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4139         outer_most_loop, gbb_outer_most_loop_index): New.
4140
4141         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4142         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4143         * testsuite/gcc.dg/graphite/scop-16.c: New.
4144         * testsuite/gcc.dg/graphite/scop-17.c: New.
4145
4146 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4147
4148         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4149         (graphite_trans_scop_block): Ignore SCoPs without bbs.
4150
4151 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4152
4153         * graphite.c (new_scop): Initialize SCOP_EXIT.
4154         (scopdet_info): Add.
4155         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4156         (build_scops_1): Cleanup, bugfixes.
4157         (build_scops): Cleanup.
4158
4159         * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4160         * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4161
4162 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4163
4164         * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4165
4166         * testsuite/gfortran.dg/graphite/graphite.exp: Use
4167         DEFAULT_GRAPHITE_FLAGS.
4168
4169         * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4170
4171 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4172
4173         * graphite.c (scan_tree_for_params): Do not assert any more if
4174         MULT_EXPR parameter is negative.
4175
4176         * testsuite/gfortran.dg/graphite/scop-1.f: New.
4177
4178         * testsuite/gfortran.dg/graphite/graphite.exp: New.
4179
4180         * testsuite/gcc.dg/graphite/scop-15.c: New.
4181
4182 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4183
4184         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4185
4186 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4187
4188         * graphite.c (graphite_trans_bb_swap_loops): Rename from
4189         graphite_swap_loops.
4190         (graphite_trans_bb_move_loop): New.
4191         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4192         (graphite_trans_bb_block): New.
4193         (graphite_trans_loop_block): New.
4194         (graphite_trans_scop_swap_1and2): Rename from
4195         graphite_trans_swap_1and2.
4196         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4197         (graphite_trans_scop_block): New.
4198         (graphite_apply_transformations): Rename from
4199         graphite_transformations.
4200
4201         * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4202
4203 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4204
4205         * graphite.c (gbb_compare): New.
4206         (graphite_sort_gbbs): New.
4207         (gbb_can_be_ignored): New.
4208         (scop_remove_ignoreable_gbbs): New.
4209         (graphite_transformations): Cleanup and add
4210         scop_remove_ignoreable_gbbs.
4211         * lambda.h (lambda_vector_compare): New.
4212
4213 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4214
4215         * graphite.c (print_graphite_bb): Correct printing of static schedule.
4216         (graphite_swap_loops): int -> unsigned
4217         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4218         (graphite_transformations): New.
4219         (graphite_transform_loops): Move to graphite_transformations.
4220         * graphite.h (gbb_nb_loops): Return unsigned.
4221
4222 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4223
4224         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4225         the domain matrix.  This makes scop-0.c work again.
4226
4227 2008-06-20  Richard Guenther  <rguenther@suse.de>
4228
4229         * graphite.h: Adjust copyright to GPLv3.
4230         * graphite.c: Likewise.
4231         (stmt_simple_memref_for_scop_p): Split out from ...
4232         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
4233         and simplify.
4234         (get_bb_type): Optimize.
4235         (is_pred): Remove.
4236         (is_bb_addable): Fix memleak, replace is_pred call with
4237         single_pred.
4238         (build_scops): Use current_loops.
4239         (param_index): Fix memleak.
4240
4241 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4242
4243         * graphite.c: Fix formatting.
4244
4245 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4246
4247         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4248         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4249         (create_var_name, save_var_name): Newly defined functions.
4250         (initialize_cloog_names): Part of the code factored out to
4251         save_var_name.
4252         (clast_to_gcc_expression): Now handles the case of clast_red_sum
4253         in clast_reduction statement.
4254         (graphite_create_new_loop): Now takes a new parameter
4255         for outer_loop.
4256         (translate_clast): Now also takes the context_loop and bb_exit
4257         parameters. Rewritten the code so that it creates a gimple code
4258         inside the given context.
4259         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4260         remove_cond_expr, disconnect_cond_expr,
4261         disconnect_virtual_phi_nodes): Newly defined functions.
4262         * graphite.h (struct scop): added old_ivs vector.
4263         SCOP_OLDIVS: New macro.
4264
4265 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4266
4267         * cfgloopmanip.c: Add missing function comments, fix formatting.
4268
4269 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4270
4271         * cfgloopmanip.c (update_dominators_in_loop): Defined.
4272         (create_empty_loop_on_edge): Defined.
4273         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4274         instead of void.
4275         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4276         (update_dominators_in_loop): Declared as extern
4277         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4278
4279 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
4280
4281         * graphite.c (print_graphite_bb): Allow changing number of loops
4282         in SCoP domain.
4283         (initialize_cloog_names): Allow changing number of loops.
4284         (build_cloog_prog): Simplify.
4285         (find_transform): Enable cloog option --strides.
4286         (graphite_swap_loops): New.
4287         (graphite_strip_mine_loop): New.
4288         (graphite_trans_swap_1and2): New.
4289         (graphite_trans_strip): New.
4290         (graphite_transform_loops): Add graphite_trans_strip.
4291         * graphite.h (scop_max_loop_depth): New.
4292
4293 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4294
4295         * graphite.c (build_scop_iteration_domain): Remove forgotten
4296         line. (Fixes compile)
4297
4298 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4299
4300         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4301         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4302         (build_bb_loops): New.
4303         (graphite_transform_loops): Add build_bb_loops.
4304         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4305         numbers.
4306         * graphite.h (graphite_bb): Add loops.
4307         (gbb_nb_loops): New.
4308         (gbb_loop_at_index): New.
4309         (gbb_loop_index): New.
4310         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4311         using nb_params_in_scop.
4312
4313 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4314
4315         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4316         (build_scop_canonical_schedules): Build minimized schedule.
4317         (schedule_to_scattering): Adapt to minimized schedule.
4318         * graphite.h (graphite_bb): Add/Update descriptions.
4319
4320 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
4321             Tobias Grosser  <grosser@fim.uni-passau.de>
4322
4323         * graphite.c (print_graphite_bb): Add condition printing.
4324         (dump_value): New.
4325         (dump_gbb_conditions): New.
4326         (build_scop_conditions_1): New.
4327         (build_scop_conditions): New.
4328         * graphite.h (graphite_bb): Add conditions.
4329
4330 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4331
4332         * graphite.c (print_graphite_bb):
4333         (free_graphite_bb): New.
4334         (free_scop): Free bbs.
4335         (get_bb_type): Free doms.
4336         (build_scop_context): Free context matrix.
4337         (build_loop_iteration_domains): Remove unused code.
4338         (build_cloog_prog): Free scattering function and blocklist.
4339         (find_transform): Free options.
4340
4341 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4342
4343         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4344         Remove unnecessery cloog data structures. Make a copy of the domain
4345         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4346         unnecessary cloog data structures. Fix memory leaks. Remove insert
4347         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4348         used.
4349         (build_scop_iteration_domain): Remove unnecessary cloog
4350         data structures.  Fix memory leaks.
4351         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4352         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4353
4354 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4355
4356         * graphite.c (find_scop_params): Remove initialize_cloog_names.
4357
4358 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4359
4360         * graphite.c (end_scop): Style fix.
4361         (schedule_to_scattering): Style and comment fix.
4362
4363 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4364         * graphite.c (print_graphite_bb): Fix definiton of
4365         schedule_to_scattering.
4366         (initialize_cloog_names): Change nb_scattdims to max loop
4367         depth in SCoP.
4368         (schedule_to_scattering): Take parameter for number of scattering
4369         dimensions.
4370         (build_cloog_prog): Only build as much scattering dimensions as
4371         necessary.
4372
4373 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4374
4375         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4376         in polyhedron/aermod.f90.
4377
4378 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4379             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
4380             Harsha Jagasia  <harsha.jagasia@amd.com>
4381
4382         * graphite.c (is_bb_addable): Fix segfault.
4383
4384 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4385
4386         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4387         with multiple exits and conditional handling in edge cases.
4388         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4389
4390         * testsuite/gcc.dg/graphite/scop-14.c: New.
4391
4392 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4393             Adrien Eliche  <aeliche@isty.uvsq.fr>
4394
4395         * graphite.c (is_bb_addable): Add more comments and enhance
4396         readablity of the source code. Fix memory leak.
4397         (is_loop_exit): Fix memory leak.
4398
4399 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4400
4401         * graphite.c (first_loop_in_scop): Deleted.
4402         (setup_cloog_loop): Only walk the loop chain for inner loops.
4403         (build_scop_iteration_domain): Execute setup_cloog_loop for
4404         all loops in the first layer.
4405
4406 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
4407
4408         * graphite.c (scan_tree_for_params): Change the way params are
4409         added to be indepenent of the number of loops.
4410         (setup_cloog_loop): Revert to short matrix format. Fix parameter
4411         handling.
4412         (build_cloog_prog): Revert to short matrix format.
4413
4414 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4415             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4416
4417         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4418         warning.
4419
4420 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
4421
4422         * graphite.c (nb_data_refs_in_scop): New.
4423         (graphite_transform_loops): Print more stats: number of
4424         loops, basic blocks and data references per scop.
4425
4426 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4427             Jan Sjodin  <jan.sjodin@amd.com>
4428
4429         * graphite.c (loop_affine_expr, idx_record_params,
4430         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4431         instead of instantiate_parameters.
4432
4433 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4434
4435         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4436         add support for parameters, add STATIC_SCHEDULE at the right places,
4437         cleanup.
4438
4439 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4440
4441         * graphite.c (build_scop_loop_nests): Only add the loops, that
4442         are contained completely in the SCoP.
4443         (build_cloog_prog): Disable scattering, until schedule_to_scattering
4444         and the domains are fixed.
4445         (build_scop_canonical_schedules): Add support for bbs not contained
4446         in any SCoP.
4447
4448 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4449
4450         * graphite.h (scop_contains_loop): Update comments to match
4451         the actual behavior.
4452         (scop_contains_loop): New.
4453         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4454
4455 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4456
4457         * graphite.c (get_bb_type): On function body, i.e. loop_0,
4458         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4459         as GBB_COND_HEADER.
4460
4461 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
4462             Tobias Grosser  <grosser@fim.uni-passau.de>
4463
4464         * graphite.c (graphite_transform_loops): Early return when
4465         there are no loops in the function.
4466
4467 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4468             Jan Sjodin  <jan.sjodin@amd.com>
4469
4470         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4471         offset of the last loop.
4472         (setup_cloog_loop): Copy the entire outer constraint matrix.
4473
4474 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4475             Jan Sjodin  <jan.sjodin@amd.com>
4476
4477         * graphite.c (stmt_in_scop_p, function_parameter_p,
4478         invariant_in_scop_p): Removed.
4479         (scan_tree_for_params): Can be used with no constraint
4480         matrix for gathering parameters.
4481         (idx_record_params): Don't use idx_record_param, instead use
4482         scan_tree_for_params.
4483         (find_scop_parameters): Same.
4484         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4485         Fix the size of loop domains.
4486         (schedule_to_scattering): Exit when the outer loop is not in scop.
4487         (find_transform): Enable build_cloog_prog.
4488
4489 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4490             Jan Sjodin  <jan.sjodin@amd.com>
4491
4492         * graphite.c (schedule_to_scattering): Make scattering domains
4493         uniformly of the same size, as required by CLooG 0.14.0 and before.
4494
4495 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
4496             Jan Sjodin  <jan.sjodin@amd.com>
4497
4498         * graphite.c (schedule_to_scattering): Rewrite, correct the
4499         translation of the scheduling function to scattering.
4500         (build_cloog_prog): Call schedule_to_scattering only once.
4501         * graphite.h (scop_loop_index): Do not fail for loops not
4502         in the scop: return -1.
4503
4504 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
4505
4506         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4507         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4508         (setup_cloog_loop): Export GBB_DOMAIN.
4509         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
4510         able to rebuild the original control flow.
4511         * graphite.h (graphite_bb): Add domain field and access macro.
4512         (GBB_DOMAIN): New.
4513
4514 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
4515
4516         * graphite.c (debug_gbb): New.
4517         (print_scop, build_graphite_bb): Use SCOP_BBS.
4518         (build_scop_bbs): Reimplemented.
4519         (dfs_bb_in_scop_p): Removed.
4520         (build_scop_loop_nests): Reorder loops inserted in
4521         SCOP_LOOP_NEST: outer loops should come first.
4522         (build_scop_canonical_schedules): Reinitialize at zero
4523         the components of the SCOP_STATIC_SCHEDULE for the loops
4524         that have already been parsed.
4525
4526         * graphite.h (debug_gbb): Declared.
4527
4528 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
4529             Jan Sjodin  <jan.sjodin@amd.com>
4530
4531         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4532         (graphite_loop_to_gcc_loop): Removed.
4533         (remove_all_edges): New.
4534         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4535         (gloog): Remove useless code.
4536
4537 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4538
4539         * graphite.c (get_bb_type): Reworked. We distinguish between
4540         loops with one or multiple exits.
4541         (is_loop_exit): New.
4542         (is_pred): New.
4543         (is_bb_addable): Rework condition handling, now support for case
4544         case statements and loops with multiple exits.
4545
4546         * testsuite/gcc.dg/graphite/scop-11.c: New.
4547         * testsuite/gcc.dg/graphite/scop-12.c: New.
4548         * testsuite/gcc.dg/graphite/scop-13.c: New.
4549
4550 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4551
4552         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4553         we have too many colors.
4554
4555 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
4556
4557         * doc/invoke.texi (-ftree-loop-fusion): Document.
4558         * tree-pass.h (pass_loop_fusion): Declared.
4559         * tree-loop-fusion.c: New.
4560         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4561         * tree-data-ref.c (find_data_references_in_loop): Make extern.
4562         * tree-data-ref.h (find_data_references_in_loop): Declared.
4563         * common.opt (ftree-loop-fusion): Declared.
4564         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4565
4566 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
4567
4568         * graphite.c (build_access_matrix): Fix typo from the merge.
4569
4570 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
4571
4572         * Merge from mainline (130800:135673).
4573
4574 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4575
4576         * graphite.c (end_scop): The exit of the scop is not part of the scop.
4577         Update dominators after splitting.
4578
4579 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4580
4581         * graphite.c (is_bb_addable): Return the harmful statement.
4582         Factor up some code.
4583         (end_scop): New.  Splits end of scope bbs on a harmful statement.
4584         (build_scops_1): Call end_scop.
4585
4586 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
4587
4588         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4589         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4590         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4591         build_scops_1): Removed.
4592         (build_scops_2): Renamed build_scops_1.
4593
4594 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
4595
4596         * graphite.c: Fix formatting.
4597
4598 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4599
4600         * graphite.c (get_bb_type): New.
4601         (move_scops): New.
4602         (build_scops_2): New.
4603         (is_bb_addable): New.
4604         (build_scops): Switch the scop detection.
4605         (build_scop_bbs): Add entry bb to scop.
4606         * graphite.h (struct scop): Update comment.
4607
4608 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4609
4610         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4611         more colors.
4612
4613 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4614
4615         * testsuite/gcc.dg/graphite/scop-1.c: Update.
4616         * testsuite/gcc.dg/graphite/scop-2.c: Update.
4617         * testsuite/gcc.dg/graphite/scop-4.c: Update.
4618         * testsuite/gcc.dg/graphite/scop-5.c: Add.
4619         * testsuite/gcc.dg/graphite/scop-6.c: Add.
4620
4621 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
4622
4623         * testsuite/gcc.dg/graphite/scop-0.c: Add.
4624         * testsuite/gcc.dg/graphite/scop-7.c: Add.
4625         * testsuite/gcc.dg/graphite/scop-8.c: Add.
4626         * testsuite/gcc.dg/graphite/scop-9.c: Add.
4627         * testsuite/gcc.dg/graphite/scop-10.c: Add.
4628
4629 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
4630
4631         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4632         Check affine expressions depending on the outermost loop
4633         instead of a scop.
4634         (stmt_simple_for_scop_p): Same.
4635         (harmfule_stmt_in_scop): Same.
4636
4637 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
4638
4639         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4640         mark entry and exit, that are not part of the SCoP and update HTML
4641         formatting.
4642
4643 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
4644
4645         * graphite.c (basic_block_simple_for_scop_p): Renamed
4646         harmful_stmt_in_bb.
4647         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4648         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4649         (all_preds_visited_p, all_succs_visited_p,
4650         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4651         scop_end_loop): New.
4652         (build_scops): Do not use dfs_enumerate_from.
4653
4654         * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4655
4656 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
4657
4658         * graphite.c: Add comments to functions that are missing a
4659         description.
4660         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
4661
4662 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
4663
4664         * graphite.c (nb_params_in_scop): Moved...
4665         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4666         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4667         (clast_to_gcc_expression): Reduce column size to less than 80.
4668         (graphite_create_iv): Return the new name of the IV.
4669         (find_transform): Set options->esp and options->cpp.
4670         (gloog): Comment out the invalidation of the old loop code.
4671         (initialize_dependence_polyhedron): Replace scop_nb_params with
4672         nb_params_in_scop.
4673
4674         * graphite.h (nb_params_in_scop): ... here.
4675         (scop_nb_params): Removed.
4676         (loop_domain_dim): Return something even when the loop was not
4677         found in the hash table: avoid ICEing on all the graphite.exp
4678         testcases.
4679
4680 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4681
4682         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4683
4684         * graphite.c (build_scop_dynamic_schedules): Schedule is built
4685         according to nesting level.
4686         (find_scop_parameters): Call instantiate_parameters.
4687         (scan_tree_for_params): Extend it to handle general affine bounds.
4688         Inner loop bound can depend on outer loop induction variable.
4689         (setup_cloog_loop): tmp variable is allocated on stack. Call
4690         instantiate_parameters with respect to outermost_loop_in_scop.
4691         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4692         graphite.h.
4693         (create_empty_loop): Function loopify should be given edge
4694         probability, instead of edge frequency. Dominance relation from
4695         switch_bb to loop_header.
4696         (clast_to_gcc_expression): Added handling of clast_reduction node.
4697         (gloog): New functionality for removing old loop.
4698         (test_dependence): Factored out from build_rdg_all_levels.
4699         (build_rdg_all_levels): Dependence testing factored out to
4700         test_dependence function.
4701
4702         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4703         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4704         from graphite.c
4705
4706 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
4707
4708         * graphite.c (free_scop, param_index, initialize_cloog_names,
4709         nb_params_in_scop): Use name_tree map instead of just a tree
4710         for keeping track of the variable name associated to that tree.
4711         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4712         clast_to_gcc_expression, graphite_create_iv,
4713         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4714         graphite_stmt_to_gcc_stmt): New.
4715         (gloog): Call these.
4716         * graphite.h (struct name_tree): New.
4717         (struct scop): Use name_tree instead of tree for params.
4718         Store a vector of name_tree for new_ivs.
4719         (SCOP_NEWIVS): New.
4720         (scop_nb_params): Use name_tree instead of tree.
4721
4722 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
4723             Sebastian Pop  <sebastian.pop@amd.com>
4724
4725         * tree-bounds.c: New.
4726         * tree-bounds.h: New.
4727         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4728         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4729         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4730         flag_mudflap.
4731         * gcc.c: Same.
4732         * toplev.c: Same.
4733         * c-cppbuiltin.c: Same.
4734         * c-pragma.c: Same.
4735         * common.opt: Same.
4736         * varasm.c: Same.
4737         * tree-outof-ssa.c: Same.
4738         * c-common.c: Same.
4739         * Makefile.in: Same.
4740
4741 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
4742             Sebastian Pop  <sebastian.pop@amd.com>
4743
4744         * tree-loop-distribution.c (remaining_stmts,
4745         upstream_mem_writes): Removed static variables.
4746         (copy_loop_before, create_bb_after_loop,
4747         mark_nodes_having_upstream_mem_writes, free_rdg_components,
4748         rdg_build_components, rdg_build_partitions,
4749         dump_rdg_partitions): Extern.
4750         (generate_loops_for_partition, generate_code_for_partition): Do not
4751         return a bool.
4752         (already_processed_vertex_p, predecessor_has_mem_write,
4753         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4754         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4755         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4756         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4757         Pass remaining_stmts and upstream_mem_writes as parameters.
4758         (rdg_component): Moved...
4759         (build_rdg_partition_for_component): Do not aggregate components when
4760         flag_streamize_loops is set.
4761         (gen_sequential_loops): New.
4762         (ldist_gen): Call gen_sequential_loops.
4763
4764         * tree-pass.h (pass_loop_streamization): Declared.
4765
4766         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4767         basic blocks when loops structures exist.
4768
4769         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4770
4771         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4772
4773         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4774         eliminate_local_variables_stmt, eliminate_local_variables,
4775         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4776         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4777         of code delimited by two edges in the CFG.
4778         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4779         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4780         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
4781         the case of parallelisation of reductions.
4782         (create_loop_fn): Extern.
4783         (create_omp_parallel_region): New.
4784
4785         * tree-data-ref.c (dump_data_dependence_relation): Don't call
4786         dump_data_reference for printing dra and drb.
4787         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4788         RDGE_RELATION.
4789         (build_rdg): Don't call free_dependence_relations for the moment, as
4790         we attach dependence relations on each edge of the RDG.
4791         To be fixed later.
4792
4793         * tree-data-ref.h (rdg_component): ...here.
4794         (struct rdg_edge): New field ddr_p relation.
4795         (RDGE_RELATION): New.
4796         (create_bb_after_loop, copy_loop_before,
4797         mark_nodes_having_upstream_mem_writes, rdg_build_components,
4798         rdg_build_partitions, dump_rdg_partitions,
4799         free_rdg_components): Declared.
4800
4801         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4802         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4803
4804         * tree-loop-streamization.c: New.
4805
4806         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4807         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4808
4809         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4810
4811         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4812
4813         * passes.c: Schedule pass_loop_streamization.
4814
4815 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
4816
4817         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4818         update comment.
4819
4820 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4821
4822         * graphite.c (dot_all_scops): Update formatting.
4823         Bbs can now be part of more than one SCoP.
4824
4825 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
4826
4827         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4828         malloc problems.
4829         (loop_domain_dim): Check for unregistered toplev SCOP loop.
4830         * graphite.h (loop_to_cloog_loop): New.
4831
4832 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4833
4834         * graphite.c (loop_domain_dim, ref_nb_loops,
4835         loop_iteration_vector_dim): New.
4836         (build_access_matrix_with_af, build_access_matrix,
4837         initialize_dependence_polyhedron): Fixed for new matrix layout.
4838         No longer assume that all iteration domains are of the same
4839         dimensionality.
4840
4841 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
4842
4843         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4844         defined in a loop at depth 0 is invariant.
4845         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4846         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4847         be called at loop depth 0.
4848
4849         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4850         a parameter.
4851         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4852         (down_open_scop): Removed.
4853         (loop_in_scop_p): Redefined.
4854         (scop_affine_expr): New argument: scop.
4855         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
4856         a harmful statement ending a scop.
4857         (basic_block_simple_for_scop_p): New argument: scop.
4858         (get_loop_start): Removed.
4859         (new_scop): Initialize SCOP_LOOPS.
4860         (free_scop): Free SCOP_LOOPS.
4861         (succs_at_same_depth, preds_at_same_depth): New.
4862         (end_scop): Test the validity of a scop.
4863         (add_dominators_to_open_scops): New.
4864         (test_for_scop_bound): Call add_dominators_to_open_scops.
4865         Add cases for opening and closing multiple scops.
4866         (build_scops, build_scop_bbs): Iterate over basic blocks in
4867         depth first order.
4868         (build_graphite_bb): Pass scop directly.
4869         (dfs_bb_in_scop_p): New.
4870         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4871         several times.
4872         (nb_loops_around_gb): Use loop_in_scop_p.
4873         (schedule_to_scattering): Disabled for the moment the code computing
4874         the "textual order for outer loop".
4875
4876         * graphite.h (struct scop): New field loops.
4877         (SCOP_LOOPS): New.
4878         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4879
4880         * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4881
4882 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
4883             Sebastian Pop  <sebastian.pop@amd.com>
4884
4885         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4886         * common.opt (fstreamize-loops): New.
4887         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4888         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4889         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4890         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4891
4892 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4893
4894         * tree-data-ref.c (build_empty_rdg): New.
4895         (build_rdg): Use it.
4896         * tree-data-ref.h (build_empty_rdg): Declared.
4897         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4898         (find_vertex_for_stmt): Removed.
4899         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4900
4901 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
4902
4903         * tree-loop-distribution.c (generate_builtin): After cancelling the
4904         loop tree, also delete basic blocks.
4905         (rdg_flag_uses): Stop recursion when a vertex has already been
4906         processed.
4907
4908 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4909
4910         * graphite.c (build_scop_alpha): Removed.
4911         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4912         and dump_dependence_graph to avoid compiler warnings.
4913
4914 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4915
4916         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4917         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4918         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4919         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4920         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4921         (initialize_dependence_polyhedron, find_vertex_for_stmt,
4922         initialize_data_dependence_polyhedron, is_empty_polyhedron,
4923         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4924         dump_dependence_graph): New.
4925         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4926         (GBB_ALPHA): New.
4927         (struct scop): New field loop2cloog_loop.
4928         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4929         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4930
4931 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4932
4933         * graphite.c (build_graphite_bb): Fix initialization
4934         of the graphite basic block.
4935
4936 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
4937
4938         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4939         loop domain matrix.  Pass in the number of loops contained in the
4940         constraint matrix.
4941         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4942         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4943         loops that are not surrounding the current loop are not represented
4944         in the domain constraint matrix.
4945         (build_scop_iteration_domain): Initial domain constraint matrix
4946         contains only the eq/ineq, cst, and scop parameters columns.
4947
4948 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4949
4950         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4951         (print_graphite_bb): Print scattering.
4952
4953 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4954
4955         * graphite.c (initialize_cloog_names): Initialize names of
4956         scattering variables.
4957
4958 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4959
4960         * graphite.c (dot_all_scops_1): Disable debug output while
4961         printing graph.
4962
4963 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4964
4965         * graphite.c (find_transform): Change cloog output language to C.
4966
4967 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
4968
4969         * tree-loop-distribution.c (generate_memset_zero,
4970         generate_builtin, generate_code_for_partition,
4971         rdg_flag_all_uses): New.
4972         (rdg_flag_uses): Gather in the same partition the statements defining
4973         the VUSES of the current statement.
4974         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4975         Gather in the same partition not only the stores to the same memory
4976         access, but also the reads.
4977         (ldist_generate_loops): Renamed ldist_gen.
4978
4979 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
4980             Tobias Grosser  <grosser@fmi.uni-passau.de>
4981
4982         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4983         next pointer, don't use the inner pointer.
4984
4985 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
4986
4987         * graphite.c (dot_all_scops, dot_all_scops_1): New.
4988         (find_transform): Call dot_all_1.
4989         * graphite.h (dot_all_scops): Declared.
4990
4991 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
4992
4993         * tree-loop-distribution.c: Fix apsi.f ICE.
4994         (create_bb_after_loop): New.
4995         (generate_loops_for_partition): Use it.
4996         * testsuite/gfortran.dg/ldist-1.f90: New.
4997
4998         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
4999         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5000
5001 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5002
5003         * graphite.c (find_transform): Dump cloog program sent to cloog.
5004
5005 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5006
5007         * graphite.c (initialize_cloog_names): Initialize cloog
5008         iterator names.
5009
5010 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5011
5012         * graphite.c (build_scop_context): Fix typo, for the matrix
5013         format: insert '0 >= 0' instead of '-1 >= 0'.
5014
5015 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
5016
5017         * Fix merge problems.
5018
5019 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
5020
5021         * graphite.c (setup_cloog_loop): Fix typo.
5022
5023 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5024
5025         * doc/invoke.texi (-ftree-loop-distribution): Documented.
5026         * tree-loop-distribution.c: Reimplemented.
5027         * tree-pass.h (pass_loop_distribution): New.
5028         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5029         print_loops.
5030         * graphds.h (struct graph): New field indexes.
5031         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5032
5033         * tree-vect-analyze.c: Remove declaration of static functions when not
5034         needed.
5035         * tree-vectorizer.c: Same.
5036         (rename_variables_in_loop): Now extern.
5037         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5038         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
5039         calling redirect_edge_and_branch_force.
5040
5041         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5042
5043         * tree-data-ref.c: Don't include tree-chrec.h.
5044         (debug_data_dependence_relations): New.
5045         (dump_data_dependence_relation): Call dump_data_reference on data refs
5046         in the relation.
5047         (same_access_functions): Moved...
5048         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5049         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5050         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5051         struct rdg_vertex_info, ): New.
5052         (create_rdg_edge_for_ddr): Compute the dependence level before looking
5053         at DDR_REVERSED_P.
5054         (create_rdg_vertices): Initialize the htab of graph->indexes.
5055         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5056         (stmts_from_loop): Don't save LABEL_EXPR.
5057         (hash_stmt_vertex_info, eq_stmt_vertex_info,
5058         hash_stmt_vertex_del): New.
5059         (build_rdg): Initialize rdg->indexes.
5060         (free_rdg, stores_from_loop, ref_base_address,
5061         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5062         have_similar_memory_accesses_1, ref_base_address_1,
5063         remove_similar_memory_refs): New.
5064
5065         * tree-data-ref.h: Include tree-chrec.h.
5066         (debug_data_dependence_relations): Declared.
5067         (same_access_functions): ...here.  Now static inline.
5068         (ddr_is_anti_dependent, ddrs_have_anti_deps,
5069         ddr_dependence_level): New.
5070         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5071         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5072         RDG_MEM_READS_STMT): New.
5073         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5074         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5075         rdg_vertex_for_stmt): Declared.
5076         (struct rdg_edge): New field level.
5077         (RDGE_LEVEL, free_rdg): New.
5078         (stores_from_loop, remove_similar_memory_refs,
5079         rdg_defs_used_in_other_loops_p,
5080         have_similar_memory_accesses): Declared.
5081         (rdg_has_similar_memory_accesses): New.
5082
5083         * lambda.h (dependence_level): New.
5084         * common.opt (ftree-loop-distribution): New.
5085         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5086         (print_loop_ir): Renamed print_loops.
5087         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5088         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5089         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5090         (tree-loop-distribution.o): Added.
5091         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5092         (mark_virtual_ops_in_bb): New.
5093         (print_loops_bb, debug_loop_num, debug_loop): New.
5094         * passes.c: Scheduled pass_loop_distribution.
5095
5096 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5097
5098         * graphite.c (scan_tree_for_params): Correct the number of columns
5099         for polylib format.
5100         (nb_flat_iterator): New.
5101         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5102         (build_scop_iteration_domain): Correct the number of columns for
5103         polylib format.
5104
5105 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5106
5107         * Merge from mainline (129697:130800).
5108
5109 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
5110
5111         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5112         dominated by SCoP's exit.
5113         (graphite_transform_loops): Compute post dominators.
5114
5115 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
5116
5117         * Merge from mainline (127169:129697).
5118
5119 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
5120
5121         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
5122         parameter for the basic block that contains the expression.  Use
5123         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5124         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5125         the expression.
5126         * graphite.h (gbb_loop): New.
5127         (GBB_LOOP): Removed.
5128
5129 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5130
5131         * Makefile.in: Fix merge problem.
5132
5133 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5134
5135         * Merge from mainline (125309:127169).
5136         * tree-loop-distribution.c: Disabled.
5137
5138 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
5139
5140         * Merge from mainline (r123693:125309).
5141
5142 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
5143
5144         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5145         correct_modify_p
5146         (correct_modify_p, check_statements, number_of_lvalue_uses,
5147         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5148         instead of MODIFY_EXPR.
5149         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
5150         and push new edges.
5151
5152 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
5153
5154         * tree-loop-distribution.c (struct rdg): Replace arrays by
5155         VECs for edges and vertices.
5156         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5157         (RDGV_NB_PARTITIONS): New.
5158         (PRDG_NBV, PRDG_NBE): Removed.
5159         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5160         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5161         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5162
5163 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
5164             Sebastian Pop  <sebpop@gmail.com>
5165
5166         * doc/invoke.texi (-ftree-loop-distribution): Document.
5167         * tree-loop-distribution.c: New file.
5168         * tree-pass.h (pass_loop_distribution): Declared.
5169         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5170         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5171         and set reversed_p.
5172         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5173         (DDR_REVERSED_P): New.
5174         * common.opt (-ftree-loop-distribution): New.
5175         * tree-flow.h (distribute_loops): Declared.
5176         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5177         * passes.c (init_optimization_passes): Schedule loop distribution.
5178
5179 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
5180
5181         * graphite.c (print_graphite_bb): Don't call dump_data_references.
5182         (print_scop): Don't print when scop is NULL.
5183         (build_scop_context, find_transform): Don't output to stderr.
5184
5185 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
5186
5187         * tree-data-ref.c: Don't include graphite.h.
5188         Comment out the code for printing data reference's scop.
5189         (build_access_matrix_with_af): Moved...
5190         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5191         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
5192         (print_graphite_bb): Print basic block's schedule.
5193         (print_scop): Don't print the schedule, call cloog's pretty printer.
5194         (bb_in_scop_p): A basic block is in a scop only if it is both
5195         dominated and postdominated by the scop's entry and exit basic blocks.
5196         (function_parameter_p): New.
5197         (invariant_in_scop_p): Use function_parameter_p.
5198         (new_scop, save_scop): New.
5199         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5200         save_scop.
5201         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5202         (loop_in_scop_p): New.
5203         (scop_record_loop): Use loop_in_scop_p.
5204         (build_scop_domain): Renamed build_scop_iteration_domain.
5205         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5206         nb_params_in_scop, build_scop_context, first_loop_in_scop,
5207         setup_cloog_loop, dot_scop_1, dot_scop): New.
5208         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5209         (struct scop): Add a pointer to cloog's representation of a program.
5210
5211 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5212
5213         * doc/invoke.texi (-ftree-check-verbose): Renamed
5214         -ftree-checks-verbose.
5215         * common.opt (flag_tree_check_verbose): Renamed
5216         flag_tree_checks_verbose.
5217         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5218
5219 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5220
5221         * configure: Regenerated.
5222         * config.in: Regenerated.
5223         * tree-ssa-loop.c (graphite_transforms): Execute
5224         graphite_transform_loops only when HAVE_cloog.
5225         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5226         * graphite.c: Include polylibgmp.h and cloog.h.
5227         (graphite_transform_loops): Removed loops parameter.
5228         * tree-flow.h (graphite_transform_loops): Update declaration.
5229         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5230         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5231         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5232         (OBJS-common): Remove dependence on graphite.o.
5233         (BACKEND): Depend on @GRAPHITE@.
5234
5235 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
5236
5237         * doc/invoke.texi (-ftree-check-verbose): Documented.
5238         * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5239         * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5240         * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5241         * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5242         * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5243         * testsuite/gcc.dg/tree-checker/condates.crp: New.
5244         * common.opt (ftree-checks-verbose): New.
5245         * tree-check.c (tree_check_warning): Move extra stderr output
5246         under control of flag_tree_check_verbose.
5247
5248 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
5249
5250         * tree-match.c: Fix comments formatting.
5251         * tree-match.h: Fix comments formatting.
5252         * tree-check.c: Fix comments formatting.
5253         (tree_check_init): Restructure.
5254
5255 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
5256
5257         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5258
5259 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
5260
5261         * Merge from mainline (r120733:123693).
5262
5263 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
5264
5265         * condate.y: New file.
5266         * tree-match.h (struct patt_info_s): New field sign.
5267         (struct condate_s): New field msg.
5268         (normalize_condate, name_condate, add_condate): New.
5269         (conds[], condate_parse): Made extern.
5270         * tree-check.c (tree_check_warning): First arg changed to cond;
5271         warning reformatted.
5272         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5273         (tree_scan): New.
5274         (tree_check): Process trivial condates.
5275         (read_delimited_string): Removed.
5276         (print_cond): Print name and msg.
5277         (conds[]): Made extern.
5278         (parse_tree_check_file_once): Rewritten to use the parser in
5279         condate.y.
5280         Processing of option --tree_check_string moved to tree_scan().
5281         * Makefile.in: Added condate.y
5282
5283 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
5284
5285         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5286         Use VECs instead of varrays.
5287         * diagnostic.h (lazy_dump_generic_node): Update declaration.
5288         * Makefile.in (pretty-print.o): Depend on vec.h.
5289         * pretty-print.c: Include tree.h and vec.h.
5290         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5291         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5292         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5293         pp_free_list): Use VECs instead of varrays.
5294         * pretty-print.h: Do not include varray.h.
5295         (struct tree_chunk_s): Declaration moved before its use.
5296         (output_buffer): Rename varray field to chunks.
5297         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5298         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5299         save_global_holes): Use VECs instead of varrays.
5300         * tree-match.h: Declare VECs of cfg_node, and hole_p.
5301         * tree-check.c (scan_cfg_stmts, push_node,
5302         print_matching_stmt): Removed.
5303         (tree_check_instance, push_global_holes_if_new, tree_check,
5304         execute_tree_check): Use VECs instead of varrays.
5305         (gate_tree_check): Don't execute the CFG check when basic_block_info
5306         is not available.
5307
5308 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5309
5310         * Merge from mainline (r115016:120733).
5311
5312 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5313
5314         * Merge from mainline (r117632:117661).
5315
5316 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5317
5318         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5319         * tree-pass.h (TDF_DEBUG, debug_p): New.
5320         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5321         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5322         get_loop_exit_condition, analyze_evolution_in_loop,
5323         analyze_initial_condition, analyze_scalar_evolution,
5324         instantiate_parameters, number_of_latch_executions): Use debug_p.
5325         * tree-chrec.c (chrec_apply): Use debug_p.
5326         * tree-data-ref.c: Include graphite.h.
5327         (dump_data_reference): Print also the access matrix.
5328         (analyze_array, analyze_indirect_ref, init_data_ref,
5329         analyze_offset_expr, address_analysis, object_analysis,
5330         create_data_ref, finalize_ddr_dependent,
5331         non_affine_dependence_relation, analyze_ziv_subscript,
5332         analyze_siv_subscript_cst_affine,
5333         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5334         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5335         analyze_miv_subscript, analyze_overlapping_iterations,
5336         build_classic_dist_vector, subscript_dependence_tester,
5337         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5338         (build_access_matrix_with_af): No longer static.
5339         * tree-data-ref.h (scop_p): ... declaration here.
5340         (data_reference.scop): New field.
5341         (DR_SCOP, DR_ACCESS_MATRIX): New.
5342         (build_access_matrix_with_af, dr_num_subscripts): Declared.
5343         * graphite.c (print_graphite_bb): Call dump_data_references.
5344         (print_scop): Use scop_nb_loops and scop_dim_domain.
5345         (test_for_scop_bound): Use debug_p.
5346         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5347         scop_nb_params.
5348         (scop_loop_index): Moved...
5349         (scop_record_loop): New.
5350         (build_scop_loop_nests): Use scop_record_loop.
5351         (build_scop_domain): Use scop_dim_domain.
5352         (build_access_matrix): Implemented.
5353         (build_scop_canonical_schedules): Use scop_nb_loops.
5354         (build_graphite_bb): Initialize GBB_SCOP.
5355         * graphite.h (scop_p): Moved...
5356         (graphite_bb.scop): New field.
5357         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5358         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5359         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5360         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5361         scop_loop_index): New.
5362         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5363
5364 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
5365
5366         * Merge from mainline (r117661:120450).
5367
5368 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
5369
5370         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5371         at the first declaration outside the varying loop, instantiate as
5372         far as possible.
5373         * tree-chrec.c (for_each_scev_op): New.
5374         * tree-chrec.h (for_each_scev_op): Declared.
5375         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5376         * tree-data-ref.c (get_references_in_stmt,
5377         find_data_references_in_stmt): New, from trunk.
5378         (find_data_references_in_loop): Use get_references_in_stmt
5379         and find_data_references_in_loop, modified as in trunk.
5380         (build_access_matrix_with_af): New.
5381         * tree-data-ref.h (data_reference): Add a field access_matrix.
5382         (data_ref_loc): New, as in trunk.
5383         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5384         invariant_in_scop_p, param_index, scan_tree_for_params,
5385         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5386         idx_record_param, idx_record_params, build_access_matrix,
5387         build_scop_data_accesses, build_scop_canonical_schedules,
5388         build_graphite_bb, build_scop_bbs, find_params_in_bb,
5389         build_scop_params): New.
5390         * graphite.h (graphite_bb): New.
5391         (scop): Add fields static_schedule, params, loop_nest,
5392         iteration_domain.
5393         * lambda.h: Declare vecs of lambda_matrix.
5394         * tree-flow.h (print_loop_ir_bb): Declared.
5395         * tree-cfg.c (print_loop_ir_bb): New.
5396         (print_loop): Use print_loop_ir_bb.
5397
5398 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
5399
5400         * Merge from mainline (r115016:117632).
5401
5402 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
5403
5404         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5405         break due to a warning.
5406
5407 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
5408
5409         * graphite.c (print_scops, debug_scops): New.
5410         (graphite_transform): Renamed graphite_find_transform.
5411         * graphite.h (debug_scops): Declared.
5412
5413 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
5414
5415         * tree-match.c: Reformat following the GNU style.
5416         * tree-match.h: Reformat following the GNU style.
5417         * tree-pattern.h: Removed empty file.
5418         * Makefile.in: Remove references to tree-pattern.h.
5419         * tree-check.c: Reformat following the GNU style.
5420         (execute_tree_check): Move gate condition code to...
5421         (gate_tree_check): ...here.  New function.
5422         (pass_check): Use the gate function.
5423
5424 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
5425
5426         * tree-pattern.h: New. Tree pattern matching and checking using
5427         concrete syntax.
5428         * tree-check.c: New. Tree/CFG checking pass.
5429         * tree-match.c: New. Library for tree pattern matching.
5430         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5431         * toplev.c, flags.h: Add globals for tree-check pass.
5432         * Makefile.in: Integrate the files in tree-check pass.
5433         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5434         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5435         Introduce a "lazy" pretty-print mode.
5436         * tree.c, tree.h: Add tree_name.
5437
5438 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
5439
5440         * doc/invoke.texi (-fgraphite): Correct typo.
5441         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5442         use of print_loop_ir.
5443         * testsuite/gcc.dg/graphite/scop-1.c: New.
5444         * testsuite/gcc.dg/graphite/scop-2.c: New.
5445         * testsuite/gcc.dg/graphite/graphite.exp: New.
5446         * graphite.c: Include domwalk.h.
5447         (print_scop): Print only the entry and exit blocks.
5448         (debug_scop): No longer static.
5449         (affine_expr): Fix formating.  Return also true when the expression is
5450         constant.
5451         (stmt_simple_for_scop_p): Fix formating.
5452         (build_scops): Use domwalk.
5453         (get_loop_start, end_scop, test_for_scop_bound): New.
5454         (graphite_transform_loops): Avoid printing on stderr.
5455         * graphite.h (debug_scop): Declared.
5456         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5457         * Makefile.in (graphite.o): Depend on domwalk.h.
5458         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5459         declarations for static functions.
5460         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5461         controlling output verbosity.
5462
5463 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
5464             Plesco Alexandru  <shurikx@gmail.com>
5465
5466         * doc/invoke.texi (-fgraphite): Document.
5467         * tree-pass.h (pass_graphite_transforms): Declared.
5468         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5469         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5470         (pass_graphite_transforms): Defined.
5471         * tree-data-ref.c (free_data_ref, data_reference): Extern.
5472         * tree-data-ref.h (free_data_ref, data_reference): Declared.
5473         * graphite.c, graphite.h: New.
5474         * common.opt (fgraphite): Declared.
5475         * tree-flow.h (graphite_transform_loops): Declared.
5476         * Makefile.in (OBJS-common): Add graphite.o.
5477         (graphite.o): New rule.
5478         * passes.c (pass_graphite_transforms): Scheduled.
5479