OSDN Git Service

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