OSDN Git Service

2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
[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_assign): New.
4         Do not call analyze_scalar_evolution on assignments.
5         (instantiate_scev_phi): Call analyze_scalar_evolution.
6         (instantiate_scev_name): Call instantiate_scev_assign and
7         instantiate_scev_phi.
8         (instantiate_scev_not): Adapted to pass as parameters the operands
9         of the not expression.
10
11 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
12
13         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
14         to pass as parameters the operands of the binary expression.
15
16 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
17
18         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
19         instantiate_scev_not.  Handle NEGATE_EXPR.
20         (instantiate_scev_r): Handle NEGATE_EXPR.
21
22 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
23
24         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
25         instantiate_scev_r.
26         (instantiate_scev_r): Move code in instantiate_scev_2
27         and instantiate_scev_1.
28
29 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
30
31         * tree-scalar-evolution.c (instantiate_scev_3): New.
32         (instantiate_scev_1): Move code in instantiate_scev_3.
33
34 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
35
36         * tree-scalar-evolution.c (instantiate_scev_poly): New.
37         (instantiate_scev_1): Move code in instantiate_scev_poly.
38
39 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
40
41         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
42         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
43
44 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
45
46         * tree-scalar-evolution.c (instantiate_scev_convert): New.
47         (instantiate_scev_1): Move code in instantiate_scev_convert.
48
49 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
50
51         * tree-scalar-evolution.c (instantiate_scev_binary): New.
52         (instantiate_scev_1): Move code in instantiate_scev_binary.
53
54 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
55
56         * tree-scalar-evolution.c (instantiate_scev_name): New.
57         (instantiate_scev_1): Move code in instantiate_scev_name.
58
59 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
60
61         * Merge from mainline (150992:151171).
62
63 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
64
65         * graphite-dependences.c (graphite_legal_transform_bb): Call
66         pbb_remove_duplicate_pdrs.
67         * graphite-poly.c (can_collapse_pdr): Removed.
68         (pdr_find_duplicate): Removed.
69         (can_collapse_pdrs): New.
70         (pbb_remove_duplicate_pdrs): New.
71         (new_poly_dr): Do not look for duplicates.
72         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
73         (PBB_PDR_DUPLICATES_REMOVED): New.
74         (pbb_remove_duplicate_pdrs): Declared.
75
76 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
77
78         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
79         the strides by multiplying by PDR_NB_REFS.
80         * graphite-poly.c (can_collapse_pdr): New.
81         (pdr_find_duplicate): New.
82         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
83         Initialize PDR_NB_REFS.
84         * graphite-poly.h (struct poly_dr): Add field nb_refs.
85         (PDR_NB_REFS): New.
86         (new_poly_dr): Number of subscripts is a graphite_dim_t.
87
88 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
89
90         Revert one of the previous commits:
91         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
92         the computation of symmetric data dependence relations.
93         (dependency_between_pbbs_p): Same.
94
95 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
96
97         PR middle-end/40965
98         * graphite-poly.c (apply_poly_transforms): Remove legality test before
99         any transform.
100
101 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
102
103         * graphite-dependences.c (pddr_original_scattering): Return NULL
104         for read-read dependence relations.
105         * graphite-poly.h (enum poly_dr_type): Fix comment.
106         (pdr_read_p): New.
107         (pdr_write_p): New.
108         (pdr_may_write_p): New.
109
110 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
111
112         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
113         (struct poly_dr): Same.
114         (new_poly_dr): Same.
115         * graphite-poly.c (new_poly_dr): Same.
116
117 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
118             Sebastian Pop  <sebastian.pop@amd.com>
119
120         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
121         pbb_strip_mine_time_depth.  Changed the implementation so that
122         transformation is expressed as a transformation on
123         time (scatttering) dimensions.  Also, ensures that the 2d+1
124         scheduling format is preserved.
125         (pbb_strip_mine_profitable_p): Profitability is based on the
126         iteration number of a given time (scattering) dimension,
127         and not on a original loop depth dimension.
128         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
129         (pbb_do_strip_mine): Call psct_dynamic_dim.
130         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
131         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
132         (pbb_nb_dynamic_scattering_transform): New.
133         (psct_dynamic_dim): New.
134
135 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
136
137         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
138         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
139         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
140         * graphite-interchange.c (build_linearized_memory_access): Same.
141         (memory_stride_in_loop): Same.
142
143 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
144
145         * graphite-dependences.c (pddr_original_scattering): New.
146         (graphite_legal_transform_dr): Call pddr_original_scattering.
147         (dot_deps_1): New.
148         (dot_deps): New.
149         * graphite-dependences.h (dot_deps): Declared.
150         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
151         (print_pdr): Print PDR_ID.
152         * graphite-poly.h (struct poly_dr): Add field id.
153         (PDR_ID): New.
154         (pbb_index): New.
155         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
156
157 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
158
159         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
160         not delete the original dependence relation.
161
162 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
163
164         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
165         the computation of symmetric data dependence relations.
166         (dependency_between_pbbs_p): Same.
167
168 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
169
170         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
171         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
172         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
173         (free_poly_ddr): New.
174         (pddr_is_empty): New.
175         (dependence_polyhedron_1): Now returns a poly_ddr_p.
176         (dependence_polyhedron): Same.  Remove useless gcc_assert.
177         Remove fprintfs.
178         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
179         (graphite_carried_dependence_level_k): Call pddr_is_empty.
180         * graphite-dependences.h (enum poly_dependence_kind): New.
181         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
182         (PDRP_SOURCE): Renamed PDDR_SOURCE.
183         (PDRP_SINK): Renamed PDDR_SINK.
184         (PDRP_DDP): Renamed PDDR_DDP.
185         (PDDR_KIND): New.
186         (free_poly_ddr): Declared.
187         * graphite-poly.c (new_scop): Use the new hash function names.
188         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
189         into original_pddrs.
190         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
191
192 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
193
194         * Merge from mainline (150764:150992).
195
196 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
197
198         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
199         bounds with LT_EXPR to make niter analysis more precise on code
200         generated by Graphite.
201
202 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
203
204         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
205         (graphite_legal_transform_bb): Same.
206         (poly_drs_may_alias_p): Same.
207
208 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
209
210         PR middle-end/40981
211         * graphite-ppl.c (ppl_max_for_le): Correct the use of
212         ppl_Pointset_Powerset_C_Polyhedron_maximize.
213
214 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
215
216         * graphite-poly.c (print_pbb): Print PBB index.
217
218 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
219
220         * Merge from mainline (r150672:150764).
221
222 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
223
224         * graphite-interchange.c (ppl_max_for_le): Moved...
225         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
226         * graphite-ppl.c (ppl_max_for_le): ... here.
227         * graphite-ppl.h (ppl_max_for_le): Declared.
228
229 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
230
231         * Merge from mainline (r150372:150672).
232
233 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
234
235         PR middle-end/40980
236         * sese.c (convert_for_phi_arg): New.
237         (add_guard_exit_phis): Use convert_for_phi_arg.
238
239         * testsuite/gfortran.dg/graphite/id-17.f: New.
240
241 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
242
243         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
244         unknown subscript upper bounds.
245
246         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
247
248 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
249             Pranav Garg  <pranav.garg2107@gmail.com>
250
251         * graphite-interchange.c (gather_access_strides): Removed.
252         (ppl_max_for_le): New.
253         (build_linearized_memory_access): New.
254         (memory_stride_in_loop): New.
255         (pbb_interchange_profitable_p): Reimplemented.
256         * graphite-ppl.h (ppl_new_id_map): New.
257         (ppl_interchange): New.
258
259         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
260
261 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
262
263         * graphite-interchange.c (compute_subscript): Removed.
264         (compute_array_size_cstr): Removed.
265         (compute_array_size_poly): Removed.
266         (compute_array_size): Removed.
267         (gather_access_strides_poly): Removed.
268         (gather_access_strides): Empty.
269
270 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
271
272         * graphite-dependences.c (dependence_polyhedron_1): Replace
273         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
274         (graphite_legal_transform_dr): Same.
275         (graphite_carried_dependence_level_k): Same.
276         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
277         Initialize PDR_NB_SUBSCRIPTS.
278         (print_pdr_access_layout): Replace pdr_nb_subscripts with
279         PDR_NB_SUBSCRIPTS.
280         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
281         (PDR_NB_SUBSCRIPTS): New.
282         (pdr_nb_subscripts): Removed.
283         (pdr_dim): Simplified.
284         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
285         with PDR_NB_SUBSCRIPTS.
286
287 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
288
289         * graphite-interchange.c (compute_array_size): Remove use of
290         PDR_DATA_CONTAINER.
291         * graphite-poly.c (new_poly_dr): Remove argument data_container.
292         Do not initialize PDR_DATA_CONTAINER.
293         (print_pdr): Do not print PDR_DATA_CONTAINER.
294         * graphite-poly.h (struct poly_dr): Remove data_container field.
295         (PDR_DATA_CONTAINER): Removed.
296         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
297         PDR_DATA_CONTAINER.
298         (build_poly_dr): Same.
299
300 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
301
302         * testsuite/gcc.dg/graphite/interchange-9.c: New.
303
304 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
305             Sebastian Pop  <sebastian.pop@amd.com>
306
307         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
308         copy of the dependence polyhedron.  Free the temporary objects.
309         (graphite_carried_dependence_level_k): Free unused objects before
310         returning.
311
312         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
313         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
314         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
315         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
316         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
317
318 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
319
320         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
321         Early return without analyzing the data dependences if no
322         transform has been done.  Call restore_scattering if the transform
323         is not legal.
324         (graphite-interchange.c): Same.
325         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
326         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
327         (apply_poly_transforms): Do not gcc_assert that
328         the transform is legal.
329         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
330         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
331         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
332         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
333         * graphite-poly.h (struct poly_scattering): New.
334         (struct poly_bb): Add original, transformed, and saved fields.
335         Remove transformed_scattering, original_scattering, nb_local_variables,
336         and nb_scattering_transform fields.
337         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
338         (poly_scattering_new): New.
339         (poly_scattering_free): New.
340         (poly_scattering_copy): New.
341         (store_scattering_pbb): New.
342         (store_scattering): New.
343         (restore_scattering_pbb): New.
344         (restore_scattering): New.
345         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
346         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
347
348 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
349
350         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
351         (print_scop): Same.
352
353 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
354
355         * Makefile.in (graphite.o): Depends on PREDICT_H.
356         * graphite.c: Include predict.h.
357         (graphite_finalize): Call tree_estimate_probability.
358         * predict.c (predict_loops): Do not call scev_initialize and
359         scev_finalize.
360         (tree_estimate_probability_bb): New.
361         (tree_estimate_probability): Do not initialize loops: move that
362         code to the driver.  Call tree_estimate_probability_bb.
363         (tree_estimate_probability_driver): New.
364         (pass_profile): Use tree_estimate_probability_driver.
365         * predict.h (tree_estimate_probability): Declared.
366
367 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
368
369         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
370         * graphite-dependences.c (graphite_legal_transform): Add time to
371         TV_GRAPHITE_DATA_DEPS.
372         (dependency_between_pbbs_p): Same.
373         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
374
375 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
376
377         * Merge from mainline (r149952:150372).
378
379 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
380
381         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
382         * graphite-blocking.c: Same.
383         * graphite-clast-to-gimple.c: Same.
384         * graphite-dependences.c: Same.
385         * graphite-poly.c: Same.
386         * graphite-poly.h: Same.
387         * graphite-ppl.c: Same.
388         * graphite-scop-detection.c: Same.
389         * graphite-sese-to-poly.c: Same.
390         * graphite.c: Same.
391
392 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
393
394         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
395         (remove_simple_copy_phi): New.
396         (remove_invariant_phi): New.
397         (simple_copy_phi_p): New.
398         (reduction_phi_p): New.
399         (gsi_for_ssa_name_def): New.
400         (insert_out_of_ssa_copy): New.
401         (insert_out_of_ssa_copy_on_edge): New.
402         (create_zero_dim_array): New.
403         (scalar_close_phi_node_p): New.
404         (rewrite_close_phi_out_of_ssa): New.
405         (rewrite_phi_out_of_ssa): New.
406         (rewrite_reductions_out_of_ssa): New.
407         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
408
409         * testsuite/gcc.dg/graphite/id-11.c: New.
410         * testsuite/gcc.dg/graphite/id-15.c: New.
411         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
412         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
413         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
414         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
415         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
416         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
417         * testsuite/gfortran.dg/graphite/id-13.f: New.
418         * testsuite/gfortran.dg/graphite/id-5.f: New.
419
420 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
421
422         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
423         check that nb_reductions_in_loop is zero.
424         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
425         reduction phi nodes.
426         (nb_reductions_in_loop): Removed.
427         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
428         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
429         (bb_contains_non_iv_scalar_phi_nodes): Removed.
430         (scop_contains_non_iv_scalar_phi_nodes): Removed.
431         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
432
433 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
434
435         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
436         statements that have an empty iteration domain.
437         * testsuite/gfortran.dg/graphite/id-16.f: New.
438
439 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
440
441         * tree-scalar-evolution.c (instantiate_scev_1): Return
442         chrec_dont_know when the result is not above instantiate_below.
443         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
444         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
445         the tree has a known scalar evolution.
446         * testsuite/gfortran.dg/graphite/id-14.f: New.
447         * testsuite/gfortran.dg/graphite/id-15.f: New.
448
449 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
450
451         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
452         insert_gsi.
453         (rename_variables): Keep inserting renames after the ones already
454         inserted.
455
456 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
457
458         * graphite-sese-to-poly.c (compare_bb_depths): New.
459         (graphite_sort_dominated_info): New.
460         (build_scop_bbs_1): Call graphite_sort_dominated_info.
461         (build_scop_scattering): Fix comment.
462
463 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
464
465         * graphite.c (graphite_finalize): Call print_loops instead of
466         dump_function_to_file.
467         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
468         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
469         loops generated in the graphite output file.
470         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
471         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
472         * testsuite/gfortran.dg/graphite/id-12.f: New.
473
474 2009-07-24  Li Feng  <nemokingdom@gmail.com>
475
476         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
477         Remove 2 XFAIL.
478
479 2009-07-24  Li Feng  <nemokingdom@gmail.com>
480             Tobias Grosser  <grosser@fim.uni-passau.de>
481
482         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
483         alias set number build alias in ACCESSES polyhedron.
484         (build_alias_set_for_drs): New.
485         (build_pbb_drs): Added build_alias_set_for_drs.
486         * graphite-dependences.c (poly_drs_may_alias_p): New.
487         (graphite_carried_dependence_level_k): Check alias information
488         before building polyhedron.
489
490 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
491
492         * Makefile.in (lambda-code.o): Fix formatting.
493
494 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
495
496         * Merge from mainline (r149350-149952)
497
498 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
499
500         * graphite-poly.c (apply_poly_transforms): Move strip_mine
501         before interchange to prepare for loop blocking.
502
503 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
504
505         * graphite-poly.c (apply_poly_transforms): Add checks after every
506         transformation.
507         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
508         done in apply_poly_transforms.
509
510 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
511
512         * graphite-dependences.c (build_lexicographically_gt_constraint):
513         Replace RES parameter with *RES.
514         (dependence_polyhedron_1): Pass an address of the parameter RES
515         instead of value of RES.
516
517 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
518
519         * graphite.c (graphite_finalize): Fix comment.
520         (graphite_transform_loops): Reset scev info after code generation
521         of each scop.
522
523 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
524
525         * graphite.c (graphite_finalize): Call scev_reset.
526
527 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
528
529         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
530         GBB_CLOOG_IV_TYPES hash table twice.
531         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
532         (add_condition_to_domain): Clear GMP values.
533
534 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
535
536         * graphite-dependences.c: Fix formatting.
537         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
538         (pbb_number_of_iterations): Free ppl_Linear_Expression.
539         * graphite-sese-to-poly.c: Fix formatting.
540         * graphite.c (graphite_transform_loops): Create the hash table
541         after the early return.
542
543 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
544
545         * testsuite/gcc.dg/graphite/id-14.c: New.
546         * testsuite/gcc.dg/graphite/pr40157.c: New.
547         * testsuite/gfortran.dg/graphite/id-11.f: New.
548
549 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
550
551         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
552         (build_poly_scop): Return false when there are no pbbs within
553         loops to avoid to pass to cloog scops with no loops.
554
555 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
556
557         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
558         useless test "i % 2".
559         (build_pbb_scattering_polyhedrons): Fix formatting.
560         (build_poly_dr): Same.
561         * graphite.c (graphite_transform_loops): Restructure.
562
563 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
564
565         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
566         reduction_list parameter.
567         (rewrite_all_phi_nodes_with_iv): Same.
568         (canonicalize_loop_ivs): Same.
569         * tree-parloops.c (struct brli): Removed.
570         (build_reduction_list_info): Removed.
571         (build_new_reduction): New.
572         (analyze_reduction_list): Removed.
573         (gather_scalar_reductions): Find reductions instead of phi
574         nodes that can't be canonicalized.
575         (try_create_reduction_list): Remove reduction_list parameter.
576         (gen_parallel_loop): Same.
577         (parallelize_loops): Remove analyze_reductions variable,
578         initialization and free.
579         Change reduction_list htab initialization to reduction_info
580         elements instead of ssa names.
581         Call try_create_reduction_list and gen_parallel_loop without
582         analyzed_reduction argument.
583         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
584         canonicalize_loop_ivs with one less argument.
585         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
586
587 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
588
589         * graphite-dependences.c (new_poly_dr_pair): New.
590         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
591         (new_poly_dr_pair): New.
592         (eq_poly_dr_pair_p): New.
593         (hash_poly_dr_pair_p): New.
594         * graphite-dependences.h (struct poly_dr_pair): New.
595         (eq_poly_dr_pair_p): Declared.
596         (hash_poly_dr_pair_p): Declared.
597         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
598         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
599         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
600         * Makefile.in (graphite-poly.o): Add dependence on
601         graphite-dependences.h.
602
603 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
604
605         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
606         polynomials of degree > 1 pass to Graphite.
607         * tree-chrec.c (scev_is_linear_expression): Call
608         evolution_function_is_affine_multivariate_p.
609         * testsuite/gfortran.dg/graphite/id-10.f90: New.
610
611 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
612
613         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
614         Instantiate scevs varying in outer loops.
615         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
616
617 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
618
619         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
620         redundant constraint.
621
622 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
623
624         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
625         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
626         based on the file names as in the C testsuite.
627         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
628         * testsuite/gfortran.dg/graphite/block-2.f: Same.
629         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
630         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
631         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
632         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
633         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
634         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
635         * testsuite/gfortran.dg/graphite/id-6.f: Same.
636         * testsuite/gfortran.dg/graphite/id-9.f: Same.
637         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
638         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
639         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
640
641 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
642
643         * sese.c (expand_scalar_variables_call): New.
644         (expand_scalar_variables_ssa_name): Handle calls in expander.
645
646 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
647
648         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
649         Expect to see the pattern twice.
650         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
651         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
652         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
653
654 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
655
656         * testsuite/gcc.dg/graphite/id-10.c: New.
657         * testsuite/gcc.dg/graphite/id-12.c: New.
658         * testsuite/gfortran.dg/graphite/id-7.f: New.
659         * testsuite/gfortran.dg/graphite/id-8.f: New.
660
661 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
662
663         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
664         zero.
665
666 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
667
668         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
669
670 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
671
672         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
673
674 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
675
676         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
677         building PDR subscripts.
678
679 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
680
681         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
682         computation of array sizes.
683
684 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
685
686         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
687
688 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
689
690         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
691         build_pairwise_constraint, dr_equality_constraints,
692         build_pairwise_scheduling_equality,
693         build_pairwise_scheduling_inequality, lexicographically_gt_p,
694         build_lexicographically_gt_constraint, dependence_polyhedron,
695         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
696         Move from NNC_Polyhedron to C_Polyhedron.
697         * graphite-interchange.c (compute_array_size_poly,
698         gather_access_strides): Dito.
699         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
700         free_scop, pbb_number_of_iterations): Dito.
701         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
702         pbb_dim_iter_domain, struct scop): Dito.
703         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
704         new_Cloog_Domain_from_ppl_Polyhedron,
705         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
706         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
707         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
708         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
709         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
710         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
711         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
712         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
713         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
714         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
715         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
716         build_scop_iteration_domain, build_poly_dr): Dito
717
718 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
719
720         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
721         run-id-*.c files.
722         * testsuite/gcc.dg/graphite/run-id-1.c: New.
723
724 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
725
726         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
727         positivity constraint on the symbolic number of iterations.
728
729 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
730
731         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
732
733 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
734             Tobias Grosser  <grosser@fim.uni-passau.de>
735
736         * graphite-clast-to-gimple.c (build_scop_context): Removed.
737         (build_cloog_prog): Directly use SCOP_CONTEXT.
738         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
739         (free_scop): Free SCOP_CONTEXT.
740         (print_scop_context): New.
741         (print_scop): Call print_scop_context.
742         (debug_scop_context): New.
743         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
744         (struct scop): Added field context.
745         (SCOP_CONTEXT): New.
746         * graphite-sese-to-poly.c (add_param_constraints): New.
747         (build_scop_context): New.
748         (build_poly_scop): Call build_scop_context.
749
750 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
751
752         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
753         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
754         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
755         * graphite-ppl.h: Include double-int.h and tree.h.
756         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
757         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
758         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
759         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
760
761 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
762
763         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
764         POINTER_PLUS_EXPR for pointer types.
765         (clast_to_gcc_expression): Same.
766
767 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
768
769         * graphite-poly.c (print_scattering_function): Early return when
770         PBB_TRANSFORMED_SCATTERING is not initialized.
771         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
772
773 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
774
775         * tree-parloops.c (analyze_reduction_list): Remove unused variable
776         to fix bootstrap.
777
778 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
779
780         * tree-parloops.c (analyze_reduction_list): Change return
781         value to void.
782         (try_create_reduction_list): Move the call to
783         analyze_reduction_list to the beginining.
784         Call reduction_phi with analyzed_reductions as argument
785         instead of reduction_list.
786
787 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
788
789         *  Merge from mainline (r148296:149346)
790
791 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
792
793         * graphite-scop-detection.c (graphite_can_represent_init): New.
794         (graphite_can_represent_scev): Call graphite_can_represent_init:
795         check that the initial value does not contain multiplications of
796         parameters.
797         (stmt_has_simple_data_refs_p): New.
798         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
799         (is_simple_operand): Fix formatting.
800         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
801
802 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
803
804         * testsuite/gcc.dg/graphite/id-13.c: New.
805         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
806         analyze_scalar_evolution, use scalar_evolution_in_region.
807         (scan_tree_for_params_right_scev): Add extra assert.
808         (parameter_index_in_region_1): Split from parameter_index_in_region.
809         (idx_record_params): Use scalar_evolution_in_region.
810         (find_params_in_bb): Same.
811         (find_scop_parameters): Same.
812         (build_loop_iteration_domains): Same.
813         (create_linear_expr_from_tree): Same.
814         * sese.c (scalar_evolution_in_region): New.
815         * sese.h (scalar_evolution_in_region): Declared.
816         (defined_in_sese_p): New.
817         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
818         static anymore.
819         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
820         Declared.
821
822 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
823
824         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
825         TREE_DATA_REF_H also implies SCEV_H.
826
827 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
828
829         * graphite-poly.c (print_scop_params): New.
830         (print_scop): Call print_scop_params.
831         (debug_scop_params): New.
832         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
833
834 2009-07-07  Li Feng  <nemokingdom@gmail.com>
835
836         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
837         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
838         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
839         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
840         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
841         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
842
843 2009-07-07  Li Feng  <nemokingdom@gmail.com>
844
845         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
846         for dependency checking part.
847         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
848         tests for dependency checking.
849         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
850         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
851         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
852         flag -fdump-tree-graphite-all for autopar testsuites.
853
854 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
855
856         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
857         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
858         canonicalize_loop_ivs): Moved...
859         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
860
861 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
862
863         * tree-parloops.c (try_create_reduction_list): Pass an extra
864         argument analyzed_reductions.  Call analyze_reduction_list.
865         (gen_parallel_loop): Do not call analyze_reduction_list.
866         (parallelize_loops): Init and finalize analyzed_reductions.
867
868 2009-07-06  Li Feng  <nemokingdom@gmail.com>
869
870         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
871         Added flag -fno-loop-strip-mine for autopar testcase.
872
873 2009-07-04  Li Feng  <nemokingdom@gmail.com>
874
875         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
876         transformed scattering dimension instead of unmatch orignal when
877         calling dependence_polyhedron.
878
879 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
880
881         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
882
883 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
884
885         * graphite-poly.c (pbb_number_of_iterations): Check for returned
886         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
887
888 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
889
890         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
891         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
892         * graphite-poly.c (pbb_number_of_iterations): New.
893         * graphite-poly.h (pbb_number_of_iterations): Declared.
894         (pbb_iterator_dim, pbb_parameter_dim): New.
895
896 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
897
898         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
899         last commit on type of lower and upper bound of loops.
900
901 2009-06-29  Li Feng  <nemokingdom@gmail.com>
902
903         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
904         graphite-dependences.h.
905         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
906         (mark_bb_with_pbb): New.
907         (get_stmtfor_depth): New.
908         (find_pbb_via_hash): New.
909         (dependency_in_loop_p): New.
910         (mark_loops_parallel): New.
911         (free_aux_in_new_loops): New.
912         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
913         bb with it's relevant pbb. Mark newly created loops.  Remove mark
914         innermost loop parallel without checking.
915         (gloog): Add parameter BB_PBB_MAPPING.
916         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
917         (gloog): Change declaration.
918         (mark_loop_parallel): Make extern.
919         (free_aux_in_new_loops): Declare.
920         (bb_pbb_map_hash): New.
921         (eq_bb_pbb_map): New.
922         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
923         auto parallelization when flag_graphite_force_parallel is set.
924         (graphite_finalize): Added free_aux_in_new_loops.
925         * tree-parloops.c (parallelize_loops): Only generate parallel code for
926         the innermost loop that marked parallel.  Use
927         flag_graphite_force_parallel instead of loop->can_be_parallel.
928         (loop_parallel_p): Move inner most checking out of function.
929
930 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
931
932         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
933         type of lower and upper bound of loops signed long int.
934
935 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
936
937         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
938         expression outside the loop.
939
940 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
941
942         * gcc.dg/graphite/interchange-8.c: New.
943
944 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
945
946         * gcc.dg/graphite/interchange-0.c: XFailed.
947         * gcc.dg/graphite/interchange-5.c: XFailed.
948         * gcc.dg/graphite/interchange-6.c: XFailed.
949
950 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
951
952         * graphite-interchange.c (compute_array_size_poly): The end of the
953         recursion should return 1.
954
955 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
956
957         * graphite-interchange.c (compute_array_size_cstr): Allow the
958         subscript multiplier to be -1.
959         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
960         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
961         data_container.  Initializes PDR_DATA_CONTAINER.
962         (print_pdr_access_layout): New.
963         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
964         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
965         data_container.
966         (PDR_DATA_CONTAINER): New.
967         (new_poly_dr): Update declaration.
968         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
969         (build_poly_dr): Call pdr_add_data_dimensions.
970
971 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
972
973         * graphite-poly.h (struct poly_dr): Fix comment.
974         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
975         (pdr_add_memory_accesses): New.
976         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
977
978 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
979
980         * graphite-poly.c (print_pdrs, debug_pdrs): New.
981         (print_pbb): Add call to print_pdrs.
982         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
983
984 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
985             Li Feng <nemokingdom@gmail.com>
986
987         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
988         (dependency_between_pbbs_p): New.
989         (lexicographically_gt_p): Assure !empty_p before polyhedron
990         intersection assign.
991         (build_lexicographically_gt_constraint): Correct lexicographically
992         judging.
993         * graphite-dependences.h: New.
994         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
995
996 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
997
998         * graphite-clast-to-gimple.c (print_clast_stmt): New.
999         (gloog): Print to dump_file the generated clast.
1000         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1001         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1002
1003 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1004
1005         * graphite-poly.c (extend_scattering): Increment
1006         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1007
1008 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1009
1010         * graphite-interchange.c (compute_array_size_poly): Added exit of
1011         recursion condition.  Continue iterating even after the first equality.
1012         (compute_array_size): Same.
1013
1014 2009-06-24  Li Feng  <nemokingdom@gmail.com>
1015
1016         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1017         -fdump-tree-final_cleanup to -fdump-tree-optimized.
1018         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1019         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1020         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1021
1022 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1023
1024         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1025         only when the use verifies is_gimple_reg.
1026
1027 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1028
1029         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1030         Allocate scaldims after call to unify_scattering_dimensions.
1031
1032 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1033
1034         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1035
1036 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1037             Albert Cohen  <albert.cohen@inria.fr>
1038
1039         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1040         variables for the strip mining.
1041
1042 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1043             Pranav Garg  <pranav.garg2107@gmail.com>
1044
1045         * Makefile.in (OBJS-common): Added graphite-blocking.o.
1046         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1047         (graphite-blocking.o): New rule.
1048         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1049         * graphite-blocking.c: New.
1050         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1051         flag_loop_strip_mine.
1052         (psct_scattering_dim_for_loop_depth): New.
1053         * graphite-poly.h (scop_do_strip_mine): Declared.
1054         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1055         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1056         flag_loop_strip_mine.
1057
1058 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1059
1060         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1061         a GMP value and a PPL coefficient at each iteration of a loop.
1062
1063 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1064
1065         * graphite-dependences.c (dependence_polyhedron): Do not use
1066         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
1067         pbb_nb_scattering_transform.
1068         (graphite_legal_transform_dr): Same.
1069         * graphite-poly.c (extend_scattering): Same.
1070         (unify_scattering_dimensions): Same.
1071         (print_scattering_function): Same.
1072         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1073         PBB_NB_LOCAL_VARIABLES.
1074         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1075         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1076         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1077         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1078         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1079         (pbb_nb_scattering_transform): New.
1080         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1081         (psco_scattering_dim): Add assert on parameters.
1082         (psct_scattering_dim): Same.
1083         (psct_scattering_dim_for_loop_depth): Declared.
1084         (psct_local_var_dim): New.
1085         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1086         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
1087         correct layout, call pbb_nb_local_vars.
1088         (psct_add_local_variable, psct_add_scattering_dimension): New.
1089         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1090         Initialize PBB_NB_SCATTERING_TRANSFORM.
1091
1092 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1093
1094         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1095         (set_coef): Renamed ppl_set_coef.
1096         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1097
1098 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1099
1100         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1101         test a boolean against 1.
1102         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1103         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1104         (pbb_do_interchange): Returns true when a transform has been performed.
1105         (scop_do_interchange): Same.
1106         * graphite-poly.c (apply_poly_transforms): Use the return value of
1107         scop_do_interchange.
1108         * graphite-poly.h (scop_do_interchange): Update declaration.
1109
1110 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1111
1112         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1113         after last use.
1114         * sese.c (sese_reset_aux_in_loops): New.
1115         * sese.h (sese_reset_aux_in_loops): New.
1116
1117 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1118
1119         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1120         multiplier and multiply the constant by the multiplier.
1121         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1122         (build_poly_dr): Do not use the multiplier to define the subscript.
1123
1124 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1125
1126         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1127         compiler's data reference.  Initialize PDR_CDR.
1128         (print_pdr): Call dump_data_reference.
1129         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1130         Add compiler_dr field.
1131         (PDR_BB): Renamed PDR_PBB.
1132         (PDR_CDR): New.
1133         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1134         GCC's data reference representation.
1135         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1136         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1137
1138 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1139
1140         * graphite-poly.c (print_scattering_function): Also print the layout.
1141         * graphite-poly.h (pbb_nb_local_vars): New.
1142
1143 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1144
1145         * graphite-poly.c (print_pbb_domain): Also print the layout names.
1146
1147 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1148
1149         * graphite-poly.c (print_pdr, debug_pdr): New.
1150         * graphite-poly.h (print_pdr, debug_pdr): Declared.
1151         (PDR_BASE): Removed.
1152
1153 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1154
1155         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1156         ltrans-{1..6,8}.c.
1157
1158 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1159
1160         * graphite-interchange.c (compute_subscript): Allow also -1 in the
1161         subscript identification column.
1162         (pbb_do_interchange): Print to dump_file that some loops "will be
1163         interchanged".  Rely on that chain of characters in the testcases.
1164         * gcc.dg/graphite/interchange-0.c: New.
1165         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1166         interchange-*.c files and compile them with -floop-interchange.
1167
1168 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
1169
1170         * graphite-interchange.c (interchange_profitable_p): Renamed
1171         pbb_interchange_profitable_p.
1172
1173 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1174             Harsha Jagasia  <harsha.jagasia@amd.com>
1175             Pranav Garg  <pranav.garg2107@gmail.com>
1176
1177         * graphite-interchange.c (interchange_profitable_p): Make static.
1178         (pbb_interchange_loop_depths, pbb_do_interchange,
1179         scop_do_interchange): New.
1180         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1181         for flag_loop_interchange.
1182         * graphite-poly.h (scop_do_interchange): Declared.
1183         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1184         flag_loop_interchange is used.
1185
1186 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1187
1188         * graphite-dependences.c (dependence_polyhedron): Update use of
1189         pbb_nb_scattering_dims.
1190         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1191         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1192         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1193         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1194
1195 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1196
1197         * graphite.c: Cleanup foo.
1198
1199 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1200
1201         * Merge from mainline (r143684:148293).
1202         * Disabled libpcp until it gets fixed.
1203
1204 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1205             Harsha Jagasia  <harsha.jagasia@amd.com>
1206
1207         * graphite-interchange.c: New.
1208         * Makefile.in (graphite-interchange.o): New.
1209         * graphite-poly.h (interchange_profitable_p): Declared.
1210         * graphite-ppl.h (value_max): New.
1211
1212 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1213
1214         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1215         * graphite-poly.h: Fix some comments.
1216         (pdr_dim): New.
1217         (pdr_scop): New.
1218
1219 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1220
1221         * graphite-poly.h
1222         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1223         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1224         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1225         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1226         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1227         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1228         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1229         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1230         * graphite-clast-to-gimple.c: Same.
1231         * graphite-dependences.c: Same.
1232         * graphite-poly.c: Same.
1233         * graphite-sese-to-poly.c: Same.
1234
1235 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1236
1237         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1238         expressions for an IV rename, as returned by clast_to_gcc_expression.
1239         (copy_renames): Rename new_name to expr.
1240         * sese.c (debug_rename_elt): Same.
1241         (get_rename): Same.
1242         (set_rename): Same.
1243         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1244         the information from the rename map.
1245         (rename_variables_in_stmt): Same.
1246         (add_loop_exit_phis): Rename new_name to expr.
1247         (insert_loop_close_phis): Same.
1248         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1249         * sese.h (struct rename_map_elt): Rename new_name to expr.
1250         (new_rename_map_elt): Same.
1251
1252 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1253
1254         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1255         * sese.c (set_rename): Make it extern.
1256         * sese.h (set_rename): Declared.
1257
1258 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1259
1260         * graphite-poly.c (extend_scattering): Free values.
1261         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1262         Free iterators.
1263         (ppl_print_powerset_matrix): Same.
1264         * graphite-scop-detection.c (free_scops_1): New.
1265         (limit_scops): Call free_scops_1.
1266         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1267         (build_poly_dr): Free PPL coefficients.
1268         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1269
1270 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1271
1272         * graphite-dependences.c: New.
1273         * graphite-data-ref.c: Removed.
1274         * graphite-data-ref.h: Removed.
1275         * Makefile.in (graphite-data-ref.o): Removed.
1276         (graphite-dependences.o): Added.
1277         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1278         * graphite-poly.c: Same.
1279         Move the data dependence testing to graphite-dependences.c.
1280
1281 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1282
1283         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1284         from graphite_cannot_represent_loop. Code refactored.
1285         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1286
1287 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1288
1289         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1290         Cover all the testcases (not only the filtered ones).
1291
1292 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1293
1294         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1295         unnecessary check. Update comments. Move check for REAL_TYPE here.
1296         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1297         done in (stmt_simple_for_scop_p).
1298
1299 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1300
1301         * graphite.c (print_global_statistics): New.
1302         (print_graphite_scop_statistic): New.
1303         (print_graphite_statistics): New.
1304         (graphite_initialize, graphite_transform_loops): Print statistics.
1305         * graphite-scop-detection (build_scops): Print statistics.
1306         (print_graphite_scop_statistics): New.
1307         (print_graphite_statistics): New.
1308
1309 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1310
1311         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1312         (debug_clast_name_index): Removed.
1313         (debug_clast_name_indexes_1): Removed.
1314         (debug_clast_name_indexes): Removed.
1315         (clast_name_index_elt_info): Removed.
1316         (eq_clast_name_indexes): Removed.
1317         (clast_name_to_index): Removed.
1318         (new_clast_name_index): Removed.
1319         (save_clast_name_index): Removed.
1320         (save_var_name): Moved...
1321         (init_sese_params_index): Removed.
1322         (clast_name_to_gcc): Remove use of name_tree.
1323         (initialize_cloog_names): Same.
1324         (gloog): Do not call init_sese_params_index.
1325         * graphite-sese-to-poly.c (save_var_name): ...here.
1326         (parameter_index_in_region): New.
1327         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1328         (parameter_index_in_region): Removed.
1329         (is_parameter): Remove use of name_tree.
1330         * sese.h (struct name_tree): Removed.
1331         (struct sese): Remove use of name_tree.  New field params_names.
1332         (SESE_PARAMS_NAMES): New.
1333         (SESE_PARAMS): Remove duplicate.
1334         (parameter_index_in_region): Removed.
1335         (sese_nb_params): Remove use of name_tree.
1336         (struct clast_name_index): New.
1337         (new_clast_name_index): New.
1338         (clast_name_to_index): New.
1339         (save_clast_name_index): New.
1340         (debug_clast_name_index): New.
1341         (debug_clast_name_indexes_1): New.
1342         (debug_clast_name_indexes): New.
1343         (clast_name_index_elt_info): New.
1344         (eq_clast_name_indexes): New.
1345
1346 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1347
1348         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1349         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1350         (graphite_loop_normal_form): Do not pass region.  Do not
1351         initialize SESE_OLDIVS.
1352         (build_graphite_loop_normal_form): Update call to
1353         graphite_loop_normal_form.
1354         * sese.c (debug_oldivs): Removed.
1355         (new_sese): Do not initialize SESE_OLDIVS.
1356         (free_sese): Do not free SESE_OLDIVS.
1357         (oldiv_for_loop): Removed.
1358         * sese.h (struct sese): Remove old_ivs.
1359         (SESE_OLDIVS): Removed.
1360         (oldiv_for_loop): Removed.
1361
1362 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1363
1364         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1365         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1366         replaced by a call to newivs_to_depth_to_newiv.
1367         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1368         (clast_to_gcc_expression_red): Same.
1369         (gcc_type_for_clast_expr): Same.
1370         (gcc_type_for_clast_eq): Same.
1371         (graphite_translate_clast_equation): Same.
1372         (graphite_create_guard_cond_expr): Same.
1373         (graphite_create_new_guard): Same.
1374         (graphite_create_new_loop): Same.
1375         (build_iv_mapping): Same.
1376         (translate_clast): Same.
1377         (gloog): Same.
1378         (loop_iv_stack_patch_for_consts): Removed.  *
1379         sese.c (iv_stack_entry_is_constant): Removed.
1380         (iv_stack_entry_is_iv): Removed.
1381         (loop_iv_stack_push_iv): Removed.
1382         (loop_iv_stack_insert_constant): Removed.
1383         (loop_iv_stack_pop): Removed.
1384         (loop_iv_stack_get_iv): Removed.
1385         (loop_iv_stack_get_iv_from_name): Removed.
1386         (debug_loop_iv_stack): Removed.
1387         (free_loop_iv_stack): Removed.
1388         (loop_iv_stack_remove_constants): Removed.  *
1389         sese.h (iv_stack_entry_kind): Removed.
1390         (iv_stack_entry_data_union): Removed.
1391         (iv_stack_entry_struct): Removed.
1392         (iv_stack_entry_p): Removed.
1393         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1394         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1395         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1396         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1397         (gbb_loop_at_index): Fix indenting.
1398         (gbb_loop_index): Removed.
1399
1400 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1401
1402         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1403         Call clast_name_to_index.
1404
1405 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1406
1407         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1408         do not pass params.  Get params from SESE_PARAMS.
1409         (clast_to_gcc_expression): Same.
1410         (clast_to_gcc_expression_red): Same.
1411         (gcc_type_for_clast_eq): Same.
1412         (graphite_translate_clast_equation): Same.
1413         (graphite_create_new_loop): Same.
1414         * sese.c (rename_variables_in_stmt): Fix comment.
1415
1416 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1417
1418         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1419         newivs_index.
1420         Call save_clast_name_index.
1421         (translate_clast): Pass newivs_index.
1422         (gloog): Create and free newivs_index.
1423
1424 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1425
1426         * graphite-clast-to-gimple.c (clast_name_index): New structure.
1427         (clast_name_index_p): New type.
1428         (debug_clast_name_index): New.
1429         (debug_clast_name_indexes_1): New.
1430         (debug_clast_name_indexes): New.
1431         (clast_name_index_elt_info): New.
1432         (eq_clast_name_indexes): New.
1433         (clast_name_to_index): New.
1434         (new_clast_name_index): New.
1435         (save_clast_name_index): New.
1436         (init_sese_params_index): New.
1437         (gloog): Call init_sese_params_index.
1438         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1439         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1440         (free_sese): Free SESE_PARAMS_INDEX.
1441         * sese.h (struct sese): Add params_index.
1442         (SESE_PARAMS_INDEX): New.
1443
1444 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1445
1446         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1447         (graphite_create_new_loop): Pass the newivs vector.  Push the
1448         newly created IV to newivs.
1449         (translate_clast): Pass the newivs vector.
1450         (gloog): Create and destroy the newivs vector.
1451
1452 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1453
1454         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1455         (graphite_loop_normal_form): Initialize loop->aux with the unique
1456         IV that has been created.
1457
1458 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
1459
1460         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1461         scev with parameters in the base part. They where forbidden
1462         exidently.
1463
1464 2009-05-11  Li Feng  <nemokingdom@gmail.com>
1465
1466         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1467         compile options by file names.
1468         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1469         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1470         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1471         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1472
1473 2009-05-08  Li Feng <nemokingdom@gmail.com>
1474
1475         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1476         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1477         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1478         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1479
1480 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1481
1482         * graphite-scop-detection (build_scops_1): Fix little bug introduced
1483         by final cleanup.
1484
1485 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
1486
1487         * graphite-scop-detection.c (graphite_can_represent_scev): Only
1488         allow integer constant strides.
1489         (graphite_can_represent_expr): Depend on outermost_loop.
1490         (stmt_simple_memref_p, graphite_cannot_represent_loop,
1491         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1492         build_scops_1): Same.
1493         (scopdet_basic_block_info): Same and insert layered SCoP
1494         detection.
1495         (try_generate_gimple_bb): Cleanup.
1496         (build_scops): Enable data references.
1497
1498         * testsuite/gcc.dg/graphite/id-5.c: New.
1499         * testsuite/gcc.dg/graphite/id-9.c: New.
1500         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1501         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1502
1503 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1504
1505         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1506         that we have not yet built for this SCoP.
1507
1508 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1509
1510         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1511         for complex numbers.
1512
1513 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
1514
1515         * graphite-ppl.c: Fix build if cloog is not available.
1516
1517 2009-05-04  Li Feng  <nemokingdom@gmail.com>
1518
1519         * tree-parloops.c (loop_parallel_p): Remove construction of
1520         NITER and REDUCTION_LIST.
1521         (try_get_loop_niter): New.
1522         (try_create_reduction_list): New.
1523         (parallelize_loops): Bypass the failed checkings in autopar
1524         when can_be_parallel in loop structure is set to true.
1525
1526 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1527
1528         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1529         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1530
1531 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1532
1533         * graphite-scop-detection.c (stmt_simple_for_scop_p):
1534         Enable EQ_EXPR and NE_EXPR again.
1535
1536 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1537
1538         * graphite-scop-detection.c (graphite_can_represent_scev):
1539         Add check if scev is affine multivariate.
1540         (harmful_stmt_in_bb): Check if we can represent the conditions.
1541         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1542         harmful_stmt_in_bb.
1543         * testsuite/gcc.dg/graphite/id-7.c: New.
1544
1545 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
1546
1547         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1548         Check all bbs in region, not only the bbs that are represented in
1549         GRAPHITE.
1550         (build_poly_scop): Add newline.
1551         * testsuite/gcc.dg/graphite/id-8.c: New.
1552
1553 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1554
1555         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1556         when loop initialize.
1557         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1558         * common.opt: Declare flag_graphite_force_parallel.
1559         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1560         loop parallel.
1561         * graphite-poly.c (apply_poly_transforms): Introduce
1562         flag_graphite_force_parallel.
1563         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1564         * toplev.c (process_options): ditto and replace a not correctly
1565         encoded space.
1566
1567 2009-04-30  Li Feng  <nemokingdom@gmail.com>
1568
1569         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1570         Change the call of gbb_loop_at_index and/or gbb_loop_index due
1571         to the redefinition.
1572         (compute_cloog_iv_types_1): ditto.
1573         (build_iv_mapping): ditto.
1574         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1575         initialization.
1576         (free_gimple_bb): Removed GBB_LOOPS related free part.
1577         (build_bb_loops): Removed.
1578         * sese.h (struct gimple_bb): Removed loops.
1579         (GBB_LOOPS): Removed.
1580         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1581         (gbb_loop_index): ditto.
1582
1583 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1584
1585         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1586         allow non constant strides.
1587         * testsuite/gcc.dg/graphite/scop-20.c: New.
1588
1589 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1590
1591         * graphite-scop-detection.c (dot_all_scops): Fix system call
1592         return value warning.
1593         (dot_scop): Same.
1594
1595 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1596
1597         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1598         * testsuite/gcc.dg/graphite/scop-3.c: Same.
1599
1600 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1601
1602         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1603         build_pairwise_constraint, dr_equality_constraints,
1604         build_pairwise_scheduling_equality,
1605         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1606         build_lexicographically_gt_constraint, dependence_polyhedron,
1607         graphite_legal_transform_dr, graphite_legal_transform_bb,
1608         graphite_legal_transform): New.
1609         * graphite-poly.h (graphite_legal_transform): Declared.
1610         * graphite-sese-to-poly.c (build_poly_scop): Call to
1611         graphite_legal_transform is disabled for the moment.
1612
1613 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1614
1615         * graphite-poly.h (pbb_nb_scattering_dims): New.
1616         (pbb_nb_scattering): Use it.
1617
1618 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1619
1620         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1621         Pointset_Powerset version of ppl_insert_dimensions.
1622         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1623
1624 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1625
1626         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1627
1628 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1629
1630         * graphite-poly.h: Fix comment.
1631
1632 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
1633
1634         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1635
1636 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1637
1638         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1639         statements.
1640
1641 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1642
1643         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1644         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1645         conditions.
1646
1647 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
1648
1649         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1650         handle EQ_EXPR and NE_EXPR.
1651
1652 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1653
1654         * graphite-poly.h (poly_dr): Fix comment.
1655
1656 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1657             Tobias Grosser  <grosser@fim.uni-passau.de>
1658
1659         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1660         with a zero dimension polyhedron.
1661         (find_scop_parameters): Move the call to scop_set_nb_params here.
1662         (build_loop_iteration_domains): Store in loop->aux the iteration
1663         domain polyhedron.
1664         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1665         by any loop in scop.
1666         (build_poly_scop): Do not call scop_set_nb_params.
1667
1668 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
1669             Tobias Grosser  <grosser@fim.uni-passau.de>
1670
1671         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1672         add_condition_to_domain not GT_EXPR.
1673
1674 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1675
1676         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1677         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1678         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1679         upper_bound_assign to calculate unions.
1680         * testsuite/gcc.dg/graphite/id-6.c: New.
1681
1682 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1683
1684         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1685         handle abnormal edges.
1686
1687 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
1688
1689         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1690         (free_poly_bb): Also free poly_drs.
1691         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1692         (poly_dr): Polyhedron to Pointset_Powerset.
1693         (pdr_accessp_nb_subscripts): Same.
1694         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1695         poly_drs.
1696
1697 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1698
1699         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1700         names into more meaningful names.
1701
1702 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1703
1704         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1705         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1706
1707 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1708
1709         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1710         the reduction_list.
1711         * tree-parloops.c (rewrite_phi_with_iv): New.
1712         (rewrite_all_phi_nodes_with_iv): New.
1713         (canonicalize_loop_ivs): Call them.
1714
1715 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1716
1717         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1718         graphite_find_data_references_in_stmt.
1719         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1720         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1721
1722 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1723
1724         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1725
1726 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1727
1728         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1729         instead of bb_in_region.
1730         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
1731         (build_sese_conditions): Use flag_bb_in_sese.
1732         * sese.c (register_bb_in_sese): Removed.
1733         (new_sese): Remove initialization of SESE_REGION_BBS.
1734         (free_sese): Do not free SESE_REGION_BBS.
1735         * sese.h (struct sese): Remove field region_basic_blocks.
1736         (SESE_REGION_BBS): Removed.
1737         (bb_in_sese_p): Implement in function of bb_in_region.
1738
1739 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
1740
1741         * graphite-scop-detection.c (limit_scops): Deal only with single exit
1742         loops.
1743
1744 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1745
1746         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1747         and EQ_EXPR.
1748         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1749         (add_condition_to_domain): New.
1750         (add_condition_to_pbb): New.
1751         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1752         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1753
1754 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1755
1756         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1757         ppl_Pointset_Powerset.
1758         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1759         * graphite-poly.h (poly_bb): poly_bb.domain Same.
1760         (pbb_nb_loops): Same.
1761         * graphite-sese-to-poly.c (build_loop_iteration_domains,
1762         add_conditions_to_domain): Same.
1763         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1764         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1765         ppl_const_Polyhedron_t.
1766         (ppl_print_powerset_matrix): New.
1767         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1768         ppl_print_powerset_matrix): New.
1769         (ppl_print_polyhedron_matrix): Updated.
1770
1771 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1772
1773         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1774
1775 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
1776
1777         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
1778         (print_iteration_domains, debug_iteration_domain,
1779         debug_iteration_domains): New.
1780         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1781         debug_iteration_domains): Declared.
1782         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1783         indenting.
1784
1785 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
1786             Sebastian Pop  <sebastian.pop@amd.com>
1787
1788         * graphite-poly.h (print_iteration_domain): New.
1789         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1790         (build_sese_conditions_1, build_sese_conditions_after,
1791         build_sese_conditions_before): New.
1792         (build_sese_conditions): Rewritten.
1793
1794 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1795             Tobias Grosser  <grosser@fim.uni-passau.de>
1796
1797         Cleanup of code generation liveouts.
1798         * graphite-clast-to-gimple.c (translate_clast): Use a single
1799         rename_map instead of one per translated statement.
1800         Do not use SESE_LIVEOUT_RENAMES.
1801         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1802         (gloog): Do not use SESE_LIVEOUT_RENAMES.
1803         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1804         phi node of a reduction: when a loop contains a reduction used outside
1805         the loop, there should be a scalar close phi node on the exit block.
1806         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1807         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1808         (free_sese): Do not free them.
1809         (sese_build_liveouts_use): Do not use them.
1810         (sese_build_liveouts_bb): Same.
1811         (sese_build_liveouts): Same.
1812         (sese_insert_phis_for_liveouts): Same.
1813         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
1814         (defined_in_loop_p): New.
1815         (alive_after_loop): New.
1816         (close_phi_not_yet_inserted_p): New.
1817         (struct alep, alep_p): New.
1818         (add_loop_exit_phis): Remove from the rename_map all the names defined
1819         in the code generated loop.
1820         (insert_loop_close_phis): Traverse the rename_map passed to it.
1821         Don't use SESE_LIVEOUT_RENAMES.
1822         (default_liveout_before_guard): Renamed default_before_guard.
1823         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1824         (graphite_copy_stmts_from_block): Do not directly call set_rename.
1825         (register_sese_liveout_renames): Removed.
1826         (copy_bb_and_scalar_dependences): Do not call it.
1827         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1828         reduction_list.
1829         (SESE_LIVEOUT): Removed.
1830         (SESE_LIVEOUT_RENAMES): Removed.
1831         (SESE_REDUCTION_LIST): Removed.
1832         (sese_build_liveouts): Removed.
1833         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1834         (insert_loop_close_phis): Pass a htab_t instead of a sese.
1835         (insert_guard_phis): Same.
1836         (rename_map_elt): Declare a VEC of them.
1837         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1838         trees not pointers to trees.
1839
1840         Rewrite in canonical close SSA form:
1841         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1842         (limit_scops): Close the scop after the block containing the close phi
1843         nodes.
1844         (canonicalize_loop_closed_ssa): New.
1845         (canonicalize_loop_closed_ssa_form): New.
1846         (build_scops): Call canonicalize_loop_closed_ssa_form.
1847
1848         * graphite-sese-to-poly.c: Fix typos.
1849
1850 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
1851
1852         * graphite-poly.c (print_scattering_function, print_pbb_domain):
1853         Extended.
1854         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1855         (print_pbb): Add conditions.
1856
1857 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
1858             Sebastian Pop  <sebastian.pop@amd.com>
1859
1860         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1861         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1862         (build_scop_bbs_1): New.
1863         (build_scop_bbs): Rewrite.
1864         * sese.h (bb_in_region): New.
1865
1866 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1867
1868         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1869         poly_drs vector.
1870         (print_scop): Style.
1871         * graphite-poly.h (poly_bb): Add drs vector.
1872         (PBB_DRS): Add accessor.
1873         * graphite-sese-to-poly.c (build_poly_dr): New.
1874         (build_pbb_drs, build_scop_drs): New.
1875         (build_poly_scop): call build_scop_drs (Disabled at the moment).
1876
1877 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1878
1879         * tree-ssa-loop.c: Include forgotten toplev.h
1880
1881 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
1882
1883         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1884         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1885         * testsuite/gcc.dg/graphite/pr37928.c: Same
1886         * testsuite/gcc.dg/graphite/pr38409.c: Same
1887         * testsuite/gcc.dg/graphite/pr38498.c: Same
1888         * testsuite/gcc.dg/graphite/pr38559.c: Same
1889         * testsuite/gcc.dg/graphite/pr39335.c: Same
1890         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1891         * testsuite/gfortran.dg/graphite/block-2.f: Same
1892         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1893         with -floop-*.
1894
1895 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
1896
1897         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1898         build_access_matrix, build_scop_data_accesses): Remove access function
1899         building. (We get a new version soon).
1900         (build_bb_loops, scan_tree_for_params_right_scev): Update.
1901         * sese.h (nb_loops_around_loop_in_sese): Remove.
1902         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1903
1904 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
1905             Sebastian Pop  <sebastian.pop@amd.com>
1906
1907         * graphite-scop-detection.c (struct scopdet_info): Rename last
1908         field to exit.
1909         (scopdet_basic_block_info, build_scops_1): Don't use
1910         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
1911
1912 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
1913             Sebastian Pop  <sebastian.pop@amd.com>
1914
1915         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1916         * sese.c (sese_build_liveouts_use): Renamed from
1917         sese_build_livein_liveouts_use. Remove liveins.
1918         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1919         Call sese_build_liveouts_use.
1920         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1921         Call sese_build_liveouts_bb.
1922         (new_sese, free_sese): Remove liveins.
1923         (sese_add_exit_phis_var): Deleted.
1924         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1925         directly.
1926         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1927
1928         * sese.h (sese): Remove num_ver and livein.
1929         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1930
1931 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
1932
1933         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1934
1935 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
1936
1937         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1938         (build_scop_scattering): Do not use compare_prefix_loops any more.
1939         (nb_common_loops): New.
1940
1941 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1942
1943         * sese.c (get_new_name_from_old_name): Renamed get_rename.
1944         (register_old_and_new_names): Renamed set_rename.
1945
1946 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1947
1948         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1949         of the decl from the previous commit.
1950
1951 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1952
1953         * graphite-scop-detection.c (dot_scop): New.
1954         * graphite-scop-detection.h (dot_scop): Declared.
1955
1956 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1957
1958         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1959
1960 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1961
1962         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1963         condition at the end of the loop.
1964         * graphite.c (graphite_initialize, graphite_finalize): Print to
1965         dump_file the compiled function.
1966         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1967         of create_empty_loop_on_edge.
1968         (translate_clast): Update the code generation of loops for the new
1969         shape of loops.
1970         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1971
1972 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
1973
1974         Reverted the patch from 2009-03-19.
1975
1976 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1977
1978         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1979         poly_drs vector.
1980         (print_scop): Style.
1981         * graphite-poly.h (poly_bb): Add drs vector.
1982         (PBB_DRS): Add accessor.
1983         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1984         (build_access_matrix_with_af, build_access_matrix,
1985         build_scop_data_accesses): Delete.
1986         (build_poly_dr): New.
1987         (build_pbb_drs, build_scop_drs): New.
1988         (build_poly_scop): call build_scop_drs.
1989
1990 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
1991
1992         * graphite-scop-detection.c (dot_all_scops_1): Close the table
1993         once per basic block.
1994
1995 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
1996
1997         * graphite-scop-detection.c (graphite_can_represent_scev): New.
1998         (graphite_can_represent_expr): Renamed from loop_affine_expr
1999         and enhanced.
2000         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2001         (graphite_cannot_represent_loop): Add scop_entry to parameters.
2002         (scopdet_basic_block_info): Actually define entry_block.
2003         (stmt_simple_memref_p): Moved here from ...
2004
2005         * tree-data-ref.c (stmt_simple_memref_p): here.
2006         * tree-data-ref.h (stmt_simple_memref_p): Removed.
2007
2008 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2009
2010         * testsuite/gcc.dg/graphite/id-4.c: New.
2011
2012 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2013
2014         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2015         (register_old_and_new_names): Update the content of the map.
2016         When there was already a rename_map_elt in the map at that
2017         location, free it.
2018         (copy_bb_and_scalar_dependences): Do rename_variables after
2019         expand_scalar_variables.
2020         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2021         of the map.  When there was already a rename_map_elt in the
2022         map at that location, free it.
2023         (translate_clast): Pass the rename_map.  Do not initialize and free
2024         a rename_map per stmt_user.
2025         (gloog): Initialize and free one rename_map and pass it to
2026         translate_clast.
2027
2028 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2029
2030         * sese.c (expand_scalar_variables_stmt,
2031         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2032         parameter.
2033         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2034         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2035         the gimple_stmt_iterator of the statement to be expanded.
2036         * graphite-scop-detection.c (is_simple_operand): Do handle
2037         REALPART_EXPR.
2038
2039 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2040
2041         * graphite-scop-detection.c (is_simple_operand): Do not handle
2042         REALPART_EXPR.
2043         * testsuite/gcc.dg/graphite/id-2.c: New.
2044
2045         * graphite-sese-to-poly.c (build_bb_loops,
2046         add_value_to_dim, scan_tree_for_params_right_scev,
2047         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2048         find_params_in_bb, build_loop_iteration_domains,
2049         add_conditions_to_domain): Remove subtract.
2050
2051 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2052
2053         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2054         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2055         pbb_loop_at_index -> gbb_loop_at_index.
2056         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2057         (debug_loop_vec): Delete.
2058         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2059         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
2060         (PBB_LOOPS): Removed.
2061         (PBB_BLACK_BOX): Insert cast.
2062         (pbb_set_black_box): New setter.
2063         (pbb_loop_at_index, pbb_loop_index): Removed.
2064         (scop_set_region, scop_set_nb_params): New.
2065         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2066         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2067         (build_poly_scop): Use scop_set_nb_params.
2068         * sese.h (gimple_bb): Add LOOPS.
2069         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2070
2071 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2072
2073         Revert previous commit.
2074
2075 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2076
2077         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2078         (register_old_and_new_names): Update the content of the map.
2079         When there was already a rename_map_elt in the map at that
2080         location, free it.
2081         (copy_bb_and_scalar_dependences): Do rename_variables after
2082         expand_scalar_variables.
2083         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2084         of the map.  When there was already a rename_map_elt in the
2085         map at that location, free it.
2086         (translate_clast): Pass the rename_map.  Do not initialize and free
2087         a rename_map per stmt_user.
2088         (gloog): Initialize and free one rename_map and pass it to
2089         translate_clast.
2090
2091 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2092
2093         Remove forgotten line in revert.
2094
2095 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2096
2097         Revert previous commit.
2098
2099 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2100
2101         * sese.c (register_old_and_new_names): Update the content
2102         of the map.  When there was already a rename_map_elt in the
2103         map at that location, free it.
2104         (copy_bb_and_scalar_dependences): Do rename_variables after
2105         expand_scalar_variables.
2106         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2107         of the map.  When there was already a rename_map_elt in the
2108         map at that location, free it.
2109         (translate_clast): Pass the rename_map.  Do not initialize and free
2110         a rename_map per stmt_user.
2111         (gloog): Initialize and free one rename_map and pass it to
2112         translate_clast.
2113
2114 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2115
2116         * graphite-clast-to-gimple.c (translate_clast): context_loop
2117         is never NULL.
2118
2119 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2120             Sebastian Pop  <sebastian.pop@amd.com>
2121
2122         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2123         of the use of ppl_Polyhedron_map_space_dimensions.
2124
2125 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2126             Sebastian Pop  <sebastian.pop@amd.com>
2127
2128         * graphite-poly.c (unify_scattering_dimensions): Fix types.
2129         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2130         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2131         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2132         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2133         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2134         pbb_nb_params): New.
2135         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2136         nb_loops_around_pbb): Adapt return types.
2137
2138 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2139
2140         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2141         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2142         graphite-scop-detection.o, graphite-poly.o): Add
2143         more headers.
2144
2145 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
2146
2147         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2148         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2149         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2150
2151 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2152
2153         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2154         * testsuite/gcc.dg/graphite/pr37828.c: Same.
2155         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2156         * testsuite/gcc.dg/graphite/block-0.c: Same.
2157         * testsuite/gcc.dg/graphite/block-1.c: Same.
2158         * testsuite/gcc.dg/graphite/block-2.c: Same.
2159         * testsuite/gcc.dg/graphite/block-3.c: Same.
2160         * testsuite/gcc.dg/graphite/block-4.c: Same.
2161         * testsuite/gcc.dg/graphite/block-5.c: Same.
2162         * testsuite/gcc.dg/graphite/block-6.c: Same.
2163         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2164         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2165         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2166         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2167         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2168         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2169         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2170         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2171         * opts.c: Remove -floop-block from -O2.
2172         * graphite-poly.c: Fail if -floop-block -floop-interchange or
2173         -floop-strip-mine are used.
2174
2175 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2176             Sebastian Pop  <sebastian.pop@amd.com>
2177
2178         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2179         dimensions.
2180         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2181         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2182         strip_mine_profitable_p, is_interchange_valid,
2183         graphite_trans_bb_block, graphite_trans_loop_block,
2184         graphite_trans_scop_block): Temporary removed.
2185         (extend_scattering, unify_scattering_dimensions): New.
2186         (print_scattering_function, graphite_read_transforms):
2187         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2188         (graphite_generate_scattering_fns): Removed.
2189         (apply_poly_transforms): Cleanup.
2190         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2191         (schedule_to_scattering): Moved.
2192         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2193         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2194         (pbb_nb_scattering): New.
2195         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2196         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2197         Removed.
2198         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2199         shift_poly.
2200         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2201         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2202         -> PBB_TRANSFORMED_SCATTERING.
2203         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2204         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2205         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2206         (check_poly_representation): Do not return bool.
2207         (graphite_transform_loops): Reformat.
2208         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2209
2210 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2211
2212         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2213         debug_pbb_domain, debug_pbb, debug_scop): New.
2214         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2215         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2216
2217 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2218
2219         PR middle-end/39335
2220         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2221         when the type precision of the induction variable should be
2222         larger than the type precision of nit.
2223         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2224         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2225         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2226
2227         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2228         * testsuite/gcc.dg/graphite/pr39335.c: New.
2229
2230 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2231
2232         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2233         SSA_NAMES not struct reduction_info.
2234
2235 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2236
2237         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2238
2239 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2240             Tobias Grosser  <grosser@fim.uni-passau.de>
2241
2242         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2243         (free_sese): Free SESE_REDUCTION_LIST.
2244         * sese.h (struct sese): Add field reduction_list.
2245         (SESE_REDUCTION_LIST): New.
2246         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2247         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2248
2249 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2250             Tobias Grosser  <grosser@fim.uni-passau.de>
2251
2252         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2253         of loop_p.
2254
2255 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2256             Tobias Grosser  <grosser@fim.uni-passau.de>
2257
2258         * tree-parloops.c (struct brli, build_reduction_list_info,
2259         analyze_reduction_list, gather_scalar_reductions): New.
2260         (loop_parallel_p): Build a reduction list containing only
2261         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2262         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2263         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2264         * tree-flow.h (gather_scalar_reductions): Declared.
2265
2266 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2267
2268         PR middle-end/39308
2269         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2270         number_of_iterations_exit from a gcc_assert.
2271
2272 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2273             Jan Sjodin  <jan.sjodin@amd.com>
2274
2275         * output.h (graphite_out_file, graphite_in_file): Declared.
2276         * toplev.c (graphite_out_file, graphite_in_file): New.
2277         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2278         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2279         Don't call schedule_to_scattering.
2280         * common.opt (fgraphite-write, fgraphite-read): New.
2281         * graphite-poly.c: Include output.h.
2282         (print_scattering_function, print_scattering_functions,
2283         debug_scattering_function, debug_scattering_functions,
2284         graphite_write_transforms, graphite_read_transforms,
2285         graphite_generate_scattering_fns): New.
2286         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2287         Call graphite_generate_scattering_fns, graphite_write_transforms,
2288         graphite_read_transforms.
2289         (new_poly_bb): Initialize PBB_SCATTERING.
2290         (free_poly_bb): Free PBB_SCATTERING.
2291         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2292         * graphite-poly.h (struct poly_bb): Add field scattering.
2293         (PBB_SCATTERING): New.
2294         (print_scattering_function, print_scattering_functions,
2295         debug_scattering_function, debug_scattering_functions): Declared.
2296         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2297         GMP values, not integers!
2298         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2299         ppl_read_polyhedron_matrix): New.
2300         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2301         debug_ppl_polyhedron_matrix,
2302         ppl_read_polyhedron_matrix): Declared.
2303         * Makefile.in (graphite-poly.o): Depends on output.h.
2304
2305 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2306             Tobias Grosser  <grosser@fim.uni-passau.de>
2307
2308         Revert this change:
2309         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2310         scalar evolutions in the scop_entry->loop_father.
2311
2312 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2313             Tobias Grosser  <grosser@fim.uni-passau.de>
2314
2315         * graphite.h (ref_nb_loops): Remove declaration.
2316         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2317         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2318         debug_gbb): Moved to sese.h.
2319         * sese.h: As said.
2320
2321 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2322             Tobias Grosser  <grosser@fim.uni-passau.de>
2323
2324         * graphite-data-ref.[ch]: Disable.
2325
2326 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2327             Tobias Grosser  <grosser@fim.uni-passau.de>
2328
2329         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2330         scalar evolutions in the scop_entry->loop_father.
2331
2332 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2333
2334         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2335         (graphite_cannot_represent_loop_niter): Renamed
2336         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2337         (limit_scops): build_sese_loop_nests does not return a bool.
2338         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2339         * sese.c (nb_reductions_in_loop): ... from here.
2340         (graphite_loop_normal_form): ... from here.
2341         (sese_record_loop): Does not fail, so does not return a bool.
2342         (build_sese_loop_nests): Same.
2343         * sese.h (build_sese_loop_nests): Update declaration.
2344         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2345         (build_graphite_loop_normal_form): New.
2346         (gloog): Call build_graphite_loop_normal_form.
2347         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2348         build_sese_loop_nests.
2349
2350         * testsuite/gcc.dg/graphite/id-1.c: New.
2351
2352 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2353             Tobias Grosser  <grosser@fim.uni-passau.de>
2354
2355         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2356         The SCoP detection fix is sufficient.
2357
2358 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2359
2360         PR tree-optimization/39260
2361         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2362         the basic block contains a condition with a real type.
2363         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2364
2365         * gcc.dg/graphite/pr39260.c: New.
2366
2367 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2368
2369         * graphite-poly.c: Inlcude params.h.
2370         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2371         the size of a tile.
2372         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2373         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2374
2375 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2376             Tobias Grosser  <grosser@fim.uni-passau.de>
2377
2378         * graphite-scop-detection.c (dot_all_scops_1,
2379         dot_all_scops): Moved here.
2380         * graphite-scop-detection.h (dot_all_scops): Declared here.
2381         * graphite.c (graphite_initialize, graphite_finalize): New.
2382         (graphite_transform_loops): Cleaned up.
2383         * sese.c (debug_oldivs): Moved here.
2384         * graphite-poly.c (graphite_apply_transformations): Renamed
2385         apply_poly_transforms.
2386         (debug_loop_vec): Moved here.
2387         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2388         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2389         find_scop_parameters, build_scop_iteration_domain,
2390         add_conditions_to_constraints, build_scop_canonical_schedules,
2391         build_scop_data_accesses): Now static.
2392         (build_poly_scop, check_poly_representation): New.
2393
2394 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2395
2396         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2397         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2398         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2399         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2400         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2401         scan_tree_for_params, struct irp_data, dx_record_params,
2402         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2403         build_loop_iteration_domains, add_conditions_to_domain,
2404         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2405         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2406         build_sese_conditions, add_conditions_to_constraints,
2407         build_scop_iteration_domain, build_access_matrix_with_af,
2408         build_access_matrix,
2409         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2410
2411         * graphite-sese-to-poly.c: New.
2412         * graphite-sese-to-poly.h: New.
2413
2414         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2415
2416 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2417
2418         * graphite.c: Split graphite code generation to a new file.
2419         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2420         max_precision_type, clast_to_gcc_expression_red,
2421         clast_to_gcc_expression, gcc_type_for_clast_expr,
2422         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2423         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2424         graphite_create_new_guard, clast_get_body_of_loop,
2425         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2426         graphite_create_new_loop, build_iv_mapping, copy_renames,
2427         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2428         compute_cloog_iv_types, free_scattering, save_var_name,
2429         initialize_cloog_names, build_scop_context, build_cloog_prog,
2430         set_cloog_options, debug_clast_stmt, scop_to_clast,
2431         print_generated_program, debug_generated_program,
2432         gloog): Moved to graphite-clast-to-gimple.c.
2433
2434         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2435
2436         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2437         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2438         loop_iv_stack_pop, loop_iv_stack_get_iv,
2439         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2440         free_loop_iv_stack, loop_iv_stack_remove_constants,
2441         debug_rename_elt, debug_rename_map_1, debug_rename_map,
2442         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2443         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2444         eq_ivtype_map_elts, sese_add_exit_phis_edge,
2445         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2446         get_vdef_before_sese, sese_adjust_vphi,
2447         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2448         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2449         is_iv, expand_scalar_variables_ssa_name,
2450         expand_scalar_variables_expr, expand_scalar_variables_stmt,
2451         expand_scalar_variables, rename_variables, remove_condition,
2452         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2453         add_loop_exit_phis, insert_loop_close_phis, struct igp,
2454         default_liveout_before_guard, add_guard_exit_phis,
2455         insert_guard_phis, register_old_and_new_names,
2456         graphite_copy_stmts_from_block, register_sese_liveout_renames,
2457         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2458         if_region_set_false_region, create_if_region_on_edge,
2459         move_sese_in_condition): Moved to sese.c.
2460
2461         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2462         if_region_exit, if_region_get_condition_block,
2463         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2464         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2465         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2466         ivtype_map_elt, new_ivtype_map_elt,
2467         recompute_all_dominators): Moved to sese.h.
2468
2469         * graphite-clast-to-gimple.c: New.
2470         * graphite-clast-to-gimple.h: New.
2471         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2472         * sese.c: Modified as said above.
2473         * sese.h: Same.
2474
2475 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2476
2477         * graphite.c: Split scop detection to a new file.
2478         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2479         move_sd_regions, loop_affine_expr, exclude_component_ref,
2480         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2481         graphite_cannot_represent_loop_niter, struct scopdet_info,
2482         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2483         find_single_entry_edge, find_single_exit_edge,
2484         create_single_entry_edge, sd_region_without_exit,
2485         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2486         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2487         Moved to graphite-scop-detection.c.
2488
2489         * graphite-scop-detection.c: New.
2490         * graphite-scop-detection.h: New.
2491         * Makefile.in: Add new rule for graphite-scop-detection.o.
2492
2493         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2494         tree-scalar-evolution.h.
2495         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2496         build_sese_loop_nests): Moved here from graphite.c.
2497         (param_index): Renamed parameter_index_in_region.
2498
2499 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2500             Sebastian Pop  <sebastian.pop@amd.com>
2501
2502         * gcc.dg/graphite/block-0.c: Expected to fail now.
2503         * gcc.dg/graphite/block-1.c: Same.
2504         * gcc.dg/graphite/block-5.c: Same.
2505         * gcc.dg/graphite/block-6.c: Same.
2506
2507 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
2508             Sebastian Pop  <sebastian.pop@amd.com>
2509
2510         * graphite.h: Separate from graphite_bb_p the polyhedral
2511         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2512         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2513         graphite-data-ref.h.
2514         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2515         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2516         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2517         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2518         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2519         scop_nb_params): Moved to graphite-poly.h.
2520         * graphite-data-ref.c: Same.
2521         * graphite-data-ref.h: New.
2522         * graphite.c: Same.
2523         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2524         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2525         is_interchange_valid, graphite_trans_bb_block,
2526         graphite_trans_loop_block, scop_max_loop_depth,
2527         graphite_trans_scop_block, graphite_apply_transformations,
2528         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2529         graphite-poly.c.
2530         * graphite-poly.h: New.
2531         * graphite-poly.c: New.
2532         * Makefile.in (OBJS-common): Add graphite-poly.o.
2533         (graphite-poly.o): New rule.
2534         * tree-data-ref.h (struct data_reference): Remove unused scop field.
2535         (DR_SCOP): Removed.
2536
2537 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2538             Tobias Grosser  <grosser@fim.uni-passau.de>
2539
2540         * graphite.c: Replace gb -> gbb.
2541         * graphite.h: Same.
2542         * graphite-data-ref.c: Same.
2543
2544 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
2545             Tobias Grosser  <grosser@fim.uni-passau.de>
2546
2547         * Makefile.in (OBJS-commmon): Add sese.o.
2548         (sese.o): New.
2549         (graphite.o): Add sese.h.
2550         * graphite.c (bb_in_ss_p, loop_in_sese_p,
2551         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2552         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2553         Move to sese.
2554         (block_before_scop): Add missing return.
2555         (new_scop, free_scop): Remove SESE data structures.
2556         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2557         find_scop_parameters, build_loop_iteration_domains,
2558         add_conditions_to_domain, register_scop_liveout_renames,
2559         copy_bb_and_scalar_dependences): Scop -> SESE.
2560
2561         (add_conditions_to_domain): SCoP -> SESE and remove check
2562         (scop_contains_non_iv_scalar_phi_nodes): New.
2563         (build_scop_conditions_1, build_scop_conditions): Remove check for
2564         non iv scalar phi nodes.
2565         (print_scop_statistics): New.
2566         (graphite_transform_loops): Cleanup.
2567
2568         * graphite.h: Move to sese & cleanup.
2569         * sese.c: New.
2570         * sese.h: New.
2571
2572 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2573             Tobias Grosser  <grosser@fim.uni-passau.de>
2574
2575         * graphite.c (build_scop_conditions_1): Conditions are only
2576         at the end of a basic block.
2577
2578 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2579             Tobias Grosser  <grosser@fim.uni-passau>
2580
2581         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2582         field.
2583         (GBB_ALPHA): Removed.
2584
2585 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2586             Tobias Grosser  <grosser@fim.uni-passau.de>
2587
2588         * graphite-data-ref.c (graphite_test_dependence): Don't use
2589         GBB_DYNAMIC_SCHEDULE.
2590         * graphite.c (new_graphite_bb): Same.
2591         (free_graphite_bb): Same.
2592         (build_scop_dynamic_schedules): Removed.
2593         (graphite_transform_loops): Don't call it.
2594         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2595         (GBB_DYNAMIC_SCHEDULE): Removed.
2596
2597 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2598             Tobias Grosser  <grosser@fim.uni-passau.de>
2599
2600         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2601         (print_graphite_bb): Same.
2602         (build_cloog_prog): Same.
2603
2604 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2605             Tobias Grosser  <grosser@fim.uni-passau.de>
2606
2607         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2608
2609 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2610             Tobias Grosser  <grosser@fim.uni-passau.de>
2611
2612         * graphite.c (build_scop_context): Don't use CloogMatrix.
2613         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2614         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2615
2616 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2617             Tobias Grosser  <grosser@fim.uni-passau.de>
2618
2619         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2620         liveout_renames, add_params fields...
2621         (struct sese): ... here.
2622         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2623         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2624
2625 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2626             Tobias Grosser  <grosser@fim.uni-passau.de>
2627
2628         * graphite.c (print_scop): Do not print the CLooG program.
2629         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2630         build_cloog_prog, gloog): Don't use SCOP_PROG.
2631         (find_transform): Renamed scop_to_clast.
2632         (print_generated_program, debug_generated_program): New.
2633         (graphite_transform_loops): Adapt to new interface.
2634         * graphite.h (struct scop): Remove program field.
2635         (SCOP_PROG): Removed.
2636         (print_generated_program, debug_generated_program): Declared.
2637
2638 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
2639
2640         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2641         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2642         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2643         free_graphite_bb, build_scop_canonical_schedules,
2644         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2645         schedules are now represented using a ppl_Linear_Expression_t.
2646         * graphite.h (struct graphite_bb): Same.
2647         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2648         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2649
2650 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2651
2652         * graphite.c: Free local memory.
2653         * graphite-ppl.c: Same.
2654
2655 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
2656
2657         * graphite.c (const_column_index, get_first_matching_sign_row_index,
2658         get_lower_bound_row, get_upper_bound_row, copy_constraint,
2659         swap_constraint_variables, scale_constraint_variable): Removed.
2660         (graphite_trans_bb_strip_mine): Remove pong.
2661         * graphite-ppl.c: Include missing header files.
2662         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2663         * graphite-ppl.h (ppl_strip_loop): Declared.
2664         * Makefile.in (graphite-ppl.o): Adjust dependences.
2665
2666 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
2667
2668         * graphite.c (build_loop_iteration_domains): Remove ping pong.
2669         (build_scop_iteration_domain): Same.
2670
2671 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2672
2673         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2674         ping pong.
2675         (add_value_to_dim, scan_tree_for_params_right_scev,
2676         scan_tree_for_params_int): New.
2677         * graphite-ppl.c (oppose_constraint): New.
2678         (insert_constraint_into_matrix): Implement missing cases.
2679         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2680
2681 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
2682
2683         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2684         use ppl_move_dimension.
2685
2686 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2687
2688         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2689         * graphite.c: Same.
2690         * graphite.h: Same.
2691         * graphite-ppl.c: Same.
2692         * graphite-ppl.h: Same.
2693
2694 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
2695
2696         Revert last 3 commits.
2697
2698 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2699
2700         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2701         ping pong.
2702         (add_value_to_dim, scan_tree_for_params_right_scev,
2703         scan_tree_for_params_int): New.
2704         * graphite-ppl.c (oppose_constraint): New.
2705         (insert_constraint_into_matrix): Implement missing cases.
2706         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2707
2708 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2709
2710         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2711
2712 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2713             Tobias Grosser  <grosser@fim.uni-passau.de>
2714
2715         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2716         use ppl_move_dimension.
2717         * graphite-ppl.c (ppl_move_dimension): New.
2718         * graphite-ppl.h (ppl_move_dimension): Declared.
2719
2720 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
2721
2722         * graphite.c: Do not include cloog/cloog.h.
2723         (print_graphite_bb): Remove ping pong, call PPL print function.
2724
2725 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2726
2727         * Makefile.in (OBJS-common): Add graphite-ppl.o.
2728         (graphite.o): Add dependence on graphite-ppl.h.
2729         (graphite-ppl.o): New.
2730         (graphite-data-ref.c): Ping pong between PPL data structures
2731         and matrices.
2732         * graphite-ppl.c: New.
2733         * graphite-ppl.h: New.
2734         * graphite.c: Include graphite-ppl.h.
2735         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2736         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2737         Ping pong between PPL data structures and matrices.
2738         (new_graphite_bb): Create a PPL constraint system.
2739         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2740         (build_loop_iteration_domains): Use PPL functions.
2741         * graphite.h: Include graphite-ppl.h.  Fix comments.
2742         (graphite_bb): Use a ppl_Constraint_System_t instead of
2743         CloogMatrix for representing the domain.
2744         (scop): Remove static_schedule.
2745         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2746
2747 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
2748
2749         * graphite.c: Fix some comments.
2750
2751 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
2752
2753         PR middle-end/38953
2754         * graphite.c (if_region_set_false_region): After moving a region
2755         in the false branch of a condition, remove the empty dummy
2756         basic block.
2757         (gloog): Remove wrong fix for PR38953.
2758
2759 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2760
2761         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2762         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2763         register_bb_in_sese, new_sese, free_sese): Moved.
2764         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2765         outermost_loop_in_scop, build_scop_iteration_domain,
2766         expand_scalar_variables_ssa_name, get_vdef_before_scop,
2767         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2768         Use loop_in_sese_p instead of loop_in_scop_p.
2769         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2770         (free_scop): Do not free SCOP_BBS_B.
2771         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2772         ref_nb_loops): Moved here...
2773         * graphite.h (ref_nb_loops): ... from here.
2774         (struct scop): Remove bbs_b bitmap.
2775         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2776         * testsuite/gcc.dg/graphite/scop-19.c: New
2777
2778 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2779
2780         * graphite.c (scopdet_basic_block_info): Fix bug in scop
2781         detection.
2782
2783 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2784
2785         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2786         eq_loop_to_cloog_loop): Remove.
2787         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2788         * graphite.h (struct scop): Remove loop2cloog_loop.
2789         (loop_domain_dim, loop_iteration_vector_dim): Remove.
2790
2791 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2792
2793         * opts.c (decode_options): Only add graphite options to O2
2794         if we compile with graphite enabled.
2795
2796 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2797
2798         * Merge from mainline (r143163:143684).
2799
2800 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
2801
2802         * graphite.c (debug_value): Removed.
2803         * graphite.h (debug_value): Removed.
2804
2805 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2806
2807         * passes.c (init_optimization_passes): Do not call pass_copy_prop
2808         after graphite: pass_copy_prop does not maintain a proper loop closed
2809         SSA form.  pass_copy_prop should be fixed.
2810
2811 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2812
2813         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2814
2815 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
2816
2817         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2818         (gloog): Split the exit of the scop when the scop exit is a loop exit.
2819         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2820         changed the CFG.
2821
2822 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
2823
2824         * graphite.c (gloog): Return true when code gen succeeded.
2825         (graphite_transform_loops): Do not call cleanup_tree_cfg if
2826         the code of the function did not changed.  After cleanup_tree_cfg
2827         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2828         form.
2829
2830 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
2831
2832         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2833         gimple_call_lhs is NULL.
2834
2835 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
2836             Tobias Grosser  <tobi.grosser@amd.com>
2837
2838         * graphite.c (graphite_trans_scop_block): Do not block single
2839         nested loops.
2840
2841 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2842             Tobias Grosser  <tobi.grosser@amd.com>
2843
2844         * graphite.c (build_scop_canonical_schedules): Start schedules at
2845         zero.
2846
2847 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
2848             Tobias Grosser  <tobi.grosser@amd.com>
2849
2850         * graphite.c (compare_prefix_loops): New.
2851         (build_scop_canonical_schedules): Rewritten.
2852         (graphite_transform_loops): Move build_scop_canonical_schedules
2853         after build_scop_iteration_domain.
2854
2855 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2856             Tobias Grosser  <tobi.grosser@amd.com>
2857
2858         * graphite.c (add_conditions_to_domain): Add the loops to
2859         the dimension of the iteration domain.  Do copy the domain
2860         only when it exists.
2861         (build_scop_conditions_1): Do not call add_conditions_to_domain.
2862         (add_conditions_to_constraints): New.
2863         (can_generate_code_stmt, can_generate_code): Removed.
2864         (gloog): Do not call can_generate_code.
2865         (graphite_transform_loops): Call add_conditions_to_constraints
2866         after building the iteration domain.
2867
2868 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2869             Tobias Grosser  <tobi.grosser@amd.com>
2870             Jan Sjodin  <jan.sjodin@amd.com>
2871
2872         * graphite.c (scan_tree_for_params): On substractions negate
2873         all the coefficients of the term.
2874         (clast_to_gcc_expression_red): New.  Handle reduction expressions
2875         of more than two operands.
2876         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2877         (get_vdef_before_scop): Handle also the case of default definitions.
2878
2879 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
2880
2881         PR middle-end/38431
2882         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2883         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2884         (gloog): Do not call cleanup_tree_cfg.
2885         (graphite_transform_loops): Call cleanup_tree_cfg after all
2886         scops have been code generated.
2887
2888 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2889
2890         * passes.c (init_optimization_passes): Schedule after
2891         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2892
2893 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
2894
2895         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2896         Fix comment.
2897         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
2898         Set the type of an expression to the type of its assign statement.
2899         (expand_scalar_variables_expr):  Do not pass loop_p.
2900         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
2901         (copy_bb_and_scalar_dependences): Do not pass loop_p.
2902         (translate_clast): Update call to copy_bb_and_scalar_dependences.
2903
2904 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2905
2906         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2907         an expression to the gimple_expr_type of its assign statement.
2908         (expand_scalar_variables_expr): Stop recursion on tcc_constant
2909         or tcc_declaration.
2910
2911 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
2912
2913         PR tree-optimization/38786
2914         * testsuite/gcc.dg/graphite/pr38786.c: New.
2915         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2916         the SSA_NAME case of expand_scalar_variables_expr.
2917         (expand_scalar_variables_expr): Also gather the scalar computation
2918         used to index the memory access.
2919         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2920         the gimple_stmt_iterator where it inserts new code.
2921
2922 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
2923
2924         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2925
2926 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
2927
2928         * opts.c (decode_options): Enable flag_graphite_identity and
2929         flag_loop_block in -O2 and above.
2930
2931 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2932
2933         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2934         Fix merge problem: replace with the file from trunk.
2935
2936 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
2937
2938         * Merge from mainline (r141727:143163).
2939
2940 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
2941             Jan Sjodin  <jan.sjodin@amd.com>
2942
2943         PR tree-optimization/38559
2944         * testsuite/gcc.dg/graphite/pr38559.c: New.
2945
2946         * graphite.c (debug_value, copy_constraint,
2947         swap_constraint_variables, scale_constraint_variable, ): New.
2948         (get_lower_bound, get_upper_bound): Removed.
2949         (graphite_trans_bb_strip_mine): Clean up this code that works
2950         only for constant number of iterations.  Fully copy upper and
2951         lower bound constraints, not only the constant part of them.
2952         * graphite.h (debug_value): Declared.
2953
2954 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
2955
2956         PR tree-optimization/38492
2957         PR tree-optimization/38498
2958         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2959         * tree-chrec.h (scev_is_linear_expression): Declared.
2960         * graphite.c (graphite_cannot_represent_loop_niter): New.
2961         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2962         (graphite_loop_normal_form): Use gcc_assert.
2963         (scan_tree_for_params): Use CASE_CONVERT.
2964         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2965         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2966         Use gcc_assert.  Discard scops that contain unhandled cases.
2967         (build_scop_conditions): Return a boolean status for unhandled cases.
2968         (strip_mine_profitable_p): Print the loop number, not its depth.
2969         (is_interchange_valid): Pass the depth of the loop nest, don't
2970         recompute it wrongly.
2971         (graphite_trans_bb_block): Same.
2972         (graphite_trans_bb_block): Print tentative of loop blocking.
2973         (graphite_trans_scop_block): Do not print that the loop has been
2974         blocked.
2975         (graphite_transform_loops): Do not handle scops that contain condition
2976         scalar phi nodes.
2977
2978         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2979         in trunk.
2980         * testsuite/gcc.dg/graphite/block-0.c: Update test.
2981         * testsuite/gcc.dg/graphite/block-1.c: Same.
2982         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2983         blocking.
2984         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2985         * testsuite/gcc.dg/graphite/block-3.c: New.
2986         * testsuite/gcc.dg/graphite/pr38498.c: New.
2987
2988 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
2989
2990         PR tree-optimization/38510
2991         * gcc.dg/graphite/pr38510.c: New.
2992         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2993           (translate_clast): Call recompute_all_dominators before
2994           graphite_verify.
2995           (gloog): Call recompute_all_dominators before graphite_verify.
2996
2997 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
2998
2999         PR tree-optimization/38492
3000         * graphite.c (rename_map_elt, debug_rename_elt,
3001         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3002         rename_map_elt_info, eq_rename_map_elts,
3003         get_new_name_from_old_name, bb_in_sese_p): Moved around.
3004         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3005         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3006         (sese_build_livein_liveouts): New.
3007         (new_sese, free_sese): New.
3008         (new_scop): Call new_sese.
3009         (free_scop): Call free_sese.
3010         (rename_variables_from_edge, rename_phis_end_scop): Removed.
3011         (register_old_new_names): Renamed register_old_and_new_names.
3012         (register_scop_liveout_renames, add_loop_exit_phis,
3013         insert_loop_close_phis, struct igp,
3014         default_liveout_before_guard, add_guard_exit_phis,
3015         insert_guard_phis, copy_renames): New.
3016         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3017         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3018         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3019         (scop_adjust_phis_for_liveouts): New.
3020         (gloog): Call scop_adjust_phis_for_liveouts.
3021
3022         * graphite.h (struct sese): Documented.  Added fields liveout,
3023         num_ver and livein.
3024         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3025         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3026         (struct scop): Added field liveout_renames.
3027         (SCOP_LIVEOUT_RENAMES): New.
3028
3029 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3030
3031         PR tree-optimization/38409
3032         * gcc.dg/graphite/pr38409.c: New.
3033         * graphite.c (nb_reductions_in_loop): Use simple_iv.
3034
3035 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3036
3037         * graphite.c (gcc_type_for_cloog_iv): By default return
3038         integer_type_node.
3039         (graphite_create_new_loop): Don't fold_convert the already
3040         fold_convert-ed expression.
3041
3042 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
3043
3044         PR tree-optimization/38446
3045         * gcc.dg/graphite/pr38446.c: New.
3046         * graphite.c (register_bb_in_sese): New.
3047         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3048         looking at the bbs in the region.
3049         * graphite.h (sese): Add region_basic_blocks pointer set to
3050         structure and initialize at the time of defining new scop.
3051
3052 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3053
3054         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3055         (find_params_in_bb): Do not free data refs.
3056         (free_graphite_bb): Add FIXME on disabled free_data_refs.
3057
3058 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3059
3060         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3061         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3062         * testsuite/gcc.dg/graphite/block-5.c: New.
3063         * testsuite/gcc.dg/graphite/block-6.c: New.
3064         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3065         * testsuite/gcc.dg/graphite/pr37684.c: Same.
3066         * testsuite/gcc.dg/graphite/block-2.c: Same.
3067
3068         * graphite.c (struct ivtype_map_elt): New.
3069         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3070         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3071         gcc_type_for_cloog_iv): New.
3072         (loop_iv_stack_patch_for_consts): Use the type of the induction
3073         variable from the original loop, except for the automatically
3074         generated loops, i.e., in the case of a strip-mined loop, in
3075         which case there is no original loop: in that case just use
3076         integer_type_node.
3077         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3078         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3079         (clast_name_to_gcc): Accept params to be NULL.
3080         (clast_to_gcc_expression): Take an extra parameter for the type.
3081         Convert to that type all the expressions built by this function.
3082         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3083         (graphite_translate_clast_equation): Compute the type of the
3084         clast_equation before translating its LHS and RHS.
3085         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3086         (graphite_create_new_loop): Compute the type of the induction
3087         variable before translating the lower and upper bounds and before
3088         creating the induction variable.
3089         (rename_variables_from_edge, rename_phis_end_scop): New.
3090         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3091         (sese_add_exit_phis_edge): Do not use integer_zero_node.
3092         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3093         compute_cloog_iv_types): New.
3094         (gloog): Call compute_cloog_iv_types before starting the
3095         translation of the clast.
3096
3097         * graphite.h (struct graphite_bb): New field cloog_iv_types.
3098         (GBB_CLOOG_IV_TYPES): New.
3099         (debug_ivtype_map): Declared.
3100         (oldiv_for_loop): New.
3101
3102 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3103
3104         PR middle-end/38459
3105         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3106         (param_index): Assert if parameter is not know after parameter
3107         detection.
3108         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3109         (find_scop_parameters): Mark, that we have finished parameter
3110         detection.
3111         (graphite_transform_loops): Move condition detection before parameter
3112         detection.
3113         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3114         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3115
3116 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3117
3118         * graphite.c (graphite_transform_loops): Always call find_transform ()
3119         in ENABLE_CHECKING.  So we test these code paths, even if we do not
3120         generate code.
3121
3122 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3123
3124         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3125         (print_scop): Ditto.
3126
3127 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3128
3129         PR middle-end/38084
3130         Fix testsuite/gfortran.dg/graphite/id-3.f90.
3131         * graphite.c (scopdet_basic_block_info): Fix bug that found some
3132         regions more than once.
3133
3134 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3135
3136         Fix testsuite/gfortran.dg/graphite/id-4.f90.
3137         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3138         when not needed.
3139
3140 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3141
3142         Fix testsuite/gfortran.dg/graphite/id-1.f90.
3143         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3144         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3145         (max_precision_type): New.
3146         (value_clast): Removed.
3147         (clast_to_gcc_expression): Be more careful to types of expressions.
3148         Use max_precision_type and update use of gmp_cst_to_tree.
3149         (graphite_translate_clast_equation): Use max_precision_type.
3150         (graphite_create_guard_cond_expr): Do not use integer_type_node,
3151         use the type of the condition.
3152         (graphite_create_new_loop): Do not use integer_type_node, use the
3153         max_precision_type of lb and ub.
3154
3155 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3156
3157         * graphite.c (build_scops_1): Initialize open_scop.exit
3158         and sinfo.last.
3159
3160 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3161
3162         * testsuite/gcc.dg/graphite/pr38084.c: New.
3163         * testsuite/gfortran.dg/graphite/id-1.f90: New.
3164         * testsuite/gfortran.dg/graphite/id-2.f90: New.
3165         * testsuite/gfortran.dg/graphite/id-3.f90: New.
3166         * testsuite/gfortran.dg/graphite/id-4.f90: New.
3167         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3168
3169 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3170             Jan Sjodin  <jan.sjodin@amd.com>
3171             Harsha Jagasia  <harsha.jagasia@amd.com>
3172
3173         PR middle-end/37852
3174         PR middle-end/37883
3175         PR middle-end/37928
3176         PR middle-end/37980
3177         PR middle-end/38038
3178         PR middle-end/38039
3179         PR middle-end/38073
3180         PR middle-end/38083
3181         PR middle-end/38125
3182
3183         * testsuite/gcc.dg/graphite/pr38073.c: New.
3184         * testsuite/gcc.dg/graphite/pr37928.c: New.
3185         * testsuite/gcc.dg/graphite/pr37883.c: New.
3186         * testsuite/gcc.dg/graphite/pr38125.c: New.
3187         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3188         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3189         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3190
3191         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3192         the number of detected scops.  Copy exact same test for loop
3193         blocking...
3194         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3195         loops to be blocked as reductions are not handled.
3196         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
3197
3198         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3199         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3200         ...here.
3201         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3202         * Makefile.in (graphite.o): Depend on value-prof.h.
3203         (graphite.o-warn): Removed -Wno-error.
3204         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3205         to be a NULL pointer.  Call update_stmt.  Return the newly created
3206         cannonical induction variable.
3207
3208         * graphite.h (debug_rename_map): Declared.  Fix some comments.
3209
3210         * graphite.c: Reimplement the code generation from graphite to gimple.
3211         Include value-prof.h.
3212         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3213         (get_old_iv_from_ssa_name): Removed.
3214         (graphite_stmt_p): New.
3215         (new_graphite_bb): Test for useful statements before building a
3216         graphite statement for the basic block.
3217         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3218         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3219         reason.
3220         (recompute_all_dominators, graphite_verify,
3221         nb_reductions_in_loop, graphite_loop_normal_form): New.
3222         (scop_record_loop): Call graphite_loop_normal_form.
3223         (build_scop_loop_nests): Iterate over all the blocks of the
3224         function instead of relying on the incomplete information from
3225         SCOP_BBS.  Return the success of the operation.
3226         (find_params_in_bb): Use the data from GBB_DATA_REFS.
3227         (add_bb_domains): Removed.
3228         (build_loop_iteration_domains): Don't call add_bb_domains.
3229         Add the iteration domain only to the basic blocks that have been
3230         translated to graphite.
3231         (build_scop_conditions_1): Add constraints only if the basic
3232         block have been translated to graphite.
3233         (build_scop_data_accesses): Completely disabled until data
3234         dependence is correctly implemented.
3235         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3236         (remove_all_edges_1, remove_all_edges): Removed.
3237         (get_new_name_from_old_name): New.
3238         (graphite_rename_variables_in_stmt): Renamed
3239         rename_variables_in_stmt.  Call get_new_name_from_old_name.
3240         Use replace_exp and update_stmt.
3241         (is_old_iv): Renamed is_iv.
3242         (expand_scalar_variables_stmt): Extra parameter for renaming map.
3243         Use replace_exp and update_stmt.
3244         (expand_scalar_variables_expr): Same.  Use the map to get the
3245         new names for the renaming of induction variables and for the
3246         renaming of variables after a basic block has been copied.
3247         (expand_scalar_variables): Same.
3248         (graphite_rename_variables): Renamed rename_variables.
3249         (move_phi_nodes): Removed.
3250         (get_false_edge_from_guard_bb): New.
3251         (build_iv_mapping): Do not insert the induction variable of a
3252         loop in the renaming iv map if the basic block does not belong
3253         to that loop.
3254         (register_old_new_names, graphite_copy_stmts_from_block,
3255         copy_bb_and_scalar_dependences): New.
3256         (translate_clast): Heavily reimplemented: copy basic blocks,
3257         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
3258         At each translation step call graphite_verify ensuring the
3259         consistency of the SSA, loops and dominators information.
3260         (collect_virtual_phis, find_vdef_for_var_in_bb,
3261         find_vdef_for_var_1, find_vdef_for_var,
3262         patch_phis_for_virtual_defs): Removed huge hack.
3263         (mark_old_loops, remove_dead_loops, skip_phi_defs,
3264         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3265         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3266         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3267         if_region_get_condition_block, if_region_set_false_region,
3268         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3269         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3270         sese_add_exit_phis_edge, sese_add_exit_phis_var,
3271         rewrite_into_sese_closed_ssa): New.
3272         (gloog): Remove dead code.  Early return if code cannot be
3273         generated.  Call cleanup_tree_cfg once the scop has been code
3274         generated.
3275         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3276         block loops with less than two loops.
3277         (graphite_apply_transformations): Remove the call to
3278         scop_remove_ignoreable_gbbs.
3279         (limit_scops): When build_scop_loop_nests fails, continue on
3280         the next scop.  Fix open_scop.entry.
3281         (graphite_transform_loops): Call recompute_all_dominators: force the
3282         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3283         Call initialize_original_copy_tables and free_original_copy_tables
3284         to be able to copy basic blocks during code generation.
3285         When build_scop_loop_nests fails, continue on next scop.
3286         (value_clast): New union.
3287         (clast_to_gcc_expression): Fix type cast warning.
3288
3289 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
3290
3291         * Merge from mainline (r140838:141727).
3292
3293 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3294
3295         PR middle-end/37833
3296
3297         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3298
3299 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3300
3301         PR middle-end/37943
3302
3303         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3304         exits and conditions.
3305         * testsuite/gcc.dg/graphite/pr37943.c: New.
3306
3307 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3308
3309         PR middle-end/37886
3310         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3311
3312 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3313
3314         * doc/invoke.texi: Fix spaces.
3315
3316 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
3317
3318         PR tree-optimization/37891
3319         Reverted last commit.
3320         * graphite.c (create_single_entry_edge): Set
3321         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3322
3323 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
3324             Mitul Thakkar  <mitul.thakkar@amd.com>
3325
3326         * graphite.c (create_single_entry_edge): Set
3327         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3328
3329 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
3330
3331         * doc/invoke.texi: Add -fgraphite-identity.
3332         * graphite.c (graphite_apply_transformations): Check for
3333         -fgraphite-identity.
3334         * toplev.c (process_options): Add flag_graphite_identity.
3335         * tree-ssa-loop.c: Add flag_graphite_identity.
3336
3337 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3338
3339         Undo changes from 2008-10-02:
3340         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3341         operand type when copying the operand to a variable of different type.
3342         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3343         with the IV name after increment.
3344
3345 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3346             Harsha Jagasia  <harsha.jagasia@amd.com>
3347
3348         PR tree-optimization/37828
3349         * testsuite/gcc.dg/graphite/pr37828.c: New.
3350         * graphite.c (graphite_trans_loop_block): Do not loop block
3351         single nested loops.
3352
3353 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
3354             Sebastian Pop  <sebastian.pop@amd.com>
3355
3356         * graphite.c (struct rename_map_elt, new_rename_map_elt,
3357         rename_map_elt_info, eq_rename_map_elts): New.
3358         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3359         (expand_scalar_variables_expr): Change parameters.
3360         (expand_scalar_variables_stmt): Same.
3361         (expand_scalar_variables): Same.
3362         (graphite_rename_ivs): Rename graphite_rename_variables.
3363         (build_iv_mapping): New.
3364         (translate_clast): Call build_iv_mapping.
3365         * graphite.h (gbb_p): New name.
3366
3367 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
3368
3369         PR tree-optimization/37684
3370         * gcc.dg/graphite/pr37684.c: New.
3371         * graphite.c (exclude_component_ref): New.
3372         (is_simple_operand): Call exclude_component_ref.
3373
3374 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
3375             Harsha Jagasia  <harsha.jagasia@amd.com>
3376
3377         PR tree-optimization/37485
3378         * gcc.dg/graphite/block-2.c: New
3379         * graphite.c (gmp_cst_to_tree): Moved.
3380         (iv_stack_entry_is_constant): New.
3381         (iv_stack_entry_is_iv): New.
3382         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3383         (loop_iv_stack_insert_constant): New.
3384         (loop_iv_stack_pop): Use new datatpype.
3385         (loop_iv_stack_get_iv): Same.
3386         (loop_iv_stack_get_iv_from_name): Same.
3387         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3388         (loop_iv_stack_patch_for_consts): New.
3389         (loop_iv_stack_remove_constants): New.
3390         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3391         (translate_clast): Call loop_iv_stack_patch_for_consts and
3392         loop_iv_stack_remove_constants.
3393         (gloog): Use new datatype.  Redirect construction edge to end
3394         block to avoid accidental deletion.
3395         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
3396         iv stack entry.
3397         (union iv_stack_entry_data): New.  Data in iv stack entry.
3398         (struct iv_stack_entry): New.  Datatype for iv stack entries.
3399
3400 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3401
3402         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3403         operand type when copying the operand to a variable of different type.
3404
3405 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3406
3407         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3408         with the IV name after increment.
3409
3410 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3411
3412         * Merge from mainline (r140164:140838).
3413
3414 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
3415
3416         * graphite-data-ref.c: New.
3417         * graphite.c (print_scop): Also dump the dependence graph.
3418         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3419         (new_scop): Initialize SCOP_DEP_GRAPH.
3420         (build_scop_dynamic_schedules): New.
3421         (build_access_matrix_with_af): Fixed column numbering.
3422         (graphite_transform_loops): Call build_scop_dynamic_schedules.
3423         * graphite.h: Add ifndef/define guards against multiple inclusion.
3424         (struct scop): Add dep_graph field.
3425         (SCOP_DEP_GRAPH): Defined.
3426         (ref_nb_loops): Fixed and moved to other position.
3427         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3428         (nb_loops_around_loop_in_scop): New.
3429         (graphite_dump_dependence_graph): Declared.
3430         (graphite_build_rdg_all_levels): Declared.
3431         (graphite_test_dependence): Declared.
3432         * Makefile.in (graphite-data-ref.o): New target.
3433
3434 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
3435
3436         * Merge from mainline (139870:140164).
3437
3438 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3439
3440         * Merge from mainline (138275:139870).
3441         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3442         the commits from trunk broke the niter detection.
3443
3444 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
3445
3446         * graphite.c: Add more documentation.  Fix formatting.
3447         (debug_loop_vec, debug_oldivs, loop_iv_stack,
3448         loop_iv_stack_debug): Moved...
3449         (schedule_to_scattering): Move before use.
3450         (dot_all_scops): Include in "#if 0" the code for system
3451         call dotty.
3452
3453         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3454         loop_iv_stack_debug): ...here.
3455
3456 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
3457
3458         * tree-phinodes.c (make_phi_node): Extern.
3459         (add_phi_node_to_bb): New.
3460         (create_phi_node): Call add_phi_node_to_bb.
3461         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3462         (remove_statement): Handle case where stored phi was updated
3463         and is no longer the same.
3464         * graphite.c (is_parameter): New.
3465         (is_old_iv): New.
3466         (expand_scalar_variables_expr): New.
3467         (expand_scalar_variables_stmt): New.
3468         (expand_scalar_variables): New.
3469         (move_phi_nodes): Create new phi instead of moving old one.
3470         (translate_clast): Call expand_scalar_variables.
3471         (find_vdef_for_var_in_bb): Also scan regular definitions.
3472         (skip_phi_defs): New.
3473         (collect_scop_exit_phi_args): New.
3474         (patch_scop_exit_phi_args): New.
3475         (gloog): Patch phis after scop.
3476         * tree-flow.h: (add_phi_node_to_bb): Declared.
3477         (make_phi_node): Declared.
3478
3479 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3480
3481         * graphite.c (end_scop): Split the entry of the scop when it
3482         is the header of the loop in which the scop is ending.
3483         (build_scops_1, limit_scops): Update uses of end_scop.
3484
3485 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
3486
3487         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3488         SCOP_ENTRY or SCOP_EXIT.
3489
3490 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3491
3492         * graphite.c (get_construction_edge): Removed.
3493         (gloog): Construction edge is the scop entry edge.
3494
3495 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3496
3497         * graphite.c (can_generate_for_scop): Removed.
3498         (gloog): Do not call it.
3499
3500 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3501
3502         * graphite.c (new_scop): Entry of a scop is an edge.
3503         Initialize SESE region.
3504         (free_scop): Free SESE region.
3505         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3506         (split_difficult_bb): New, split from end_scop.
3507         (end_scop): Exit of a scop is an edge.
3508         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3509         not automatically updated and thus is always wrong.
3510         * graphite.h (struct sese): New.
3511         (SESE_ENTRY): New.
3512         (SESE_EXIT): New.
3513         (struct scop): New field for a SESE region.  Remove entry, exit.
3514         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3515         semantics as before.  Moved comment around.
3516
3517 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3518             Sebastian Pop  <sebastian.pop@amd.com>
3519
3520         * graphite.c (graphite_transform_loops): Always enable gloog
3521         and find_transform when ENABLE_CHECKING.
3522
3523 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3524
3525         * graphite.c (graphite_transform_loops): Move pretty printer
3526         of SCOPs before doing any transform.  Remove call to print_scops
3527         and dot_all_scops_1.
3528
3529 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3530
3531         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3532         (print_graphite_bb): Same.
3533
3534 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3535
3536         * graphite.c (dot_all_scops_1): Cleanup.
3537         (move_scops): Fix comment.
3538
3539 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
3540
3541         * graphite.c (build_scop_bbs): Revert commit 139355:
3542
3543         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3544                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3545
3546                 * graphite.c (build_scop_bbs): Factor up code.
3547
3548 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3549
3550         * graphite.c (gloog): Update dominator info.
3551
3552 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
3553
3554         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3555
3556 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3557
3558         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3559         initialization.
3560         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3561         (translate_clast): Correct formatting.
3562         * graphite.h (struct num_map): Removed.
3563         (struct graphite_bb): Remove num_map field.
3564         (GBB_INDEX_TO_NUM_MAP): Removed.
3565
3566 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3567
3568         * graphite.c (build_access_matrix_with_af): Fix comments.
3569         (build_scop_data_accesses): Same.
3570
3571 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3572
3573         * graphite.c (build_scop_data_accesses): Don't construct
3574         access matrices.  Add a FIXME and an assert condition that
3575         should pass when the access matrices will be needed.
3576
3577 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
3578
3579         * tree-data-ref.c (stmt_simple_memref_p): Don't call
3580         really_constant_p.
3581         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3582         Moved close by free_graphite_bb.
3583         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
3584         (new_scop): Move close by free_scop.
3585         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3586
3587 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
3588
3589         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3590         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3591         instead of recursive call.
3592         (graphite_translate_clast_equation): New.
3593         (graphite_create_guard_cond_expr): New.
3594         (graphite_create_new_guard): New.
3595         (get_stack_index_from_iv): Removed.
3596         (graphite_rename_ivs_stmt): Use gbb_loop_index.
3597         (get_true_edge_from_guard_bb): New.
3598         (translate_clast): Handle stmt_guard in clast.
3599         (get_construction_edge): Allow construction edge detection for
3600         a scope entry with multiple predecessors if one predecessor is
3601         the immediate dominator of scope entry.
3602         (can_generate_code_stmt): Enable code generation for clast_guard.
3603         (gloog): Use correct context loop.  Removed check for post dominators.
3604         * cfgloop.h (create_empty_if_region_on_edge): Declared.
3605
3606 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3607
3608         * graphite.c (remove_dead_loops): Document better which
3609         loops are removed.
3610
3611 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3612
3613         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3614         and PPLINC.
3615         (graphite.o): Also depends on pointer-set.h.
3616
3617 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3618
3619         * graphite.c (scop_record_loop): Fix compile warning.
3620
3621 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
3622             Sebastian Pop  <sebastian.pop@amd.com>
3623
3624         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3625
3626 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
3627
3628         * graphite.c (build_graphite_bb): Initialize bb->aux to
3629         point to the graphite_bb_p.
3630         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3631         content of bb->aux.
3632         (add_bb_domains): Does not use the scop parameter.
3633         (graphite_transform_loops): Clean bb->aux at the end.
3634
3635 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3636             Sebastian Pop  <sebastian.pop@amd.com>
3637
3638         * testsuite/lib/target-supports.exp
3639         (check_effective_target_fgraphite): New.
3640
3641         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3642         check_effective_target_fgraphite returns false.
3643         Set dg-do-what-default to compile.
3644         (scan-graphite-dump-times): Removed.
3645         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3646
3647         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3648         Use scan-tree-dump-times instead of scan-graphite-dump-times.
3649         * testsuite/gcc.dg/graphite/scop-1.c: Same.
3650         * testsuite/gcc.dg/graphite/scop-2.c: Same.
3651         * testsuite/gcc.dg/graphite/scop-3.c: Same.
3652         * testsuite/gcc.dg/graphite/scop-4.c: Same.
3653         * testsuite/gcc.dg/graphite/scop-5.c: Same.
3654         * testsuite/gcc.dg/graphite/scop-6.c: Same.
3655         * testsuite/gcc.dg/graphite/scop-7.c: Same.
3656         * testsuite/gcc.dg/graphite/scop-8.c: Same.
3657         * testsuite/gcc.dg/graphite/scop-9.c: Same.
3658         * testsuite/gcc.dg/graphite/scop-10.c: Same.
3659         * testsuite/gcc.dg/graphite/scop-11.c: Same.
3660         * testsuite/gcc.dg/graphite/scop-12.c: Same.
3661         * testsuite/gcc.dg/graphite/scop-13.c: Same.
3662         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3663         * testsuite/gcc.dg/graphite/scop-14.c: Same.
3664         * testsuite/gcc.dg/graphite/scop-15.c: Same.
3665         * testsuite/gcc.dg/graphite/block-0.c: Same.
3666         * testsuite/gcc.dg/graphite/scop-16.c: Same.
3667         * testsuite/gcc.dg/graphite/block-1.c: Same.
3668         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3669         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3670         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3671         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3672         * testsuite/gfortran.dg/graphite/block-2.f: Same.
3673
3674 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3675
3676         * graphite.c: Fix some XXX comments.
3677         (build_scop_dynamic_schedules): Removed.
3678
3679 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3680
3681         * graphite.h (scop_max_loop_depth): Moved...
3682         * graphite.c (scop_max_loop_depth): ...here.
3683         (remove_all_edges_1): New.
3684         (remove_all_edges): Factored code.
3685         (remove_cond_exprs): Check only the last statement for
3686         a GIMPLE_COND expression.
3687
3688 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3689
3690         * graphite.c (scan_tree_for_params): Early return when the
3691         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
3692         (find_scop_parameters): Factor out code.
3693         (graphite_trans_bb_strip_mine): Remove dead code.
3694
3695 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3696
3697         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3698         graphite_trans_bb_move_loop): Factor asserts.
3699         (gloog): Perform sanity checks only for ENABLE_CHECKING.
3700         Do not call calculate_dominance_info and estimate_bb_frequencies.
3701
3702 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
3703
3704         * graphite.c (create_loops_mapping, free_loops_mapping,
3705         create_loops_mapping_num, debug_loop_mapping_1,
3706         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3707         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3708         graphite_loops_mapping_add_child_num,
3709         graphite_loops_mapping_insert_child,
3710         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3711         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3712         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3713         create_num_from_index, get_num_from_index,
3714         swap_loop_mapped_depth): Removed.
3715         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3716         (free_scop): Do not call free_loops_mapping.
3717         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3718         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
3719         get_loop_mapped_depth.
3720         (graphite_trans_bb_move_loop): Do not update the loop mapping.
3721         (graphite_trans_bb_strip_mine): Same.
3722         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3723         (struct scop): Remove field loops_mapping.
3724
3725 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3726             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3727
3728         * graphite.c (scop_record_loop): Factor out one level of the
3729         condition by early return.
3730         (build_scop_loop_nests): Format following FSF coding style.
3731         (build_scop_dynamic_schedules): Factor out code.
3732         (scopdet_bb_info): Reindent.  Default case should not be reachable.
3733
3734 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3735             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3736
3737         * graphite.c (loop_affine_expr): Check for DECL_P or struct
3738         assignments that are not handled as simple operands for now.
3739
3740 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3741             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3742
3743         * graphite.c (build_scop_bbs): Factor up code.
3744
3745 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3746             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3747
3748         * graphite.c (stmt_simple_for_scop_p): Factor code out
3749         of the loop.
3750         (enum gbb_type): New.  Group all the GBB_* types under it.
3751         (is_loop_exit): Moved...
3752         (end_scop): Enable BB spliting.
3753         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
3754         * cfgloop.h (is_loop_exit): Declared.
3755
3756 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3757
3758         * doc/invoke.texi: Remove strides from examples containing
3759         DO loops when the strides are equal to 1.
3760
3761 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
3762             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
3763
3764         * graphite.c (graphite_trans_scop_block): Or the result with
3765         the result from graphite_trans_loop_block.
3766         * testsuite/gcc.dg/graphite/block-1.c: New.
3767         * testsuite/gfortran.dg/graphite/block-1.f90: New.
3768         * testsuite/gfortran.dg/graphite/block-2.f: New.
3769
3770 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3771
3772         * graphite.c (graphite_transform_loops): Call cloog_initialize
3773         and cloog_finalize.
3774
3775 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3776
3777         * tree-data-ref.c) (stmt_simple_memref_p): New.
3778         * tree-data-ref.h (stmt_simple_memref_p): Declared.
3779         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3780         (is_simple_operand): Call stmt_simple_memref_p.
3781
3782         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3783         using pointer arithmetic, as this is optimized by PRE and
3784         makes the code too difficult to analyze.
3785
3786         * testsuite/gcc.dg/graphite/scop-18.c: Same.
3787
3788 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
3789
3790         * gdbinit.in (pgg): New.
3791
3792 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3793
3794         * graphite.c (graphite_trans_loop_block): Fix warning.
3795
3796 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3797
3798         * graphite.c (graphite_trans_loop_block): Fix my merge error.
3799
3800 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
3801
3802         * graphite.c (graphite_trans_bb_block): Remove check for
3803         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3804         Check if loop blocking is profitable for every loop, before applying
3805         the changes.
3806         (graphite_apply_transformations): Call graphite_trans_bb_block only,
3807         if flag_loop_block is set.
3808
3809 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3810
3811         * graphite.c: Add some more documentation for the loop
3812         mapping.
3813
3814 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3815
3816         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3817         * graphite.c: Format on less than 80 columns.
3818         * graphite.h: Same.
3819
3820 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3821
3822         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3823
3824 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
3825
3826         * doc/invoke.texi (floop-block, floop-strip-mine,
3827         floop-interchange): Update documentation with examples.
3828
3829 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3830
3831         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3832         add_referenced_var.
3833         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3834
3835 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
3836
3837         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3838         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
3839         * tree-scalar-evolution.c: Revert useless changes.
3840         * tree-phinodes.c: Same.
3841         * cfghooks.c: Same.
3842         * vec.h: Same.
3843         * tree-vectorizer.h: Same.
3844         * tree-flow.h: Same.
3845         * tree-cfg.c: Same.
3846         * common.opt (fgraphite): Update documentation.
3847
3848 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
3849
3850         * doc/invoke.texi (-floop-block, -floop-strip-mine,
3851         -floop-interchange): Add more text for explaining what each of these
3852         flags is doing.
3853         * tree-into-ssa.c (gimple_vec): Moved to...
3854         * graphite.c: Include gimple.h.
3855         (gimple_vec): Moved to...
3856         (del_loop_to_cloog_loop): Removed.
3857         (loop_affine_expr): Do not call create_data_ref when the
3858         operand is a constant.
3859         (new_scop): Use free instead of del_loop_to_cloog_loop.
3860         * Makefile.in (graphite.o): Depend on GIMPLE_H.
3861         * gimple.h (gimple_vec): ... here.
3862
3863 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3864
3865         * graphite.c (scopdet_bb_info): Only allow loops with known number of
3866         latch executions.
3867         (build_loop_iteration_domains): Fail, if latch executions unknown.
3868
3869 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3870
3871         * graphite.c (add_conditions_to_domain): New.
3872         (build_scop_conditions_1): Call add_conditions_to_domain.
3873         (set_cloog_options): Allow to disable optimizations.
3874
3875 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3876
3877         * graphite.c (find_params_in_bb): Look for parameters in conditions.
3878         Do not use walk_dominator_tree.
3879         (find_scop_parameters): Do not use walk_dominator_tree.
3880
3881 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3882
3883         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3884         (idx_record_params): Adapt.
3885         * graphite.h (scop_gimple_loop_depth): New.
3886
3887 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3888
3889         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3890         (scan_tree_for_params): Remove value_init.
3891         (build_scop_context): Remove value_init.
3892         (build_loop_iteration_domains): Remove value_init.
3893         (schedule_to_scattering): Remove value_init.
3894         (graphite_trans_bb_strip_mine): Remove value_init.
3895
3896 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3897
3898         * gcc/graphite.c (limit_scops): New.