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