OSDN Git Service

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