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