OSDN Git Service

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