OSDN Git Service

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