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.