OSDN Git Service

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