OSDN Git Service

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