OSDN Git Service

f60be322a5ba1ae37c755bba0b235f59ff526634
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog.graphite
1 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
2
3         * graphite-sese-to-poly.c (create_zero_dim_array): Pass an extra
4         argument base_name.
5         (rewrite_close_phi_out_of_ssa): Update use of create_zero_dim_array.
6         (rewrite_phi_out_of_ssa): Same.
7         (rewrite_cross_bb_scalar_deps): Same.
8         (translate_scalar_reduction_to_array): Same.
9
10 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
11
12         * graphite-sese-to-poly.c (build_scop_drs): Disable call to
13         dump_alias_graphs.
14
15 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
16
17         * graphite-sese-to-poly.c (dump_alias_graphs): New.
18         (build_scop_drs): Call dump_alias_graphs.
19
20 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
21
22         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_SCHEDULE,
23         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
24         (free_scop): Call free_lst on SCOP_ORIGINAL_SCHEDULE,
25         SCOP_TRANSFORMED_SCHEDULE, and SCOP_SAVED_SCHEDULE.
26         * graphite-poly.h (free_lst): New.
27         (store_lst_schedule): Free SCOP_SAVED_SCHEDULE.
28         (restore_lst_schedule): Free SCOP_TRANSFORMED_SCHEDULE.
29
30 2009-10-22  Sebastian Pop  <sebastian.pop@amd.com>
31
32         * graphite-poly.h (struct scop): Add a field saved_schedule.
33         (SCOP_SAVED_SCHEDULE): New.
34         (store_lst_schedule): New.
35         (restore_lst_schedule): New.
36         (store_scattering): Call store_lst_schedule.
37         (restore_scattering): Call restore_lst_schedule.
38
39 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
40
41         * graphite-sese-to-poly.c (free_data_refs_aux): Fix formatting.
42         (pdr_add_alias_set): Same.
43         (build_poly_dr): Same.
44         (build_alias_set_optimal_p): Same.
45         (build_base_obj_set_for_drs): Same.  Do not store the result of
46         graphds_dfs.
47
48 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
49
50         * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
51         all_components_are_cliques to 1.
52
53 2009-10-20  Li Feng  <nemokingdom@gmail.com>
54
55         * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
56         the new structure.
57         (pdr_add_alias_set): Update retrieving alias_set_num.
58         (build_poly_dr): Update retrieving dr_base_object_set.
59         (partition_drs_to_sets): Remove.
60         (build_alias_set_optimal_p): New.
61         (build_alias_set_for_drs): Rename.
62         (build_scop_drs): Update.
63         * graphite-sese-to-poly.h (struct base_alias_pair): New.
64         (ALIAS_SET_INDEX): Remove.
65         (BASE_OBJECT_SET_INDEX): Remove.
66
67 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
68
69         * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
70
71 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
72
73         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
74         loop upper bounds for 1-element arrays at end of structures.
75         * tree-flow.h (array_at_struct_end_p): Declared.
76         * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
77
78 2009-10-20  Sebastian Pop  <sebastian.pop@amd.com>
79
80         * g++.dg/graphite/pr41305.C: New.
81
82 2009-10-20  Alexander Monakov  <amonakov@ispras.ru>
83
84         * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
85         construction of parameter constraints from loop iteration analysis.
86         * gcc.dg/graphite/run-id-2.c: New test.
87
88 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
89
90         * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
91         and new_cstr.
92
93 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
94
95         * graphite-dependences.c (dependence_polyhedron_1): Remove
96         unused gdim dimensions from the DDR polyhedron.
97
98 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
99
100         * graphite-dependences.c (pddr_transformed_scattering): New.
101         (dot_original_deps_stmt_1): New.
102         (dot_transformed_deps_stmt_1): New.
103         (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
104         dot_transformed_deps_stmt_1.
105         (dot_original_deps): New.
106         (dot_transformed_deps): New.
107         (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
108
109 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
110
111         * graphite-dependences.c (reduction_dr_1): Remove wrong
112         assert: reduction BBs can have multiple reduction writes
113         to memory.  interchange-3.f90 is an example.
114
115 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
116
117         * gfortran.dg/graphite/interchange-3.f90: New.
118
119 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
120
121         * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
122
123 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
124
125         * graphite-dependences.c (dependence_polyhedron_1): Add the
126         context to the dependence polyhedron.
127
128 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
129
130         * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
131         PBB_PDR_DUPLICATES_REMOVED.
132         (new_poly_bb): Same.
133
134 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
135
136         * graphite-sese-to-poly.c (find_scop_parameters): Initialize
137         SCOP_CONTEXT.
138         (build_loop_iteration_domains): Extract bounds on parameters
139         based on the data size.
140         (build_scop_context): Do not initialize SCOP_CONTEXT;
141         add new constraints.
142
143 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
144
145         * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
146         * graphite-ppl.h (graphite-ppl.h): Declared.
147
148 2009-10-17  Sebastian Pop  <sebastian.pop@amd.com>
149
150         * graphite-ppl.c (ppl_print_linear_expr): New.
151         (debug_ppl_linear_expr): New.
152         * graphite-ppl.h (ppl_print_linear_expr): Declared.
153         (debug_ppl_linear_expr): Declared.
154
155 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
156
157         * graphite-interchange.c: Fix comments.
158         * gcc.dg/graphite/block-1.c: Fix comments.
159
160 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
161
162         * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
163         * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
164
165 2009-10-16  Sebastian Pop  <sebastian.pop@amd.com>
166
167         Reapply the patch from Alexander Monakov that disappeared during
168         the last merges from trunk.
169
170         2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
171
172         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
173         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
174
175 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
176
177         * graphite-interchange.c (memory_stride_in_loop): The depth
178         argument corresponds to a dynamic time dimension, so use
179         psct_dynamic_dim to refer to the transformed scattering dimension.
180
181 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
182
183         * graphite-interchange.c (memory_stride_in_loop): Fix comments.
184
185 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
186
187         * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
188         root of the LST.
189         * graphite-interchange.c (lst_do_interchange): Avoid interchanging
190         the root of the LST.
191         * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
192         fake loop.
193         (print_lst): Print the root of LST in a different format.
194         * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
195
196 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
197
198         * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
199
200 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
201
202         * doc/passes.texi: Document the Graphite infrastructure.
203
204 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
205
206         * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
207         (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
208         and check the SSA representation.
209
210         * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
211
212 2009-10-15  Sebastian Pop  <sebastian.pop@amd.com>
213
214         * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
215
216 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
217
218         * gcc.dg/graphite/interchange-11.c: New.
219
220 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
221
222         * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
223
224 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
225
226         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
227         Add -fno-loop-strip-mine and -fno-loop-interchange.
228         (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
229         -fno-loop-strip-mine.
230         * gfortran.dg/graphite/graphite.exp: Same.
231
232 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
233
234         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
235         Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
236         (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
237         DEFAULT_FLAGS_GRAPHITE_IDENTITY.
238         (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
239         DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
240         (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
241         DEFAULT_FLAGS_GRAPHITE_SCOP.
242         (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
243         (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
244
245 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
246
247         * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
248
249 2009-10-14  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
250             Sebastian Pop  <sebastian.pop@amd.com>
251
252         * graphite-interchange.c (build_linearized_memory_access): Pass an
253         offset as parameter.
254         (memory_stride_in_loop): Include transform scattering in the
255         access functions to be able to querry the strides in the
256         transformed loops.
257         (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
258         not the psct_iterator_dim.
259
260 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
261
262         * graphite-blocking.c (pbb_do_strip_mine): Removed.
263         (lst_do_strip_mine_loop): New.
264         (lst_do_strip_mine): New.
265         (scop_do_strip_mine): Call lst_do_strip_mine.
266         * graphite-poly.h (lst_add_loop_under_loop): New.
267         (lst_find_first_pbb): New.
268
269 2009-10-14  Sebastian Pop  <sebastian.pop@amd.com>
270
271         * graphite-poly.c (loop_to_lst): Fix LST creation.
272
273 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
274
275         * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
276         sizeof(unsigned long) to make it run on 32bit systems.
277
278 2009-10-14  Tobias Grosser  <grosser@fim.uni-passau.de>
279
280         * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
281         SEGFAULT on 32bit.
282
283 2009-10-14  Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
284
285         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
286         Comment.
287         (write_alias_graph_to_ascii_dot): New.
288         (write_alias_graph_to_ascii_ecc): Ditto.
289         (partition_drs_to_sets): Add testing of optimality of current method
290         which assigns alias numbers according to DFS Comopnent number.  used
291         as heuristic for the upcoming ECC algorithm.
292         (build_scop_drs): Write to file also with the ecc and dot format.
293
294 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
295
296         * gfortran.dg/graphite/interchange-1.f: XFail.
297
298 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
299
300         * graphite.c (graphite_initialize): Do not handle functions with
301         more than 100 basic blocks.
302
303 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
304
305         * graphite-blocking.c (pbb_do_strip_mine): Use
306         PARAM_LOOP_BLOCK_TILE_SIZE.
307
308 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
309
310         * graphite-poly.c (dot_lst_1): New.
311         (dot_lst): New.
312         * graphite-poly.h (dot_lst): Declared.
313
314 2009-10-13  Sebastian Pop  <sebastian.pop@amd.com>
315
316         * graphite-dependences.c (dot_deps_stmt_1): New.
317         (dot_deps_stmt): New.
318         * graphite-dependences.h (dot_deps_stmt): Declared.
319
320 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
321
322         * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
323         not replace cross BB scalar dependences ending on PHI nodes.
324         (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
325
326 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
327
328         * graphite-poly.c (apply_poly_transforms): Implement the high
329         level driver for flag_loop_block.
330         * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
331         flag_loop_block.
332
333         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
334         -floop-block.
335         * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
336         Add -floop-block.
337
338 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
339
340         * graphite-poly.h (lst_find_pbb): New.
341         (find_lst_loop): New.
342
343 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
344
345         * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
346         * graphite-poly.h (struct scop): Remove dep_graph field.
347         (SCOP_DEP_GRAPH): Removed.
348
349 2009-10-09  Sebastian Pop  <sebastian.pop@amd.com>
350
351         * graphite-poly.h (copy_lst): Do full copy of LST.
352
353 2009-10-07  Sebastian Pop  <sebastian.pop@amd.com>
354
355         * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
356         when the loop stride is zero.
357
358         * gcc.dg/graphite/id-16.c: New.
359
360 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
361
362         * graphite-dependences.c (reduction_dr_1): New.
363         (reduction_dr_p): New.
364         (graphite_legal_transform_dr): Call reduction_dr_p.
365         (reduction_ddr): Renamed reduction_ddr_p.
366         * graphite-poly.h (same_pdr_p): New.
367         (number_of_write_pdrs): New.
368         * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
369         (split_reduction_stmt): Do not split reduction statements
370         when there are no writes to memory.
371         (translate_scalar_reduction_to_array_for_stmt): Insert the
372         memory reduction statement just after the scalar reduction statement.
373
374         * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
375         Un-XFAIL-ed.
376         * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
377         * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
378
379 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
380
381         * graphite-interchange.c (lst_apply_interchange): New.
382         (lst_interchange_profitable_p): New.
383         (lst_try_interchange_loops): New.
384         (lst_try_interchange): New.
385         (lst_do_interchange): New.
386         (pbb_do_interchange): Removed.
387         (scop_do_interchange): Call lst_do_interchange.
388
389 2009-10-06  Sebastian Pop  <sebastian.pop@amd.com>
390
391         * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
392         SCOP_TRANSFORMED_SCHEDULE.
393         (loop_to_lst): New.
394         (scop_to_lst): New.
395         (print_lst): New.
396         (debug_lst): New.
397         * graphite-poly.h (lst_p): New.
398         (struct lst): New.
399         (LST_LOOP_P): New.
400         (LST_LOOP_FATHER): New.
401         (LST_PBB): New.
402         (LST_SEQ): New.
403         (scop_to_lst): Declared.
404         (print_lst): Declared.
405         (debug_lst): Declared.
406         (new_lst_loop): New.
407         (new_lst_stmt): New.
408         (copy_lst): New.
409         (lst_depth): New.
410         (lst_dewey_number): New.
411         (struct scop): Add original_schedule and transformed_schedule fields.
412         (SCOP_ORIGINAL_SCHEDULE): New.
413         (SCOP_TRANSFORMED_SCHEDULE): New.
414         * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
415
416 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
417
418         * graphite-dependences.c (reduction_ddr): New.
419         (graphite_legal_transform_bb): Call reduction_ddr.
420         * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
421         Initialize PBB_IS_REDUCTION.
422         * graphite-poly.h (struct poly_bb): New bool field is_reduction.
423         (PBB_IS_REDUCTION): New.
424         (new_poly_bb): Update declaration.
425         * graphite-scop-detection.h (build_scop_bbs): Removed.
426         (nb_reductions_in_loop): Removed.
427         * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
428         parameter for reductions.
429         (try_generate_gimple_bb): Update call to new_poly_bb.
430         (build_scop_bbs_1): Same.
431         (build_scop_bbs): Same.
432         (gsi_for_phi_node): New.
433         (scalar_close_phi_node_p): Remove gcc_assert.
434         (split_reduction_stmt): New.
435         (is_reduction_operation_p): New.
436         (phi_contains_arg): New.
437         (follow_ssa_with_commutative_ops): New.
438         (detect_commutative_reduction_arg): New.
439         (detect_commutative_reduction_assign): New.
440         (follow_inital_value_to_phi): New.
441         (edge_initial_value_for_loop_phi): New.
442         (initial_value_for_loop_phi): New.
443         (detect_commutative_reduction): New.
444         (translate_scalar_reduction_to_array_for_stmt): New.
445         (insert_copyout): New.
446         (insert_copyin): New.
447         (translate_scalar_reduction_to_array): New.
448         (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
449         (rewrite_commutative_reductions_out_of_ssa_loop): New.
450         (rewrite_commutative_reductions_out_of_ssa): New.
451         (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
452         * sese.h (split_region_for_bb): New.
453
454         * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
455         * gcc.dg/graphite/interchange-1.c: Fix format.
456         * gcc.dg/graphite/interchange-10.c: New.
457
458 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
459
460         * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
461         buggy assert.
462
463 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
464
465         * graphite-sese-to-poly.c (scev_analyzable_p): New.
466         (rewrite_cross_bb_scalar_dependence): New.
467         (rewrite_cross_bb_scalar_deps): New.
468         (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
469         Call rewrite_cross_bb_scalar_deps.
470
471 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
472
473         * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
474         (insert_out_of_ssa_copy): Directly use gsi_after_labels and
475         gsi_for_stmt.
476
477 2009-10-05  Sebastian Pop  <sebastian.pop@amd.com>
478
479         * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
480         * graphite-interchange.c (pbb_do_interchange): Same.
481         * graphite-poly.c (print_scattering_function): Same.
482         (debug_pdrs): Same.
483         * graphite-poly.h (pbb_loop): New.
484         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
485
486 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
487
488         * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
489
490 2009-09-27  Sebastian Pop  <sebastian.pop@amd.com>
491
492         * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
493         so don't pass a pointer to it.
494         (build_alias_set_for_drs): Same.
495         (build_base_obj_set_for_drs): Same.
496         (build_scop_drs): Same.
497
498 2009-09-26  Li Feng  <nemokingdom@gmail.com>
499
500         * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
501         the alias graph of data references.
502
503 2009-09-25  Li Feng  <nemokingdom@gmail.com>
504
505         * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
506         (build_scop_drs): When debugging, write the alias graph to file,
507         otherwise, should be disabled.
508
509 2009-09-17  Sebastian Pop  <sebastian.pop@amd.com>
510
511         * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
512         (is_simple_operand): Remove call to stmt_simple_memref_p.
513         (stmt_simple_for_scop_p): Update call to is_simple_operand.
514
515 2009-09-17  David Edelsohn  <edelsohn@gnu.org>
516
517         * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
518         * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
519         * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
520         * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
521         * testsuite/gcc.dg/graphite/scop-sor.c: New File.
522
523 2009-09-17 Li Feng  <nemokingdom@gmail.com>
524
525         PR middle-end/41118
526         * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
527         (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
528         (graphite_carried_dependence_level_k): Ditto.
529         * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
530         * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
531         (new_poly_dr): Adjust declaration.
532         * graphite-sese-to-poly.c (free_data_refs_aux): New.
533         (free_gimple_bb): Added free_data_refs_aux.
534         (build_poly_dr): Add dr_base_object_set.
535         (partition_drs_to_sets): New.
536         (dr_same_base_object_p): New.
537         (build_alias_set_for_drs): New.
538         (build_base_object_set_for_drs): New.
539         (build_scop_drs): Add build_base_obj_set_for_drs.
540         * graphite-sese-to-poly.h: Added #define for alias set number index and
541         base object set index.
542         * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
543         * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
544
545 2009-09-16  Alexander Monakov  <amonakov@ispras.ru>
546
547         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
548         for ARRAY_REFs.  Use array_ref_{low,up}_bound to determine bounds.
549
550 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
551
552         * graphite-sese-to-poly.c (struct irp_data): Removed.
553         (idx_record_params): Removed.
554         (find_params_in_bb): Scan for parameters the access functions; don't
555         parse the tree representation.
556
557 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
558
559         * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
560         passes at -O1 and below.
561
562 2009-09-14  Sebastian Pop  <sebastian.pop@amd.com>
563
564         * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
565         tree-scalar-evolution.h, and then tree-data-ref.h.
566         * graphite-clast-to-gimple.c: Same.
567         * graphite-dependences.c: Same.
568         * graphite-interchange.c: Same.
569         * graphite-poly.c: Same.
570         * graphite-scop-detection.c: Same.
571         * graphite-sese-to-poly.c: Same.
572         * graphite.c: Same.
573         * lambda-code.c: Same.
574         * matrix-reorg.c: Same.
575         * tree-data-ref.c: Same.
576         * tree-if-conv.c: Same.
577         * tree-loop-distribu: Same.: Same.
578         * tree-loop-linear.c: Same.
579         * tree-parloops.c: Same.
580         * tree-predcom.c: Same.
581         * tree-vect-patterns.c: Same.
582
583 2009-09-02  Sebastian Pop  <sebastian.pop@amd.com>
584
585         Partially revert the previous patch, except the following.
586         * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
587         as parameters the operands of the not expression.
588
589 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
590
591         * tree-scalar-evolution.c (instantiate_scev_assign): New.
592         Do not call analyze_scalar_evolution on assignments.
593         (instantiate_scev_phi): Call analyze_scalar_evolution.
594         (instantiate_scev_name): Call instantiate_scev_assign and
595         instantiate_scev_phi.
596         (instantiate_scev_not): Adapted to pass as parameters the operands
597         of the not expression.
598
599 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
600
601         * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
602         to pass as parameters the operands of the binary expression.
603
604 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
605
606         * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
607         instantiate_scev_not.  Handle NEGATE_EXPR.
608         (instantiate_scev_r): Handle NEGATE_EXPR.
609
610 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
611
612         * tree-scalar-evolution.c (instantiate_scev_1): Renamed
613         instantiate_scev_r.
614         (instantiate_scev_r): Move code in instantiate_scev_2
615         and instantiate_scev_1.
616
617 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
618
619         * tree-scalar-evolution.c (instantiate_scev_3): New.
620         (instantiate_scev_1): Move code in instantiate_scev_3.
621
622 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
623
624         * tree-scalar-evolution.c (instantiate_scev_poly): New.
625         (instantiate_scev_1): Move code in instantiate_scev_poly.
626
627 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
628
629         * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
630         (instantiate_scev_1): Move code in instantiate_scev_bitnot.
631
632 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
633
634         * tree-scalar-evolution.c (instantiate_scev_convert): New.
635         (instantiate_scev_1): Move code in instantiate_scev_convert.
636
637 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
638
639         * tree-scalar-evolution.c (instantiate_scev_binary): New.
640         (instantiate_scev_1): Move code in instantiate_scev_binary.
641
642 2009-09-01  Sebastian Pop  <sebastian.pop@amd.com>
643
644         * tree-scalar-evolution.c (instantiate_scev_name): New.
645         (instantiate_scev_1): Move code in instantiate_scev_name.
646
647 2009-08-28  Sebastian Pop  <sebastian.pop@amd.com>
648
649         * Merge from mainline (150992:151171).
650
651 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
652
653         * graphite-dependences.c (graphite_legal_transform_bb): Call
654         pbb_remove_duplicate_pdrs.
655         * graphite-poly.c (can_collapse_pdr): Removed.
656         (pdr_find_duplicate): Removed.
657         (can_collapse_pdrs): New.
658         (pbb_remove_duplicate_pdrs): New.
659         (new_poly_dr): Do not look for duplicates.
660         * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
661         (PBB_PDR_DUPLICATES_REMOVED): New.
662         (pbb_remove_duplicate_pdrs): Declared.
663
664 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
665
666         * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
667         the strides by multiplying by PDR_NB_REFS.
668         * graphite-poly.c (can_collapse_pdr): New.
669         (pdr_find_duplicate): New.
670         (new_poly_dr): Call pdr_find_duplicate.  Collapse duplicate PDRs.
671         Initialize PDR_NB_REFS.
672         * graphite-poly.h (struct poly_dr): Add field nb_refs.
673         (PDR_NB_REFS): New.
674         (new_poly_dr): Number of subscripts is a graphite_dim_t.
675
676 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
677
678         Revert one of the previous commits:
679         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
680         the computation of symmetric data dependence relations.
681         (dependency_between_pbbs_p): Same.
682
683 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
684
685         PR middle-end/40965
686         * graphite-poly.c (apply_poly_transforms): Remove legality test before
687         any transform.
688
689 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
690
691         * graphite-dependences.c (pddr_original_scattering): Return NULL
692         for read-read dependence relations.
693         * graphite-poly.h (enum poly_dr_type): Fix comment.
694         (pdr_read_p): New.
695         (pdr_write_p): New.
696         (pdr_may_write_p): New.
697
698 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
699
700         * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
701         (struct poly_dr): Same.
702         (new_poly_dr): Same.
703         * graphite-poly.c (new_poly_dr): Same.
704
705 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
706             Sebastian Pop  <sebastian.pop@amd.com>
707
708         * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
709         pbb_strip_mine_time_depth.  Changed the implementation so that
710         transformation is expressed as a transformation on
711         time (scatttering) dimensions.  Also, ensures that the 2d+1
712         scheduling format is preserved.
713         (pbb_strip_mine_profitable_p): Profitability is based on the
714         iteration number of a given time (scattering) dimension,
715         and not on a original loop depth dimension.
716         (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
717         (pbb_do_strip_mine): Call psct_dynamic_dim.
718         * graphite-poly.c (pbb_number_of_iterations_at_time): New.
719         * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
720         (pbb_nb_dynamic_scattering_transform): New.
721         (psct_dynamic_dim): New.
722
723 2009-08-25  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
724
725         * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
726         * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
727         * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
728         * graphite-interchange.c (build_linearized_memory_access): Same.
729         (memory_stride_in_loop): Same.
730
731 2009-08-25  Sebastian Pop  <sebastian.pop@amd.com>
732
733         * graphite-dependences.c (pddr_original_scattering): New.
734         (graphite_legal_transform_dr): Call pddr_original_scattering.
735         (dot_deps_1): New.
736         (dot_deps): New.
737         * graphite-dependences.h (dot_deps): Declared.
738         * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
739         (print_pdr): Print PDR_ID.
740         * graphite-poly.h (struct poly_dr): Add field id.
741         (PDR_ID): New.
742         (pbb_index): New.
743         * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
744
745 2009-08-22  Sebastian Pop  <sebastian.pop@amd.com>
746
747         * graphite-dependences.c (graphite_carried_dependence_level_k): Do
748         not delete the original dependence relation.
749
750 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
751
752         * graphite-dependences.c (graphite_legal_transform_bb): Avoid
753         the computation of symmetric data dependence relations.
754         (dependency_between_pbbs_p): Same.
755
756 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
757
758         * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
759         (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
760         (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
761         (free_poly_ddr): New.
762         (pddr_is_empty): New.
763         (dependence_polyhedron_1): Now returns a poly_ddr_p.
764         (dependence_polyhedron): Same.  Remove useless gcc_assert.
765         Remove fprintfs.
766         (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
767         (graphite_carried_dependence_level_k): Call pddr_is_empty.
768         * graphite-dependences.h (enum poly_dependence_kind): New.
769         (poly_dr_pair): Renamed poly_ddr.  Added a field kind.
770         (PDRP_SOURCE): Renamed PDDR_SOURCE.
771         (PDRP_SINK): Renamed PDDR_SINK.
772         (PDRP_DDP): Renamed PDDR_DDP.
773         (PDDR_KIND): New.
774         (free_poly_ddr): Declared.
775         * graphite-poly.c (new_scop): Use the new hash function names.
776         * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
777         into original_pddrs.
778         (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
779
780 2009-08-21  Sebastian Pop  <sebastian.pop@amd.com>
781
782         * Merge from mainline (150764:150992).
783
784 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
785
786         * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
787         bounds with LT_EXPR to make niter analysis more precise on code
788         generated by Graphite.
789
790 2009-08-18  Sebastian Pop  <sebastian.pop@amd.com>
791
792         * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
793         (graphite_legal_transform_bb): Same.
794         (poly_drs_may_alias_p): Same.
795
796 2009-08-15  Sebastian Pop  <sebastian.pop@amd.com>
797
798         PR middle-end/40981
799         * graphite-ppl.c (ppl_max_for_le): Correct the use of
800         ppl_Pointset_Powerset_C_Polyhedron_maximize.
801
802 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
803
804         * graphite-poly.c (print_pbb): Print PBB index.
805
806 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
807
808         * Merge from mainline (r150672:150764).
809
810 2009-08-13  Sebastian Pop  <sebastian.pop@amd.com>
811
812         * graphite-interchange.c (ppl_max_for_le): Moved...
813         * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
814         * graphite-ppl.c (ppl_max_for_le): ... here.
815         * graphite-ppl.h (ppl_max_for_le): Declared.
816
817 2009-08-12  Sebastian Pop  <sebastian.pop@amd.com>
818
819         * Merge from mainline (r150372:150672).
820
821 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
822
823         PR middle-end/40980
824         * sese.c (convert_for_phi_arg): New.
825         (add_guard_exit_phis): Use convert_for_phi_arg.
826
827         * testsuite/gfortran.dg/graphite/id-17.f: New.
828
829 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
830
831         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
832         unknown subscript upper bounds.
833
834         * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
835
836 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
837             Pranav Garg  <pranav.garg2107@gmail.com>
838
839         * graphite-interchange.c (gather_access_strides): Removed.
840         (ppl_max_for_le): New.
841         (build_linearized_memory_access): New.
842         (memory_stride_in_loop): New.
843         (pbb_interchange_profitable_p): Reimplemented.
844         * graphite-ppl.h (ppl_new_id_map): New.
845         (ppl_interchange): New.
846
847         * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
848
849 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
850
851         * graphite-interchange.c (compute_subscript): Removed.
852         (compute_array_size_cstr): Removed.
853         (compute_array_size_poly): Removed.
854         (compute_array_size): Removed.
855         (gather_access_strides_poly): Removed.
856         (gather_access_strides): Empty.
857
858 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
859
860         * graphite-dependences.c (dependence_polyhedron_1): Replace
861         pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
862         (graphite_legal_transform_dr): Same.
863         (graphite_carried_dependence_level_k): Same.
864         * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
865         Initialize PDR_NB_SUBSCRIPTS.
866         (print_pdr_access_layout): Replace pdr_nb_subscripts with
867         PDR_NB_SUBSCRIPTS.
868         * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
869         (PDR_NB_SUBSCRIPTS): New.
870         (pdr_nb_subscripts): Removed.
871         (pdr_dim): Simplified.
872         * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
873         with PDR_NB_SUBSCRIPTS.
874
875 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
876
877         * graphite-interchange.c (compute_array_size): Remove use of
878         PDR_DATA_CONTAINER.
879         * graphite-poly.c (new_poly_dr): Remove argument data_container.
880         Do not initialize PDR_DATA_CONTAINER.
881         (print_pdr): Do not print PDR_DATA_CONTAINER.
882         * graphite-poly.h (struct poly_dr): Remove data_container field.
883         (PDR_DATA_CONTAINER): Removed.
884         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
885         PDR_DATA_CONTAINER.
886         (build_poly_dr): Same.
887
888 2009-08-11  Sebastian Pop  <sebastian.pop@amd.com>
889
890         * testsuite/gcc.dg/graphite/interchange-9.c: New.
891
892 2009-08-05  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
893             Sebastian Pop  <sebastian.pop@amd.com>
894
895         * graphite-dependences.c (graphite_legal_transform_dr): Work on a
896         copy of the dependence polyhedron.  Free the temporary objects.
897         (graphite_carried_dependence_level_k): Free unused objects before
898         returning.
899
900         * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
901         * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
902         * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
903         * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
904         * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
905
906 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
907
908         * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
909         Early return without analyzing the data dependences if no
910         transform has been done.  Call restore_scattering if the transform
911         is not legal.
912         (graphite-interchange.c): Same.
913         * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
914         (graphite_read_transforms): Initialize PBB_TRANSFORMED.
915         (apply_poly_transforms): Do not gcc_assert that
916         the transform is legal.
917         (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
918         Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
919         PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
920         (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
921         * graphite-poly.h (struct poly_scattering): New.
922         (struct poly_bb): Add original, transformed, and saved fields.
923         Remove transformed_scattering, original_scattering, nb_local_variables,
924         and nb_scattering_transform fields.
925         (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
926         (poly_scattering_new): New.
927         (poly_scattering_free): New.
928         (poly_scattering_copy): New.
929         (store_scattering_pbb): New.
930         (store_scattering): New.
931         (restore_scattering_pbb): New.
932         (restore_scattering): New.
933         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
934         Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
935
936 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
937
938         * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
939         (print_scop): Same.
940
941 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
942
943         * Makefile.in (graphite.o): Depends on PREDICT_H.
944         * graphite.c: Include predict.h.
945         (graphite_finalize): Call tree_estimate_probability.
946         * predict.c (predict_loops): Do not call scev_initialize and
947         scev_finalize.
948         (tree_estimate_probability_bb): New.
949         (tree_estimate_probability): Do not initialize loops: move that
950         code to the driver.  Call tree_estimate_probability_bb.
951         (tree_estimate_probability_driver): New.
952         (pass_profile): Use tree_estimate_probability_driver.
953         * predict.h (tree_estimate_probability): Declared.
954
955 2009-08-05  Sebastian Pop  <sebastian.pop@amd.com>
956
957         * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
958         * graphite-dependences.c (graphite_legal_transform): Add time to
959         TV_GRAPHITE_DATA_DEPS.
960         (dependency_between_pbbs_p): Same.
961         * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
962
963 2009-08-03  Sebastian Pop  <sebastian.pop@amd.com>
964
965         * Merge from mainline (r149952:150372).
966
967 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
968
969         * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
970         * graphite-blocking.c: Same.
971         * graphite-clast-to-gimple.c: Same.
972         * graphite-dependences.c: Same.
973         * graphite-poly.c: Same.
974         * graphite-poly.h: Same.
975         * graphite-ppl.c: Same.
976         * graphite-scop-detection.c: Same.
977         * graphite-sese-to-poly.c: Same.
978         * graphite.c: Same.
979
980 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
981
982         * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
983         (remove_simple_copy_phi): New.
984         (remove_invariant_phi): New.
985         (simple_copy_phi_p): New.
986         (reduction_phi_p): New.
987         (gsi_for_ssa_name_def): New.
988         (insert_out_of_ssa_copy): New.
989         (insert_out_of_ssa_copy_on_edge): New.
990         (create_zero_dim_array): New.
991         (scalar_close_phi_node_p): New.
992         (rewrite_close_phi_out_of_ssa): New.
993         (rewrite_phi_out_of_ssa): New.
994         (rewrite_reductions_out_of_ssa): New.
995         (build_poly_scop): Call rewrite_reductions_out_of_ssa.
996
997         * testsuite/gcc.dg/graphite/id-11.c: New.
998         * testsuite/gcc.dg/graphite/id-15.c: New.
999         * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
1000         * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
1001         * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
1002         * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
1003         * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
1004         * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
1005         * testsuite/gfortran.dg/graphite/id-13.f: New.
1006         * testsuite/gfortran.dg/graphite/id-5.f: New.
1007
1008 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1009
1010         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
1011         check that nb_reductions_in_loop is zero.
1012         * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
1013         reduction phi nodes.
1014         (nb_reductions_in_loop): Removed.
1015         (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
1016         * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
1017         (bb_contains_non_iv_scalar_phi_nodes): Removed.
1018         (scop_contains_non_iv_scalar_phi_nodes): Removed.
1019         (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
1020
1021 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1022
1023         * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
1024         statements that have an empty iteration domain.
1025         * testsuite/gfortran.dg/graphite/id-16.f: New.
1026
1027 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1028
1029         * tree-scalar-evolution.c (instantiate_scev_1): Return
1030         chrec_dont_know when the result is not above instantiate_below.
1031         * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
1032         * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
1033         the tree has a known scalar evolution.
1034         * testsuite/gfortran.dg/graphite/id-14.f: New.
1035         * testsuite/gfortran.dg/graphite/id-15.f: New.
1036
1037 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1038
1039         * sese.c (rename_variables_in_stmt): Pass in an extra parameter
1040         insert_gsi.
1041         (rename_variables): Keep inserting renames after the ones already
1042         inserted.
1043
1044 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1045
1046         * graphite-sese-to-poly.c (compare_bb_depths): New.
1047         (graphite_sort_dominated_info): New.
1048         (build_scop_bbs_1): Call graphite_sort_dominated_info.
1049         (build_scop_scattering): Fix comment.
1050
1051 2009-07-28  Sebastian Pop  <sebastian.pop@amd.com>
1052
1053         * graphite.c (graphite_finalize): Call print_loops instead of
1054         dump_function_to_file.
1055         * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1056         * testsuite/gcc.dg/graphite/pr35356-1.c: New.  Look for the number of
1057         loops generated in the graphite output file.
1058         * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1059         * testsuite/gcc.dg/graphite/pr35356-3.c: New.  XFAILed for now.
1060         * testsuite/gfortran.dg/graphite/id-12.f: New.
1061
1062 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1063
1064         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1065         Remove 2 XFAIL.
1066
1067 2009-07-24  Li Feng  <nemokingdom@gmail.com>
1068             Tobias Grosser  <grosser@fim.uni-passau.de>
1069
1070         * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1071         alias set number build alias in ACCESSES polyhedron.
1072         (build_alias_set_for_drs): New.
1073         (build_pbb_drs): Added build_alias_set_for_drs.
1074         * graphite-dependences.c (poly_drs_may_alias_p): New.
1075         (graphite_carried_dependence_level_k): Check alias information
1076         before building polyhedron.
1077
1078 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1079
1080         * Makefile.in (lambda-code.o): Fix formatting.
1081
1082 2009-07-24  Tobias Grosser  <grosser@fim.uni-passau.de>
1083
1084         * Merge from mainline (r149350-149952)
1085
1086 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1087
1088         * graphite-poly.c (apply_poly_transforms): Move strip_mine
1089         before interchange to prepare for loop blocking.
1090
1091 2009-07-18  Tobias Grosser  <grosser@fim.uni-passau.de>
1092
1093         * graphite-poly.c (apply_poly_transforms): Add checks after every
1094         transformation.
1095         * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1096         done in apply_poly_transforms.
1097
1098 2009-07-17  Konrad Trifunovic  <konrad.trifunovic@gmail.com>
1099
1100         * graphite-dependences.c (build_lexicographically_gt_constraint):
1101         Replace RES parameter with *RES.
1102         (dependence_polyhedron_1): Pass an address of the parameter RES
1103         instead of value of RES.
1104
1105 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1106
1107         * graphite.c (graphite_finalize): Fix comment.
1108         (graphite_transform_loops): Reset scev info after code generation
1109         of each scop.
1110
1111 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1112
1113         * graphite.c (graphite_finalize): Call scev_reset.
1114
1115 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1116
1117         * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1118         GBB_CLOOG_IV_TYPES hash table twice.
1119         * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1120         (add_condition_to_domain): Clear GMP values.
1121
1122 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1123
1124         * graphite-dependences.c: Fix formatting.
1125         * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1126         (pbb_number_of_iterations): Free ppl_Linear_Expression.
1127         * graphite-sese-to-poly.c: Fix formatting.
1128         * graphite.c (graphite_transform_loops): Create the hash table
1129         after the early return.
1130
1131 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1132
1133         * testsuite/gcc.dg/graphite/id-14.c: New.
1134         * testsuite/gcc.dg/graphite/pr40157.c: New.
1135         * testsuite/gfortran.dg/graphite/id-11.f: New.
1136
1137 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1138
1139         * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1140         (build_poly_scop): Return false when there are no pbbs within
1141         loops to avoid to pass to cloog scops with no loops.
1142
1143 2009-07-16  Sebastian Pop  <sebastian.pop@amd.com>
1144
1145         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1146         useless test "i % 2".
1147         (build_pbb_scattering_polyhedrons): Fix formatting.
1148         (build_poly_dr): Same.
1149         * graphite.c (graphite_transform_loops): Restructure.
1150
1151 2009-07-14  Razya Ladelsky  <razya@il.ibm.com>
1152
1153         * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1154         reduction_list parameter.
1155         (rewrite_all_phi_nodes_with_iv): Same.
1156         (canonicalize_loop_ivs): Same.
1157         * tree-parloops.c (struct brli): Removed.
1158         (build_reduction_list_info): Removed.
1159         (build_new_reduction): New.
1160         (analyze_reduction_list): Removed.
1161         (gather_scalar_reductions): Find reductions instead of phi
1162         nodes that can't be canonicalized.
1163         (try_create_reduction_list): Remove reduction_list parameter.
1164         (gen_parallel_loop): Same.
1165         (parallelize_loops): Remove analyze_reductions variable,
1166         initialization and free.
1167         Change reduction_list htab initialization to reduction_info
1168         elements instead of ssa names.
1169         Call try_create_reduction_list and gen_parallel_loop without
1170         analyzed_reduction argument.
1171         * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1172         canonicalize_loop_ivs with one less argument.
1173         * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1174
1175 2009-07-14  Konrad Trifunovic <konrad.trifunovic@gmail.com>
1176
1177         * graphite-dependences.c (new_poly_dr_pair): New.
1178         (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1179         (new_poly_dr_pair): New.
1180         (eq_poly_dr_pair_p): New.
1181         (hash_poly_dr_pair_p): New.
1182         * graphite-dependences.h (struct poly_dr_pair): New.
1183         (eq_poly_dr_pair_p): Declared.
1184         (hash_poly_dr_pair_p): Declared.
1185         * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1186         (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1187         * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1188         * Makefile.in (graphite-poly.o): Add dependence on
1189         graphite-dependences.h.
1190
1191 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1192
1193         * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1194         polynomials of degree > 1 pass to Graphite.
1195         * tree-chrec.c (scev_is_linear_expression): Call
1196         evolution_function_is_affine_multivariate_p.
1197         * testsuite/gfortran.dg/graphite/id-10.f90: New.
1198
1199 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1200
1201         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1202         Instantiate scevs varying in outer loops.
1203         * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1204
1205 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1206
1207         * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1208         redundant constraint.
1209
1210 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1211
1212         * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1213         * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1214         based on the file names as in the C testsuite.
1215         * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1216         * testsuite/gfortran.dg/graphite/block-2.f: Same.
1217         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1218         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1219         * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1220         * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1221         * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1222         * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1223         * testsuite/gfortran.dg/graphite/id-6.f: Same.
1224         * testsuite/gfortran.dg/graphite/id-9.f: Same.
1225         * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1226         * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1227         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1228
1229 2009-07-14  Sebastian Pop  <sebastian.pop@amd.com>
1230
1231         * sese.c (expand_scalar_variables_call): New.
1232         (expand_scalar_variables_ssa_name): Handle calls in expander.
1233
1234 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1235
1236         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1237         Expect to see the pattern twice.
1238         * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1239         * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1240         * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1241
1242 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1243
1244         * testsuite/gcc.dg/graphite/id-10.c: New.
1245         * testsuite/gcc.dg/graphite/id-12.c: New.
1246         * testsuite/gfortran.dg/graphite/id-7.f: New.
1247         * testsuite/gfortran.dg/graphite/id-8.f: New.
1248
1249 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1250
1251         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1252         zero.
1253
1254 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1255
1256         * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1257
1258 2009-07-13  Sebastian Pop  <sebastian.pop@amd.com>
1259
1260         * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1261
1262 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1263
1264         * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1265         building PDR subscripts.
1266
1267 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1268
1269         * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1270         computation of array sizes.
1271
1272 2009-07-10  Sebastian Pop  <sebastian.pop@amd.com>
1273
1274         * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1275
1276 2009-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
1277
1278         * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1279         build_pairwise_constraint, dr_equality_constraints,
1280         build_pairwise_scheduling_equality,
1281         build_pairwise_scheduling_inequality, lexicographically_gt_p,
1282         build_lexicographically_gt_constraint, dependence_polyhedron,
1283         graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1284         Move from NNC_Polyhedron to C_Polyhedron.
1285         * graphite-interchange.c (compute_array_size_poly,
1286         gather_access_strides): Dito.
1287         * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1288         free_scop, pbb_number_of_iterations): Dito.
1289         * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1290         pbb_dim_iter_domain, struct scop): Dito.
1291         * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1292         new_Cloog_Domain_from_ppl_Polyhedron,
1293         new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1294         ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1295         ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1296         ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1297         debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1298         * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1299         new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1300         debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1301         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1302         build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1303         add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1304         build_scop_iteration_domain, build_poly_dr): Dito
1305
1306 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1307
1308         * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1309         run-id-*.c files.
1310         * testsuite/gcc.dg/graphite/run-id-1.c: New.
1311
1312 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1313
1314         * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1315         positivity constraint on the symbolic number of iterations.
1316
1317 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1318
1319         * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1320
1321 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1322             Tobias Grosser  <grosser@fim.uni-passau.de>
1323
1324         * graphite-clast-to-gimple.c (build_scop_context): Removed.
1325         (build_cloog_prog): Directly use SCOP_CONTEXT.
1326         * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1327         (free_scop): Free SCOP_CONTEXT.
1328         (print_scop_context): New.
1329         (print_scop): Call print_scop_context.
1330         (debug_scop_context): New.
1331         * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1332         (struct scop): Added field context.
1333         (SCOP_CONTEXT): New.
1334         * graphite-sese-to-poly.c (add_param_constraints): New.
1335         (build_scop_context): New.
1336         (build_poly_scop): Call build_scop_context.
1337
1338 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1339
1340         * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1341         * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1342         (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1343         * graphite-ppl.h: Include double-int.h and tree.h.
1344         (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1345         (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1346         (gmp_cst_to_tree): ...here.  Reimplemented using mpz_get_double_int.
1347         (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1348
1349 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1350
1351         * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1352         POINTER_PLUS_EXPR for pointer types.
1353         (clast_to_gcc_expression): Same.
1354
1355 2009-07-09  Sebastian Pop  <sebastian.pop@amd.com>
1356
1357         * graphite-poly.c (print_scattering_function): Early return when
1358         PBB_TRANSFORMED_SCATTERING is not initialized.
1359         (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1360
1361 2009-07-08  Sebastian Pop  <sebastian.pop@amd.com>
1362
1363         * tree-parloops.c (analyze_reduction_list): Remove unused variable
1364         to fix bootstrap.
1365
1366 2009-07-08  Razya Ladelsky  <razya@il.ibm.com>
1367
1368         * tree-parloops.c (analyze_reduction_list): Change return
1369         value to void.
1370         (try_create_reduction_list): Move the call to
1371         analyze_reduction_list to the beginining.
1372         Call reduction_phi with analyzed_reductions as argument
1373         instead of reduction_list.
1374
1375 2009-07-08  Tobias Grosser  <grosser@fim.uni-passau.de>
1376
1377         *  Merge from mainline (r148296:149346)
1378
1379 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1380
1381         * graphite-scop-detection.c (graphite_can_represent_init): New.
1382         (graphite_can_represent_scev): Call graphite_can_represent_init:
1383         check that the initial value does not contain multiplications of
1384         parameters.
1385         (stmt_has_simple_data_refs_p): New.
1386         (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1387         (is_simple_operand): Fix formatting.
1388         * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1389
1390 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1391
1392         * testsuite/gcc.dg/graphite/id-13.c: New.
1393         * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1394         analyze_scalar_evolution, use scalar_evolution_in_region.
1395         (scan_tree_for_params_right_scev): Add extra assert.
1396         (parameter_index_in_region_1): Split from parameter_index_in_region.
1397         (idx_record_params): Use scalar_evolution_in_region.
1398         (find_params_in_bb): Same.
1399         (find_scop_parameters): Same.
1400         (build_loop_iteration_domains): Same.
1401         (create_linear_expr_from_tree): Same.
1402         * sese.c (scalar_evolution_in_region): New.
1403         * sese.h (scalar_evolution_in_region): Declared.
1404         (defined_in_sese_p): New.
1405         * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1406         static anymore.
1407         * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1408         Declared.
1409
1410 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1411
1412         * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1413         TREE_DATA_REF_H also implies SCEV_H.
1414
1415 2009-07-07  Sebastian Pop  <sebastian.pop@amd.com>
1416
1417         * graphite-poly.c (print_scop_params): New.
1418         (print_scop): Call print_scop_params.
1419         (debug_scop_params): New.
1420         * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1421
1422 2009-07-07  Li Feng  <nemokingdom@gmail.com>
1423
1424         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1425         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1426         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1427         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1428         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1429         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1430
1431 2009-07-07  Li Feng  <nemokingdom@gmail.com>
1432
1433         * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1434         for dependency checking part.
1435         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1436         tests for dependency checking.
1437         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1438         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1439         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1440         flag -fdump-tree-graphite-all for autopar testsuites.
1441
1442 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
1443
1444         * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1445         * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1446         canonicalize_loop_ivs): Moved...
1447         * tree-ssa-loop-manip.c: ... here.  Include langhooks.h.
1448
1449 2009-07-06  Sebastian Pop  <sebastian.pop@amd.com>
1450
1451         * tree-parloops.c (try_create_reduction_list): Pass an extra
1452         argument analyzed_reductions.  Call analyze_reduction_list.
1453         (gen_parallel_loop): Do not call analyze_reduction_list.
1454         (parallelize_loops): Init and finalize analyzed_reductions.
1455
1456 2009-07-06  Li Feng  <nemokingdom@gmail.com>
1457
1458         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1459         Added flag -fno-loop-strip-mine for autopar testcase.
1460
1461 2009-07-04  Li Feng  <nemokingdom@gmail.com>
1462
1463         * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1464         transformed scattering dimension instead of unmatch orignal when
1465         calling dependence_polyhedron.
1466
1467 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1468
1469         * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1470
1471 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1472
1473         * graphite-poly.c (pbb_number_of_iterations): Check for returned
1474         value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1475
1476 2009-06-30  Sebastian Pop  <sebastian.pop@amd.com>
1477
1478         * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1479         (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1480         * graphite-poly.c (pbb_number_of_iterations): New.
1481         * graphite-poly.h (pbb_number_of_iterations): Declared.
1482         (pbb_iterator_dim, pbb_parameter_dim): New.
1483
1484 2009-06-29  Sebastian Pop  <sebastian.pop@amd.com>
1485
1486         * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1487         last commit on type of lower and upper bound of loops.
1488
1489 2009-06-29  Li Feng  <nemokingdom@gmail.com>
1490
1491         * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1492         graphite-dependences.h.
1493         * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1494         (mark_bb_with_pbb): New.
1495         (get_stmtfor_depth): New.
1496         (find_pbb_via_hash): New.
1497         (dependency_in_loop_p): New.
1498         (mark_loops_parallel): New.
1499         (free_aux_in_new_loops): New.
1500         (translate_clast): Add parameter BB_PBB_MAPPING.  Mark newly created
1501         bb with it's relevant pbb. Mark newly created loops.  Remove mark
1502         innermost loop parallel without checking.
1503         (gloog): Add parameter BB_PBB_MAPPING.
1504         * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1505         (gloog): Change declaration.
1506         (mark_loop_parallel): Make extern.
1507         (free_aux_in_new_loops): Declare.
1508         (bb_pbb_map_hash): New.
1509         (eq_bb_pbb_map): New.
1510         * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1511         auto parallelization when flag_graphite_force_parallel is set.
1512         (graphite_finalize): Added free_aux_in_new_loops.
1513         * tree-parloops.c (parallelize_loops): Only generate parallel code for
1514         the innermost loop that marked parallel.  Use
1515         flag_graphite_force_parallel instead of loop->can_be_parallel.
1516         (loop_parallel_p): Move inner most checking out of function.
1517
1518 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1519
1520         * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1521         type of lower and upper bound of loops signed long int.
1522
1523 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1524
1525         * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1526         expression outside the loop.
1527
1528 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1529
1530         * gcc.dg/graphite/interchange-8.c: New.
1531
1532 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1533
1534         * gcc.dg/graphite/interchange-0.c: XFailed.
1535         * gcc.dg/graphite/interchange-5.c: XFailed.
1536         * gcc.dg/graphite/interchange-6.c: XFailed.
1537
1538 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1539
1540         * graphite-interchange.c (compute_array_size_poly): The end of the
1541         recursion should return 1.
1542
1543 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1544
1545         * graphite-interchange.c (compute_array_size_cstr): Allow the
1546         subscript multiplier to be -1.
1547         (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1548         * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1549         data_container.  Initializes PDR_DATA_CONTAINER.
1550         (print_pdr_access_layout): New.
1551         (print_pdr): Call print_pdr_access_layout.  Print PDR_DATA_CONTAINER.
1552         * graphite-poly.h (struct poly_dr): Adjust comment.  Add a new field
1553         data_container.
1554         (PDR_DATA_CONTAINER): New.
1555         (new_poly_dr): Update declaration.
1556         * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1557         (build_poly_dr): Call pdr_add_data_dimensions.
1558
1559 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1560
1561         * graphite-poly.h (struct poly_dr): Fix comment.
1562         * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1563         (pdr_add_memory_accesses): New.
1564         (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1565
1566 2009-06-26  Sebastian Pop  <sebastian.pop@amd.com>
1567
1568         * graphite-poly.c (print_pdrs, debug_pdrs): New.
1569         (print_pbb): Add call to print_pdrs.
1570         * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1571
1572 2009-06-24  Konrad Trifunovic <konrad.trifunovic@gmail.com>
1573             Li Feng <nemokingdom@gmail.com>
1574
1575         * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1576         (dependency_between_pbbs_p): New.
1577         (lexicographically_gt_p): Assure !empty_p before polyhedron
1578         intersection assign.
1579         (build_lexicographically_gt_constraint): Correct lexicographically
1580         judging.
1581         * graphite-dependences.h: New.
1582         * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1583
1584 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1585
1586         * graphite-clast-to-gimple.c (print_clast_stmt): New.
1587         (gloog): Print to dump_file the generated clast.
1588         * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1589         * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1590
1591 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1592
1593         * graphite-poly.c (extend_scattering): Increment
1594         PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1595
1596 2009-06-24  Sebastian Pop  <sebastian.pop@amd.com>
1597
1598         * graphite-interchange.c (compute_array_size_poly): Added exit of
1599         recursion condition.  Continue iterating even after the first equality.
1600         (compute_array_size): Same.
1601
1602 2009-06-24  Li Feng  <nemokingdom@gmail.com>
1603
1604         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1605         -fdump-tree-final_cleanup to -fdump-tree-optimized.
1606         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1607         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1608         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1609
1610 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1611
1612         * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1613         only when the use verifies is_gimple_reg.
1614
1615 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1616
1617         * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1618         Allocate scaldims after call to unify_scattering_dimensions.
1619
1620 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1621
1622         * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1623
1624 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1625             Albert Cohen  <albert.cohen@inria.fr>
1626
1627         * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1628         variables for the strip mining.
1629
1630 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1631             Pranav Garg  <pranav.garg2107@gmail.com>
1632
1633         * Makefile.in (OBJS-common): Added graphite-blocking.o.
1634         (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1635         (graphite-blocking.o): New rule.
1636         (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1637         * graphite-blocking.c: New.
1638         * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1639         flag_loop_strip_mine.
1640         (psct_scattering_dim_for_loop_depth): New.
1641         * graphite-poly.h (scop_do_strip_mine): Declared.
1642         (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1643         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1644         flag_loop_strip_mine.
1645
1646 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1647
1648         * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1649         a GMP value and a PPL coefficient at each iteration of a loop.
1650
1651 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1652
1653         * graphite-dependences.c (dependence_polyhedron): Do not use
1654         pbb_nb_scattering_dims anymore.  Use pbb_nb_scattering_orig and
1655         pbb_nb_scattering_transform.
1656         (graphite_legal_transform_dr): Same.
1657         * graphite-poly.c (extend_scattering): Same.
1658         (unify_scattering_dimensions): Same.
1659         (print_scattering_function): Same.
1660         (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1661         PBB_NB_LOCAL_VARIABLES.
1662         * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1663         (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1664         (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1665         (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1666         (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1667         (pbb_nb_scattering_transform): New.
1668         (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1669         (psco_scattering_dim): Add assert on parameters.
1670         (psct_scattering_dim): Same.
1671         (psct_scattering_dim_for_loop_depth): Declared.
1672         (psct_local_var_dim): New.
1673         (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1674         (psct_iterator_dim, psct_parameter_dim): Same.  To maintain the
1675         correct layout, call pbb_nb_local_vars.
1676         (psct_add_local_variable, psct_add_scattering_dimension): New.
1677         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1678         Initialize PBB_NB_SCATTERING_TRANSFORM.
1679
1680 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1681
1682         * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1683         (set_coef): Renamed ppl_set_coef.
1684         * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1685
1686 2009-06-23  Sebastian Pop  <sebastian.pop@amd.com>
1687
1688         * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1689         test a boolean against 1.
1690         * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1691         a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1692         (pbb_do_interchange): Returns true when a transform has been performed.
1693         (scop_do_interchange): Same.
1694         * graphite-poly.c (apply_poly_transforms): Use the return value of
1695         scop_do_interchange.
1696         * graphite-poly.h (scop_do_interchange): Update declaration.
1697
1698 2009-06-23  Tobias Grosser  <grosser@fim.uni-passau.de>
1699
1700         * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1701         after last use.
1702         * sese.c (sese_reset_aux_in_loops): New.
1703         * sese.h (sese_reset_aux_in_loops): New.
1704
1705 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1706
1707         * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1708         multiplier and multiply the constant by the multiplier.
1709         (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1710         (build_poly_dr): Do not use the multiplier to define the subscript.
1711
1712 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1713
1714         * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1715         compiler's data reference.  Initialize PDR_CDR.
1716         (print_pdr): Call dump_data_reference.
1717         * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1718         Add compiler_dr field.
1719         (PDR_BB): Renamed PDR_PBB.
1720         (PDR_CDR): New.
1721         * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1722         GCC's data reference representation.
1723         * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1724         * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1725
1726 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1727
1728         * graphite-poly.c (print_scattering_function): Also print the layout.
1729         * graphite-poly.h (pbb_nb_local_vars): New.
1730
1731 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1732
1733         * graphite-poly.c (print_pbb_domain): Also print the layout names.
1734
1735 2009-06-19  Sebastian Pop  <sebastian.pop@amd.com>
1736
1737         * graphite-poly.c (print_pdr, debug_pdr): New.
1738         * graphite-poly.h (print_pdr, debug_pdr): Declared.
1739         (PDR_BASE): Removed.
1740
1741 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1742
1743         * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1744         ltrans-{1..6,8}.c.
1745
1746 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1747
1748         * graphite-interchange.c (compute_subscript): Allow also -1 in the
1749         subscript identification column.
1750         (pbb_do_interchange): Print to dump_file that some loops "will be
1751         interchanged".  Rely on that chain of characters in the testcases.
1752         * gcc.dg/graphite/interchange-0.c: New.
1753         * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1754         interchange-*.c files and compile them with -floop-interchange.
1755
1756 2009-06-18  Pranav Garg  <pranav.garg2107@gmail.com>
1757
1758         * graphite-interchange.c (interchange_profitable_p): Renamed
1759         pbb_interchange_profitable_p.
1760
1761 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1762             Harsha Jagasia  <harsha.jagasia@amd.com>
1763             Pranav Garg  <pranav.garg2107@gmail.com>
1764
1765         * graphite-interchange.c (interchange_profitable_p): Make static.
1766         (pbb_interchange_loop_depths, pbb_do_interchange,
1767         scop_do_interchange): New.
1768         * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1769         for flag_loop_interchange.
1770         * graphite-poly.h (scop_do_interchange): Declared.
1771         * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1772         flag_loop_interchange is used.
1773
1774 2009-06-18  Sebastian Pop  <sebastian.pop@amd.com>
1775
1776         * graphite-dependences.c (dependence_polyhedron): Update use of
1777         pbb_nb_scattering_dims.
1778         * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1779         (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1780         (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1781         psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1782
1783 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1784
1785         * graphite.c: Cleanup foo.
1786
1787 2009-06-16  Sebastian Pop  <sebastian.pop@amd.com>
1788
1789         * Merge from mainline (r143684:148293).
1790         * Disabled libpcp until it gets fixed.
1791
1792 2009-06-05  Sebastian Pop  <sebastian.pop@amd.com>
1793             Harsha Jagasia  <harsha.jagasia@amd.com>
1794
1795         * graphite-interchange.c: New.
1796         * Makefile.in (graphite-interchange.o): New.
1797         * graphite-poly.h (interchange_profitable_p): Declared.
1798         * graphite-ppl.h (value_max): New.
1799
1800 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1801
1802         * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1803         * graphite-poly.h: Fix some comments.
1804         (pdr_dim): New.
1805         (pdr_scop): New.
1806
1807 2009-06-04  Sebastian Pop  <sebastian.pop@amd.com>
1808
1809         * graphite-poly.h
1810         (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1811         (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1812         (pdr_accessp_nb_params): Renamed pdr_nb_params.
1813         (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1814         (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1815         (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1816         (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1817         (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1818         * graphite-clast-to-gimple.c: Same.
1819         * graphite-dependences.c: Same.
1820         * graphite-poly.c: Same.
1821         * graphite-sese-to-poly.c: Same.
1822
1823 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1824
1825         * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1826         expressions for an IV rename, as returned by clast_to_gcc_expression.
1827         (copy_renames): Rename new_name to expr.
1828         * sese.c (debug_rename_elt): Same.
1829         (get_rename): Same.
1830         (set_rename): Same.
1831         (sese_adjust_liveout_phis): Call force_gimple_operand before using
1832         the information from the rename map.
1833         (rename_variables_in_stmt): Same.
1834         (add_loop_exit_phis): Rename new_name to expr.
1835         (insert_loop_close_phis): Same.
1836         (add_guard_exit_phis): Same.  Call force_gimple_operand.
1837         * sese.h (struct rename_map_elt): Rename new_name to expr.
1838         (new_rename_map_elt): Same.
1839
1840 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1841
1842         * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1843         * sese.c (set_rename): Make it extern.
1844         * sese.h (set_rename): Declared.
1845
1846 2009-06-03  Sebastian Pop  <sebastian.pop@amd.com>
1847
1848         * graphite-poly.c (extend_scattering): Free values.
1849         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1850         Free iterators.
1851         (ppl_print_powerset_matrix): Same.
1852         * graphite-scop-detection.c (free_scops_1): New.
1853         (limit_scops): Call free_scops_1.
1854         * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1855         (build_poly_dr): Free PPL coefficients.
1856         * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1857
1858 2009-06-02  Sebastian Pop  <sebastian.pop@amd.com>
1859
1860         * graphite-dependences.c: New.
1861         * graphite-data-ref.c: Removed.
1862         * graphite-data-ref.h: Removed.
1863         * Makefile.in (graphite-data-ref.o): Removed.
1864         (graphite-dependences.o): Added.
1865         * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1866         * graphite-poly.c: Same.
1867         Move the data dependence testing to graphite-dependences.c.
1868
1869 2009-05-19  Tobias Grosser  <grosser@fim.uni-passau.de>
1870
1871         * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1872         from graphite_cannot_represent_loop. Code refactored.
1873         (scopdet_basic_block_info): Call graphite_can_represent_loop.
1874
1875 2009-05-17  Li Feng  <nemokingdom@gmail.com>
1876
1877         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1878         Cover all the testcases (not only the filtered ones).
1879
1880 2009-05-17  Tobias Grosser  <grosser@fim.uni-passau.de>
1881
1882         * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1883         unnecessary check. Update comments. Move check for REAL_TYPE here.
1884         (harmful_stmt_in_bb): Remove checks for conditions. This is already
1885         done in (stmt_simple_for_scop_p).
1886
1887 2009-05-14 Tobias Grosser  <grosser@fim.uni-passau.de>
1888
1889         * graphite.c (print_global_statistics): New.
1890         (print_graphite_scop_statistic): New.
1891         (print_graphite_statistics): New.
1892         (graphite_initialize, graphite_transform_loops): Print statistics.
1893         * graphite-scop-detection (build_scops): Print statistics.
1894         (print_graphite_scop_statistics): New.
1895         (print_graphite_statistics): New.
1896
1897 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1898
1899         * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1900         (debug_clast_name_index): Removed.
1901         (debug_clast_name_indexes_1): Removed.
1902         (debug_clast_name_indexes): Removed.
1903         (clast_name_index_elt_info): Removed.
1904         (eq_clast_name_indexes): Removed.
1905         (clast_name_to_index): Removed.
1906         (new_clast_name_index): Removed.
1907         (save_clast_name_index): Removed.
1908         (save_var_name): Moved...
1909         (init_sese_params_index): Removed.
1910         (clast_name_to_gcc): Remove use of name_tree.
1911         (initialize_cloog_names): Same.
1912         (gloog): Do not call init_sese_params_index.
1913         * graphite-sese-to-poly.c (save_var_name): ...here.
1914         (parameter_index_in_region): New.
1915         * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1916         (parameter_index_in_region): Removed.
1917         (is_parameter): Remove use of name_tree.
1918         * sese.h (struct name_tree): Removed.
1919         (struct sese): Remove use of name_tree.  New field params_names.
1920         (SESE_PARAMS_NAMES): New.
1921         (SESE_PARAMS): Remove duplicate.
1922         (parameter_index_in_region): Removed.
1923         (sese_nb_params): Remove use of name_tree.
1924         (struct clast_name_index): New.
1925         (new_clast_name_index): New.
1926         (clast_name_to_index): New.
1927         (save_clast_name_index): New.
1928         (debug_clast_name_index): New.
1929         (debug_clast_name_indexes_1): New.
1930         (debug_clast_name_indexes): New.
1931         (clast_name_index_elt_info): New.
1932         (eq_clast_name_indexes): New.
1933
1934 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1935
1936         * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1937         pbb_to_depth_to_oldiv.  Remove call to oldiv_for_loop.
1938         (graphite_loop_normal_form): Do not pass region.  Do not
1939         initialize SESE_OLDIVS.
1940         (build_graphite_loop_normal_form): Update call to
1941         graphite_loop_normal_form.
1942         * sese.c (debug_oldivs): Removed.
1943         (new_sese): Do not initialize SESE_OLDIVS.
1944         (free_sese): Do not free SESE_OLDIVS.
1945         (oldiv_for_loop): Removed.
1946         * sese.h (struct sese): Remove old_ivs.
1947         (SESE_OLDIVS): Removed.
1948         (oldiv_for_loop): Removed.
1949
1950 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1951
1952         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1953         remove ivstack.  Remove call to loop_iv_stack_get_iv_from_name,
1954         replaced by a call to newivs_to_depth_to_newiv.
1955         (clast_to_gcc_expression): Pass newivs, remove ivstack.
1956         (clast_to_gcc_expression_red): Same.
1957         (gcc_type_for_clast_expr): Same.
1958         (gcc_type_for_clast_eq): Same.
1959         (graphite_translate_clast_equation): Same.
1960         (graphite_create_guard_cond_expr): Same.
1961         (graphite_create_new_guard): Same.
1962         (graphite_create_new_loop): Same.
1963         (build_iv_mapping): Same.
1964         (translate_clast): Same.
1965         (gloog): Same.
1966         (loop_iv_stack_patch_for_consts): Removed.  *
1967         sese.c (iv_stack_entry_is_constant): Removed.
1968         (iv_stack_entry_is_iv): Removed.
1969         (loop_iv_stack_push_iv): Removed.
1970         (loop_iv_stack_insert_constant): Removed.
1971         (loop_iv_stack_pop): Removed.
1972         (loop_iv_stack_get_iv): Removed.
1973         (loop_iv_stack_get_iv_from_name): Removed.
1974         (debug_loop_iv_stack): Removed.
1975         (free_loop_iv_stack): Removed.
1976         (loop_iv_stack_remove_constants): Removed.  *
1977         sese.h (iv_stack_entry_kind): Removed.
1978         (iv_stack_entry_data_union): Removed.
1979         (iv_stack_entry_struct): Removed.
1980         (iv_stack_entry_p): Removed.
1981         (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1982         loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1983         loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1984         loop_iv_stack_pop, free_loop_iv_stack): Removed.
1985         (gbb_loop_at_index): Fix indenting.
1986         (gbb_loop_index): Removed.
1987
1988 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1989
1990         * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1991         Call clast_name_to_index.
1992
1993 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
1994
1995         * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1996         do not pass params.  Get params from SESE_PARAMS.
1997         (clast_to_gcc_expression): Same.
1998         (clast_to_gcc_expression_red): Same.
1999         (gcc_type_for_clast_eq): Same.
2000         (graphite_translate_clast_equation): Same.
2001         (graphite_create_new_loop): Same.
2002         * sese.c (rename_variables_in_stmt): Fix comment.
2003
2004 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2005
2006         * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
2007         newivs_index.
2008         Call save_clast_name_index.
2009         (translate_clast): Pass newivs_index.
2010         (gloog): Create and free newivs_index.
2011
2012 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2013
2014         * graphite-clast-to-gimple.c (clast_name_index): New structure.
2015         (clast_name_index_p): New type.
2016         (debug_clast_name_index): New.
2017         (debug_clast_name_indexes_1): New.
2018         (debug_clast_name_indexes): New.
2019         (clast_name_index_elt_info): New.
2020         (eq_clast_name_indexes): New.
2021         (clast_name_to_index): New.
2022         (new_clast_name_index): New.
2023         (save_clast_name_index): New.
2024         (init_sese_params_index): New.
2025         (gloog): Call init_sese_params_index.
2026         * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
2027         * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
2028         (free_sese): Free SESE_PARAMS_INDEX.
2029         * sese.h (struct sese): Add params_index.
2030         (SESE_PARAMS_INDEX): New.
2031
2032 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2033
2034         * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
2035         (graphite_create_new_loop): Pass the newivs vector.  Push the
2036         newly created IV to newivs.
2037         (translate_clast): Pass the newivs vector.
2038         (gloog): Create and destroy the newivs vector.
2039
2040 2009-05-13  Sebastian Pop  <sebastian.pop@amd.com>
2041
2042         * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
2043         (graphite_loop_normal_form): Initialize loop->aux with the unique
2044         IV that has been created.
2045
2046 2009-05-13 Tobias Grosser  <grosser@fim.uni-passau.de>
2047
2048         * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2049         scev with parameters in the base part. They where forbidden
2050         exidently.
2051
2052 2009-05-11  Li Feng  <nemokingdom@gmail.com>
2053
2054         * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2055         compile options by file names.
2056         * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2057         * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2058         * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2059         * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2060
2061 2009-05-08  Li Feng <nemokingdom@gmail.com>
2062
2063         * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2064         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2065         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2066         * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2067
2068 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2069
2070         * graphite-scop-detection (build_scops_1): Fix little bug introduced
2071         by final cleanup.
2072
2073 2009-05-07  Tobias Grosser  <grosser@fim.uni-passau.de>
2074
2075         * graphite-scop-detection.c (graphite_can_represent_scev): Only
2076         allow integer constant strides.
2077         (graphite_can_represent_expr): Depend on outermost_loop.
2078         (stmt_simple_memref_p, graphite_cannot_represent_loop,
2079         harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2080         build_scops_1): Same.
2081         (scopdet_basic_block_info): Same and insert layered SCoP
2082         detection.
2083         (try_generate_gimple_bb): Cleanup.
2084         (build_scops): Enable data references.
2085
2086         * testsuite/gcc.dg/graphite/id-5.c: New.
2087         * testsuite/gcc.dg/graphite/id-9.c: New.
2088         * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2089         * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2090
2091 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2092
2093         * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2094         that we have not yet built for this SCoP.
2095
2096 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2097
2098         * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2099         for complex numbers.
2100
2101 2009-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
2102
2103         * graphite-ppl.c: Fix build if cloog is not available.
2104
2105 2009-05-04  Li Feng  <nemokingdom@gmail.com>
2106
2107         * tree-parloops.c (loop_parallel_p): Remove construction of
2108         NITER and REDUCTION_LIST.
2109         (try_get_loop_niter): New.
2110         (try_create_reduction_list): New.
2111         (parallelize_loops): Bypass the failed checkings in autopar
2112         when can_be_parallel in loop structure is set to true.
2113
2114 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2115
2116         * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2117         * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2118
2119 2009-05-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2120
2121         * graphite-scop-detection.c (stmt_simple_for_scop_p):
2122         Enable EQ_EXPR and NE_EXPR again.
2123
2124 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2125
2126         * graphite-scop-detection.c (graphite_can_represent_scev):
2127         Add check if scev is affine multivariate.
2128         (harmful_stmt_in_bb): Check if we can represent the conditions.
2129         (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2130         harmful_stmt_in_bb.
2131         * testsuite/gcc.dg/graphite/id-7.c: New.
2132
2133 2009-04-30  Tobias Grosser  <grosser@fim.uni-passau.de>
2134
2135         * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2136         Check all bbs in region, not only the bbs that are represented in
2137         GRAPHITE.
2138         (build_poly_scop): Add newline.
2139         * testsuite/gcc.dg/graphite/id-8.c: New.
2140
2141 2009-04-30  Li Feng  <nemokingdom@gmail.com>
2142
2143         * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2144         when loop initialize.
2145         * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2146         * common.opt: Declare flag_graphite_force_parallel.
2147         * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2148         loop parallel.
2149         * graphite-poly.c (apply_poly_transforms): Introduce
2150         flag_graphite_force_parallel.
2151         * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2152         * toplev.c (process_options): ditto and replace a not correctly
2153         encoded space.
2154
2155 2009-04-30  Li Feng  <nemokingdom@gmail.com>
2156
2157         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2158         Change the call of gbb_loop_at_index and/or gbb_loop_index due
2159         to the redefinition.
2160         (compute_cloog_iv_types_1): ditto.
2161         (build_iv_mapping): ditto.
2162         * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2163         initialization.
2164         (free_gimple_bb): Removed GBB_LOOPS related free part.
2165         (build_bb_loops): Removed.
2166         * sese.h (struct gimple_bb): Removed loops.
2167         (GBB_LOOPS): Removed.
2168         (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2169         (gbb_loop_index): ditto.
2170
2171 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2172
2173         * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2174         allow non constant strides.
2175         * testsuite/gcc.dg/graphite/scop-20.c: New.
2176
2177 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2178
2179         * graphite-scop-detection.c (dot_all_scops): Fix system call
2180         return value warning.
2181         (dot_scop): Same.
2182
2183 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2184
2185         * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2186         * testsuite/gcc.dg/graphite/scop-3.c: Same.
2187
2188 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2189
2190         * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2191         build_pairwise_constraint, dr_equality_constraints,
2192         build_pairwise_scheduling_equality,
2193         build_pairwise_scheduling_inequality, lexicographically_gt_p,
2194         build_lexicographically_gt_constraint, dependence_polyhedron,
2195         graphite_legal_transform_dr, graphite_legal_transform_bb,
2196         graphite_legal_transform): New.
2197         * graphite-poly.h (graphite_legal_transform): Declared.
2198         * graphite-sese-to-poly.c (build_poly_scop): Call to
2199         graphite_legal_transform is disabled for the moment.
2200
2201 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2202
2203         * graphite-poly.h (pbb_nb_scattering_dims): New.
2204         (pbb_nb_scattering): Use it.
2205
2206 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2207
2208         * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2209         Pointset_Powerset version of ppl_insert_dimensions.
2210         * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2211
2212 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2213
2214         * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2215
2216 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2217
2218         * graphite-poly.h: Fix comment.
2219
2220 2009-04-24  Sebastian Pop  <sebastian.pop@amd.com>
2221
2222         * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2223
2224 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2225
2226         * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2227         statements.
2228
2229 2009-04-24  Tobias Grosser  <grosser@fim.uni-passau.de>
2230
2231         * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2232         (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2233         conditions.
2234
2235 2009-04-20  Sebastian Pop  <sebastian.pop@amd.com>
2236
2237         * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2238         handle EQ_EXPR and NE_EXPR.
2239
2240 2009-04-17  Tobias Grosser  <grosser@fim.uni-passau.de>
2241
2242         * graphite-poly.h (poly_dr): Fix comment.
2243
2244 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
2245             Tobias Grosser  <grosser@fim.uni-passau.de>
2246
2247         * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2248         with a zero dimension polyhedron.
2249         (find_scop_parameters): Move the call to scop_set_nb_params here.
2250         (build_loop_iteration_domains): Store in loop->aux the iteration
2251         domain polyhedron.
2252         (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2253         by any loop in scop.
2254         (build_poly_scop): Do not call scop_set_nb_params.
2255
2256 2009-04-09  Sebastian Pop  <sebastian.pop@amd.com>
2257             Tobias Grosser  <grosser@fim.uni-passau.de>
2258
2259         * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2260         add_condition_to_domain not GT_EXPR.
2261
2262 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2263
2264         * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2265         * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2266         * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2267         upper_bound_assign to calculate unions.
2268         * testsuite/gcc.dg/graphite/id-6.c: New.
2269
2270 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2271
2272         * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2273         handle abnormal edges.
2274
2275 2009-04-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2276
2277         * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2278         (free_poly_bb): Also free poly_drs.
2279         * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2280         (poly_dr): Polyhedron to Pointset_Powerset.
2281         (pdr_accessp_nb_subscripts): Same.
2282         * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2283         poly_drs.
2284
2285 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2286
2287         * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2288         names into more meaningful names.
2289
2290 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2291
2292         * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2293         * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2294
2295 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2296
2297         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2298         the reduction_list.
2299         * tree-parloops.c (rewrite_phi_with_iv): New.
2300         (rewrite_all_phi_nodes_with_iv): New.
2301         (canonicalize_loop_ivs): Call them.
2302
2303 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2304
2305         * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2306         graphite_find_data_references_in_stmt.
2307         * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2308         * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2309
2310 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2311
2312         * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2313
2314 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2315
2316         * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2317         instead of bb_in_region.
2318         (flag_bb_in_region): Same.  Renamed flag_bb_in_sese.
2319         (build_sese_conditions): Use flag_bb_in_sese.
2320         * sese.c (register_bb_in_sese): Removed.
2321         (new_sese): Remove initialization of SESE_REGION_BBS.
2322         (free_sese): Do not free SESE_REGION_BBS.
2323         * sese.h (struct sese): Remove field region_basic_blocks.
2324         (SESE_REGION_BBS): Removed.
2325         (bb_in_sese_p): Implement in function of bb_in_region.
2326
2327 2009-04-08  Sebastian Pop  <sebastian.pop@amd.com>
2328
2329         * graphite-scop-detection.c (limit_scops): Deal only with single exit
2330         loops.
2331
2332 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2333
2334         * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2335         and EQ_EXPR.
2336         * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2337         (add_condition_to_domain): New.
2338         (add_condition_to_pbb): New.
2339         (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2340         * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2341
2342 2009-04-08  Tobias Grosser  <grosser@fim.uni-passau.de>
2343
2344         * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2345         ppl_Pointset_Powerset.
2346         * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2347         * graphite-poly.h (poly_bb): poly_bb.domain Same.
2348         (pbb_nb_loops): Same.
2349         * graphite-sese-to-poly.c (build_loop_iteration_domains,
2350         add_conditions_to_domain): Same.
2351         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2352         (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2353         ppl_const_Polyhedron_t.
2354         (ppl_print_powerset_matrix): New.
2355         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2356         ppl_print_powerset_matrix): New.
2357         (ppl_print_polyhedron_matrix): Updated.
2358
2359 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2360
2361         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2362
2363 2009-04-07  Sebastian Pop  <sebastian.pop@amd.com>
2364
2365         * graphite-poly.c (extend_scattering): Fix indenting.  Free cstr.
2366         (print_iteration_domains, debug_iteration_domain,
2367         debug_iteration_domains): New.
2368         * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2369         debug_iteration_domains): Declared.
2370         * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2371         indenting.
2372
2373 2009-04-03  Tobias Grosser  <grosser@fim.uni-passau.de>
2374             Sebastian Pop  <sebastian.pop@amd.com>
2375
2376         * graphite-poly.h (print_iteration_domain): New.
2377         * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2378         (build_sese_conditions_1, build_sese_conditions_after,
2379         build_sese_conditions_before): New.
2380         (build_sese_conditions): Rewritten.
2381
2382 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2383             Tobias Grosser  <grosser@fim.uni-passau.de>
2384
2385         Cleanup of code generation liveouts.
2386         * graphite-clast-to-gimple.c (translate_clast): Use a single
2387         rename_map instead of one per translated statement.
2388         Do not use SESE_LIVEOUT_RENAMES.
2389         (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2390         (gloog): Do not use SESE_LIVEOUT_RENAMES.
2391         * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2392         phi node of a reduction: when a loop contains a reduction used outside
2393         the loop, there should be a scalar close phi node on the exit block.
2394         * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2395         SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2396         (free_sese): Do not free them.
2397         (sese_build_liveouts_use): Do not use them.
2398         (sese_build_liveouts_bb): Same.
2399         (sese_build_liveouts): Same.
2400         (sese_insert_phis_for_liveouts): Same.
2401         (sese_adjust_phis_for_liveouts): Same.  Renamed sese_adjust_liveout_phis.
2402         (defined_in_loop_p): New.
2403         (alive_after_loop): New.
2404         (close_phi_not_yet_inserted_p): New.
2405         (struct alep, alep_p): New.
2406         (add_loop_exit_phis): Remove from the rename_map all the names defined
2407         in the code generated loop.
2408         (insert_loop_close_phis): Traverse the rename_map passed to it.
2409         Don't use SESE_LIVEOUT_RENAMES.
2410         (default_liveout_before_guard): Renamed default_before_guard.
2411         (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2412         (graphite_copy_stmts_from_block): Do not directly call set_rename.
2413         (register_sese_liveout_renames): Removed.
2414         (copy_bb_and_scalar_dependences): Do not call it.
2415         * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2416         reduction_list.
2417         (SESE_LIVEOUT): Removed.
2418         (SESE_LIVEOUT_RENAMES): Removed.
2419         (SESE_REDUCTION_LIST): Removed.
2420         (sese_build_liveouts): Removed.
2421         (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2422         (insert_loop_close_phis): Pass a htab_t instead of a sese.
2423         (insert_guard_phis): Same.
2424         (rename_map_elt): Declare a VEC of them.
2425         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2426         trees not pointers to trees.
2427
2428         Rewrite in canonical close SSA form:
2429         * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2430         (limit_scops): Close the scop after the block containing the close phi
2431         nodes.
2432         (canonicalize_loop_closed_ssa): New.
2433         (canonicalize_loop_closed_ssa_form): New.
2434         (build_scops): Call canonicalize_loop_closed_ssa_form.
2435
2436         * graphite-sese-to-poly.c: Fix typos.
2437
2438 2009-04-03  Sebastian Pop  <sebastian.pop@amd.com>
2439
2440         * graphite-poly.c (print_scattering_function, print_pbb_domain):
2441         Extended.
2442         (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2443         (print_pbb): Add conditions.
2444
2445 2009-04-01  Tobias Grosser  <grosser@fim.uni-passau.de>
2446             Sebastian Pop  <sebastian.pop@amd.com>
2447
2448         * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2449         * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2450         (build_scop_bbs_1): New.
2451         (build_scop_bbs): Rewrite.
2452         * sese.h (bb_in_region): New.
2453
2454 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2455
2456         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2457         poly_drs vector.
2458         (print_scop): Style.
2459         * graphite-poly.h (poly_bb): Add drs vector.
2460         (PBB_DRS): Add accessor.
2461         * graphite-sese-to-poly.c (build_poly_dr): New.
2462         (build_pbb_drs, build_scop_drs): New.
2463         (build_poly_scop): call build_scop_drs (Disabled at the moment).
2464
2465 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2466
2467         * tree-ssa-loop.c: Include forgotten toplev.h
2468
2469 2009-03-29  Tobias Grosser  <grosser@fim.uni-passau.de>
2470
2471         * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2472         * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2473         * testsuite/gcc.dg/graphite/pr37928.c: Same
2474         * testsuite/gcc.dg/graphite/pr38409.c: Same
2475         * testsuite/gcc.dg/graphite/pr38498.c: Same
2476         * testsuite/gcc.dg/graphite/pr38559.c: Same
2477         * testsuite/gcc.dg/graphite/pr39335.c: Same
2478         * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2479         * testsuite/gfortran.dg/graphite/block-2.f: Same
2480         * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2481         with -floop-*.
2482
2483 2009-03-28  Tobias Grosser  <grosser@fim.uni-passau.de>
2484
2485         * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2486         build_access_matrix, build_scop_data_accesses): Remove access function
2487         building. (We get a new version soon).
2488         (build_bb_loops, scan_tree_for_params_right_scev): Update.
2489         * sese.h (nb_loops_around_loop_in_sese): Remove.
2490         (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2491
2492 2009-03-27  Tobias Grosser  <grosser@fim.uni-passau.de>
2493             Sebastian Pop  <sebastian.pop@amd.com>
2494
2495         * graphite-scop-detection.c (struct scopdet_info): Rename last
2496         field to exit.
2497         (scopdet_basic_block_info, build_scops_1): Don't use
2498         CDI_POST_DOMINATORS.  CDI_POST_DOMINATORS should never be used.
2499
2500 2009-03-26  Tobias Grosser  <grosser@fim.uni-passau.de>
2501             Sebastian Pop  <sebastian.pop@amd.com>
2502
2503         * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2504         * sese.c (sese_build_liveouts_use): Renamed from
2505         sese_build_livein_liveouts_use. Remove liveins.
2506         (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2507         Call sese_build_liveouts_use.
2508         (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2509         Call sese_build_liveouts_bb.
2510         (new_sese, free_sese): Remove liveins.
2511         (sese_add_exit_phis_var): Deleted.
2512         (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2513         directly.
2514         (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2515
2516         * sese.h (sese): Remove num_ver and livein.
2517         (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2518
2519 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2520
2521         * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2522
2523 2009-03-25  Tobias Grosser  <grosser@fim.uni-passau.de>
2524
2525         * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2526         (build_scop_scattering): Do not use compare_prefix_loops any more.
2527         (nb_common_loops): New.
2528
2529 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2530
2531         * sese.c (get_new_name_from_old_name): Renamed get_rename.
2532         (register_old_and_new_names): Renamed set_rename.
2533
2534 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2535
2536         * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2537         of the decl from the previous commit.
2538
2539 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2540
2541         * graphite-scop-detection.c (dot_scop): New.
2542         * graphite-scop-detection.h (dot_scop): Declared.
2543
2544 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2545
2546         * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2547
2548 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2549
2550         * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2551         condition at the end of the loop.
2552         * graphite.c (graphite_initialize, graphite_finalize): Print to
2553         dump_file the compiled function.
2554         * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2555         of create_empty_loop_on_edge.
2556         (translate_clast): Update the code generation of loops for the new
2557         shape of loops.
2558         * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2559
2560 2009-03-24  Sebastian Pop  <sebastian.pop@amd.com>
2561
2562         Reverted the patch from 2009-03-19.
2563
2564 2009-03-19  Tobias Grosser  <grosser@fim.uni-passau.de>
2565
2566         * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2567         poly_drs vector.
2568         (print_scop): Style.
2569         * graphite-poly.h (poly_bb): Add drs vector.
2570         (PBB_DRS): Add accessor.
2571         * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2572         (build_access_matrix_with_af, build_access_matrix,
2573         build_scop_data_accesses): Delete.
2574         (build_poly_dr): New.
2575         (build_pbb_drs, build_scop_drs): New.
2576         (build_poly_scop): call build_scop_drs.
2577
2578 2009-03-13  Sebastian Pop  <sebastian.pop@amd.com>
2579
2580         * graphite-scop-detection.c (dot_all_scops_1): Close the table
2581         once per basic block.
2582
2583 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2584
2585         * graphite-scop-detection.c (graphite_can_represent_scev): New.
2586         (graphite_can_represent_expr): Renamed from loop_affine_expr
2587         and enhanced.
2588         (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2589         (graphite_cannot_represent_loop): Add scop_entry to parameters.
2590         (scopdet_basic_block_info): Actually define entry_block.
2591         (stmt_simple_memref_p): Moved here from ...
2592
2593         * tree-data-ref.c (stmt_simple_memref_p): here.
2594         * tree-data-ref.h (stmt_simple_memref_p): Removed.
2595
2596 2009-03-13  Tobias Grosser  <grosser@fim.uni-passau.de>
2597
2598         * testsuite/gcc.dg/graphite/id-4.c: New.
2599
2600 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2601
2602         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2603         (register_old_and_new_names): Update the content of the map.
2604         When there was already a rename_map_elt in the map at that
2605         location, free it.
2606         (copy_bb_and_scalar_dependences): Do rename_variables after
2607         expand_scalar_variables.
2608         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2609         of the map.  When there was already a rename_map_elt in the
2610         map at that location, free it.
2611         (translate_clast): Pass the rename_map.  Do not initialize and free
2612         a rename_map per stmt_user.
2613         (gloog): Initialize and free one rename_map and pass it to
2614         translate_clast.
2615
2616 2009-03-12  Sebastian Pop  <sebastian.pop@amd.com>
2617
2618         * sese.c (expand_scalar_variables_stmt,
2619         expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2620         parameter.
2621         (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2622         (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2623         the gimple_stmt_iterator of the statement to be expanded.
2624         * graphite-scop-detection.c (is_simple_operand): Do handle
2625         REALPART_EXPR.
2626
2627 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2628
2629         * graphite-scop-detection.c (is_simple_operand): Do not handle
2630         REALPART_EXPR.
2631         * testsuite/gcc.dg/graphite/id-2.c: New.
2632
2633         * graphite-sese-to-poly.c (build_bb_loops,
2634         add_value_to_dim, scan_tree_for_params_right_scev,
2635         scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2636         find_params_in_bb, build_loop_iteration_domains,
2637         add_conditions_to_domain): Remove subtract.
2638
2639 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2640
2641         * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2642         build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2643         pbb_loop_at_index -> gbb_loop_at_index.
2644         * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2645         (debug_loop_vec): Delete.
2646         * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2647         pointer.  Move LOOPS to gimple_bb_p and insert nb_params.
2648         (PBB_LOOPS): Removed.
2649         (PBB_BLACK_BOX): Insert cast.
2650         (pbb_set_black_box): New setter.
2651         (pbb_loop_at_index, pbb_loop_index): Removed.
2652         (scop_set_region, scop_set_nb_params): New.
2653         * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2654         build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2655         (build_poly_scop): Use scop_set_nb_params.
2656         * sese.h (gimple_bb): Add LOOPS.
2657         (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2658
2659 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2660
2661         Revert previous commit.
2662
2663 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2664
2665         * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2666         (register_old_and_new_names): Update the content of the map.
2667         When there was already a rename_map_elt in the map at that
2668         location, free it.
2669         (copy_bb_and_scalar_dependences): Do rename_variables after
2670         expand_scalar_variables.
2671         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2672         of the map.  When there was already a rename_map_elt in the
2673         map at that location, free it.
2674         (translate_clast): Pass the rename_map.  Do not initialize and free
2675         a rename_map per stmt_user.
2676         (gloog): Initialize and free one rename_map and pass it to
2677         translate_clast.
2678
2679 2009-03-11  Tobias Grosser  <grosser@fim.uni-passau.de>
2680
2681         Remove forgotten line in revert.
2682
2683 2009-03-11  Sebastian Pop  <sebastian.pop@amd.com>
2684
2685         Revert previous commit.
2686
2687 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2688
2689         * sese.c (register_old_and_new_names): Update the content
2690         of the map.  When there was already a rename_map_elt in the
2691         map at that location, free it.
2692         (copy_bb_and_scalar_dependences): Do rename_variables after
2693         expand_scalar_variables.
2694         * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2695         of the map.  When there was already a rename_map_elt in the
2696         map at that location, free it.
2697         (translate_clast): Pass the rename_map.  Do not initialize and free
2698         a rename_map per stmt_user.
2699         (gloog): Initialize and free one rename_map and pass it to
2700         translate_clast.
2701
2702 2009-03-10  Sebastian Pop  <sebastian.pop@amd.com>
2703
2704         * graphite-clast-to-gimple.c (translate_clast): context_loop
2705         is never NULL.
2706
2707 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2708             Sebastian Pop  <sebastian.pop@amd.com>
2709
2710         * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2711         of the use of ppl_Polyhedron_map_space_dimensions.
2712
2713 2009-03-10  Tobias Grosser  <grosser@fim.uni-passau.de>
2714             Sebastian Pop  <sebastian.pop@amd.com>
2715
2716         * graphite-poly.c (unify_scattering_dimensions): Fix types.
2717         * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2718         PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2719         pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2720         pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2721         pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2722         pbb_nb_params): New.
2723         (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2724         nb_loops_around_pbb): Adapt return types.
2725
2726 2009-03-09  Tobias Grosser  <grosser@fim.uni-passau.de>
2727
2728         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2729         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2730         graphite-scop-detection.o, graphite-poly.o): Add
2731         more headers.
2732
2733 2009-03-05  Tobias Grosser  <grosser@fim.uni-passau.de>
2734
2735         * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2736         graphite-clast-to-gimple.o,  graphite-data-ref.o,
2737         graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2738
2739 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2740
2741         * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2742         * testsuite/gcc.dg/graphite/pr37828.c: Same.
2743         * testsuite/gcc.dg/graphite/pr37684.c: Same.
2744         * testsuite/gcc.dg/graphite/block-0.c: Same.
2745         * testsuite/gcc.dg/graphite/block-1.c: Same.
2746         * testsuite/gcc.dg/graphite/block-2.c: Same.
2747         * testsuite/gcc.dg/graphite/block-3.c: Same.
2748         * testsuite/gcc.dg/graphite/block-4.c: Same.
2749         * testsuite/gcc.dg/graphite/block-5.c: Same.
2750         * testsuite/gcc.dg/graphite/block-6.c: Same.
2751         * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2752         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2753         * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2754         * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2755         * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2756         * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2757         * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2758         * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2759         * opts.c: Remove -floop-block from -O2.
2760         * graphite-poly.c: Fail if -floop-block -floop-interchange or
2761         -floop-strip-mine are used.
2762
2763 2009-03-04  Tobias Grosser  <grosser@fim.uni-passau.de>
2764             Sebastian Pop  <sebastian.pop@amd.com>
2765
2766         * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2767         dimensions.
2768         * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2769         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2770         strip_mine_profitable_p, is_interchange_valid,
2771         graphite_trans_bb_block, graphite_trans_loop_block,
2772         graphite_trans_scop_block): Temporary removed.
2773         (extend_scattering, unify_scattering_dimensions): New.
2774         (print_scattering_function, graphite_read_transforms):
2775         PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2776         (graphite_generate_scattering_fns): Removed.
2777         (apply_poly_transforms): Cleanup.
2778         (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2779         (schedule_to_scattering): Moved.
2780         (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2781         (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2782         (pbb_nb_scattering): New.
2783         (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2784         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2785         Removed.
2786         * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2787         shift_poly.
2788         (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2789         * graphite-scop-detection.c (dot_all_scops_1):  PBB_SCATTERING
2790         -> PBB_TRANSFORMED_SCATTERING.
2791         * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2792         (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2793         (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2794         (check_poly_representation): Do not return bool.
2795         (graphite_transform_loops): Reformat.
2796         * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2797
2798 2009-03-04  Sebastian Pop  <sebastian.pop@amd.com>
2799
2800         * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2801         debug_pbb_domain, debug_pbb, debug_scop): New.
2802         * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2803         debug_pbb_domain, debug_pbb, debug_scop): Declared.
2804
2805 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2806
2807         PR middle-end/39335
2808         * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2809         when the type precision of the induction variable should be
2810         larger than the type precision of nit.
2811         (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2812         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2813         * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2814
2815         * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2816         * testsuite/gcc.dg/graphite/pr39335.c: New.
2817
2818 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2819
2820         * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2821         SSA_NAMES not struct reduction_info.
2822
2823 2009-03-02  Sebastian Pop  <sebastian.pop@amd.com>
2824
2825         * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2826
2827 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2828             Tobias Grosser  <grosser@fim.uni-passau.de>
2829
2830         * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2831         (free_sese): Free SESE_REDUCTION_LIST.
2832         * sese.h (struct sese): Add field reduction_list.
2833         (SESE_REDUCTION_LIST): New.
2834         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2835         canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2836
2837 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2838             Tobias Grosser  <grosser@fim.uni-passau.de>
2839
2840         * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2841         of loop_p.
2842
2843 2009-02-27  Sebastian Pop  <sebastian.pop@amd.com>
2844             Tobias Grosser  <grosser@fim.uni-passau.de>
2845
2846         * tree-parloops.c (struct brli, build_reduction_list_info,
2847         analyze_reduction_list, gather_scalar_reductions): New.
2848         (loop_parallel_p): Build a reduction list containing only
2849         PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2850         (gen_parallel_loop): Call the analysis analyze_reduction_list.
2851         (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2852         * tree-flow.h (gather_scalar_reductions): Declared.
2853
2854 2009-02-26  Sebastian Pop  <sebastian.pop@amd.com>
2855
2856         PR middle-end/39308
2857         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2858         number_of_iterations_exit from a gcc_assert.
2859
2860 2009-02-25  Sebastian Pop  <sebastian.pop@amd.com>
2861             Jan Sjodin  <jan.sjodin@amd.com>
2862
2863         * output.h (graphite_out_file, graphite_in_file): Declared.
2864         * toplev.c (graphite_out_file, graphite_in_file): New.
2865         (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2866         * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2867         Don't call schedule_to_scattering.
2868         * common.opt (fgraphite-write, fgraphite-read): New.
2869         * graphite-poly.c: Include output.h.
2870         (print_scattering_function, print_scattering_functions,
2871         debug_scattering_function, debug_scattering_functions,
2872         graphite_write_transforms, graphite_read_transforms,
2873         graphite_generate_scattering_fns): New.
2874         (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2875         Call graphite_generate_scattering_fns, graphite_write_transforms,
2876         graphite_read_transforms.
2877         (new_poly_bb): Initialize PBB_SCATTERING.
2878         (free_poly_bb): Free PBB_SCATTERING.
2879         (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2880         * graphite-poly.h (struct poly_bb): Add field scattering.
2881         (PBB_SCATTERING): New.
2882         (print_scattering_function, print_scattering_functions,
2883         debug_scattering_function, debug_scattering_functions): Declared.
2884         * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2885         GMP values, not integers!
2886         (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2887         ppl_read_polyhedron_matrix): New.
2888         * graphite-ppl.h (ppl_print_polyhedron_matrix,
2889         debug_ppl_polyhedron_matrix,
2890         ppl_read_polyhedron_matrix): Declared.
2891         * Makefile.in (graphite-poly.o): Depends on output.h.
2892
2893 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2894             Tobias Grosser  <grosser@fim.uni-passau.de>
2895
2896         Revert this change:
2897         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2898         scalar evolutions in the scop_entry->loop_father.
2899
2900 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2901             Tobias Grosser  <grosser@fim.uni-passau.de>
2902
2903         * graphite.h (ref_nb_loops): Remove declaration.
2904         (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2905         GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2906         debug_gbb): Moved to sese.h.
2907         * sese.h: As said.
2908
2909 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2910             Tobias Grosser  <grosser@fim.uni-passau.de>
2911
2912         * graphite-data-ref.[ch]: Disable.
2913
2914 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2915             Tobias Grosser  <grosser@fim.uni-passau.de>
2916
2917         * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2918         scalar evolutions in the scop_entry->loop_father.
2919
2920 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2921
2922         * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2923         (graphite_cannot_represent_loop_niter): Renamed
2924         graphite_cannot_represent_loop.  Call nb_reductions_in_loop.
2925         (limit_scops): build_sese_loop_nests does not return a bool.
2926         * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2927         * sese.c (nb_reductions_in_loop): ... from here.
2928         (graphite_loop_normal_form): ... from here.
2929         (sese_record_loop): Does not fail, so does not return a bool.
2930         (build_sese_loop_nests): Same.
2931         * sese.h (build_sese_loop_nests): Update declaration.
2932         * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2933         (build_graphite_loop_normal_form): New.
2934         (gloog): Call build_graphite_loop_normal_form.
2935         * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2936         build_sese_loop_nests.
2937
2938         * testsuite/gcc.dg/graphite/id-1.c: New.
2939
2940 2009-02-23  Sebastian Pop  <sebastian.pop@amd.com>
2941             Tobias Grosser  <grosser@fim.uni-passau.de>
2942
2943         * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2944         The SCoP detection fix is sufficient.
2945
2946 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2947
2948         PR tree-optimization/39260
2949         * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2950         the basic block contains a condition with a real type.
2951         * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2952
2953         * gcc.dg/graphite/pr39260.c: New.
2954
2955 2009-02-21  Sebastian Pop  <sebastian.pop@amd.com>
2956
2957         * graphite-poly.c: Inlcude params.h.
2958         (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2959         the size of a tile.
2960         * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2961         * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2962
2963 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2964             Tobias Grosser  <grosser@fim.uni-passau.de>
2965
2966         * graphite-scop-detection.c (dot_all_scops_1,
2967         dot_all_scops): Moved here.
2968         * graphite-scop-detection.h (dot_all_scops): Declared here.
2969         * graphite.c (graphite_initialize, graphite_finalize): New.
2970         (graphite_transform_loops): Cleaned up.
2971         * sese.c (debug_oldivs): Moved here.
2972         * graphite-poly.c (graphite_apply_transformations): Renamed
2973         apply_poly_transforms.
2974         (debug_loop_vec): Moved here.
2975         * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2976         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2977         find_scop_parameters, build_scop_iteration_domain,
2978         add_conditions_to_constraints, build_scop_canonical_schedules,
2979         build_scop_data_accesses): Now static.
2980         (build_poly_scop, check_poly_representation): New.
2981
2982 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
2983
2984         * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2985         remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2986         build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2987         build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2988         scan_tree_for_params_right_scev, scan_tree_for_params_int,
2989         scan_tree_for_params, struct irp_data, dx_record_params,
2990         find_params_in_bb, find_scop_parameters, gbb_from_bb,
2991         build_loop_iteration_domains, add_conditions_to_domain,
2992         phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2993         scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2994         build_sese_conditions, add_conditions_to_constraints,
2995         build_scop_iteration_domain, build_access_matrix_with_af,
2996         build_access_matrix,
2997         build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2998
2999         * graphite-sese-to-poly.c: New.
3000         * graphite-sese-to-poly.h: New.
3001
3002         * Makefile.in: Add new rule for graphite-sese-to-poly.o.
3003
3004 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3005
3006         * graphite.c: Split graphite code generation to a new file.
3007         (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
3008         max_precision_type, clast_to_gcc_expression_red,
3009         clast_to_gcc_expression, gcc_type_for_clast_expr,
3010         gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
3011         graphite_translate_clast_equation, graphite_create_guard_cond_expr,
3012         graphite_create_new_guard, clast_get_body_of_loop,
3013         gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
3014         graphite_create_new_loop, build_iv_mapping, copy_renames,
3015         translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3016         compute_cloog_iv_types, free_scattering, save_var_name,
3017         initialize_cloog_names, build_scop_context, build_cloog_prog,
3018         set_cloog_options, debug_clast_stmt, scop_to_clast,
3019         print_generated_program, debug_generated_program,
3020         gloog): Moved to graphite-clast-to-gimple.c.
3021
3022         (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
3023
3024         (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
3025         loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
3026         loop_iv_stack_pop, loop_iv_stack_get_iv,
3027         loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
3028         free_loop_iv_stack, loop_iv_stack_remove_constants,
3029         debug_rename_elt, debug_rename_map_1, debug_rename_map,
3030         rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
3031         debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
3032         eq_ivtype_map_elts, sese_add_exit_phis_edge,
3033         sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
3034         get_vdef_before_sese, sese_adjust_vphi,
3035         get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
3036         oldiv_for_loop, rename_variables_in_stmt, is_parameter,
3037         is_iv, expand_scalar_variables_ssa_name,
3038         expand_scalar_variables_expr, expand_scalar_variables_stmt,
3039         expand_scalar_variables, rename_variables, remove_condition,
3040         get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
3041         add_loop_exit_phis, insert_loop_close_phis, struct igp,
3042         default_liveout_before_guard, add_guard_exit_phis,
3043         insert_guard_phis, register_old_and_new_names,
3044         graphite_copy_stmts_from_block, register_sese_liveout_renames,
3045         copy_bb_and_scalar_dependences, outermost_loop_in_sese,
3046         if_region_set_false_region, create_if_region_on_edge,
3047         move_sese_in_condition): Moved to sese.c.
3048
3049         (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3050         if_region_exit, if_region_get_condition_block,
3051         struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3052         union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3053         iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3054         ivtype_map_elt, new_ivtype_map_elt,
3055         recompute_all_dominators): Moved to sese.h.
3056
3057         * graphite-clast-to-gimple.c: New.
3058         * graphite-clast-to-gimple.h: New.
3059         * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3060         * sese.c: Modified as said above.
3061         * sese.h: Same.
3062
3063 2009-02-20  Sebastian Pop  <sebastian.pop@amd.com>
3064
3065         * graphite.c: Split scop detection to a new file.
3066         (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3067         move_sd_regions, loop_affine_expr, exclude_component_ref,
3068         is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3069         graphite_cannot_represent_loop_niter, struct scopdet_info,
3070         scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3071         find_single_entry_edge, find_single_exit_edge,
3072         create_single_entry_edge, sd_region_without_exit,
3073         create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3074         create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3075         Moved to graphite-scop-detection.c.
3076
3077         * graphite-scop-detection.c: New.
3078         * graphite-scop-detection.h: New.
3079         * Makefile.in: Add new rule for graphite-scop-detection.o.
3080
3081         * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3082         tree-scalar-evolution.h.
3083         (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3084         build_sese_loop_nests): Moved here from graphite.c.
3085         (param_index): Renamed parameter_index_in_region.
3086
3087 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3088             Sebastian Pop  <sebastian.pop@amd.com>
3089
3090         * gcc.dg/graphite/block-0.c: Expected to fail now.
3091         * gcc.dg/graphite/block-1.c: Same.
3092         * gcc.dg/graphite/block-5.c: Same.
3093         * gcc.dg/graphite/block-6.c: Same.
3094
3095 2009-02-18  Tobias Grosser  <grosser@fim.uni-passau.de>
3096             Sebastian Pop  <sebastian.pop@amd.com>
3097
3098         * graphite.h: Separate from graphite_bb_p the polyhedral
3099         representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3100         (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3101         graphite-data-ref.h.
3102         (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3103         PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3104         pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3105         SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3106         SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3107         scop_nb_params): Moved to graphite-poly.h.
3108         * graphite-data-ref.c: Same.
3109         * graphite-data-ref.h: New.
3110         * graphite.c: Same.
3111         (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3112         graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3113         is_interchange_valid, graphite_trans_bb_block,
3114         graphite_trans_loop_block, scop_max_loop_depth,
3115         graphite_trans_scop_block, graphite_apply_transformations,
3116         new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3117         graphite-poly.c.
3118         * graphite-poly.h: New.
3119         * graphite-poly.c: New.
3120         * Makefile.in (OBJS-common): Add graphite-poly.o.
3121         (graphite-poly.o): New rule.
3122         * tree-data-ref.h (struct data_reference): Remove unused scop field.
3123         (DR_SCOP): Removed.
3124
3125 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
3126             Tobias Grosser  <grosser@fim.uni-passau.de>
3127
3128         * graphite.c: Replace gb -> gbb.
3129         * graphite.h: Same.
3130         * graphite-data-ref.c: Same.
3131
3132 2009-02-18  Sebastian Pop  <sebastian.pop@amd.com>
3133             Tobias Grosser  <grosser@fim.uni-passau.de>
3134
3135         * Makefile.in (OBJS-commmon): Add sese.o.
3136         (sese.o): New.
3137         (graphite.o): Add sese.h.
3138         * graphite.c (bb_in_ss_p, loop_in_sese_p,
3139         sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3140         sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3141         Move to sese.
3142         (block_before_scop): Add missing return.
3143         (new_scop, free_scop): Remove SESE data structures.
3144         (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3145         find_scop_parameters, build_loop_iteration_domains,
3146         add_conditions_to_domain, register_scop_liveout_renames,
3147         copy_bb_and_scalar_dependences): Scop -> SESE.
3148
3149         (add_conditions_to_domain): SCoP -> SESE and remove check
3150         (scop_contains_non_iv_scalar_phi_nodes): New.
3151         (build_scop_conditions_1, build_scop_conditions): Remove check for
3152         non iv scalar phi nodes.
3153         (print_scop_statistics): New.
3154         (graphite_transform_loops): Cleanup.
3155
3156         * graphite.h: Move to sese & cleanup.
3157         * sese.c: New.
3158         * sese.h: New.
3159
3160 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3161             Tobias Grosser  <grosser@fim.uni-passau.de>
3162
3163         * graphite.c (build_scop_conditions_1): Conditions are only
3164         at the end of a basic block.
3165
3166 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3167             Tobias Grosser  <grosser@fim.uni-passau>
3168
3169         * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3170         field.
3171         (GBB_ALPHA): Removed.
3172
3173 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3174             Tobias Grosser  <grosser@fim.uni-passau.de>
3175
3176         * graphite-data-ref.c (graphite_test_dependence): Don't use
3177         GBB_DYNAMIC_SCHEDULE.
3178         * graphite.c (new_graphite_bb): Same.
3179         (free_graphite_bb): Same.
3180         (build_scop_dynamic_schedules): Removed.
3181         (graphite_transform_loops): Don't call it.
3182         * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3183         (GBB_DYNAMIC_SCHEDULE): Removed.
3184
3185 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3186             Tobias Grosser  <grosser@fim.uni-passau.de>
3187
3188         * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3189         (print_graphite_bb): Same.
3190         (build_cloog_prog): Same.
3191
3192 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3193             Tobias Grosser  <grosser@fim.uni-passau.de>
3194
3195         * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3196
3197 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3198             Tobias Grosser  <grosser@fim.uni-passau.de>
3199
3200         * graphite.c (build_scop_context): Don't use CloogMatrix.
3201         * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3202         * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3203
3204 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3205             Tobias Grosser  <grosser@fim.uni-passau.de>
3206
3207         * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3208         liveout_renames, add_params fields...
3209         (struct sese): ... here.
3210         (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3211         SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3212
3213 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3214             Tobias Grosser  <grosser@fim.uni-passau.de>
3215
3216         * graphite.c (print_scop): Do not print the CLooG program.
3217         (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3218         build_cloog_prog, gloog): Don't use SCOP_PROG.
3219         (find_transform): Renamed scop_to_clast.
3220         (print_generated_program, debug_generated_program): New.
3221         (graphite_transform_loops): Adapt to new interface.
3222         * graphite.h (struct scop): Remove program field.
3223         (SCOP_PROG): Removed.
3224         (print_generated_program, debug_generated_program): Declared.
3225
3226 2009-02-16  Sebastian Pop  <sebastian.pop@amd.com>
3227
3228         * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3229         (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3230         * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3231         free_graphite_bb, build_scop_canonical_schedules,
3232         graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3233         schedules are now represented using a ppl_Linear_Expression_t.
3234         * graphite.h (struct graphite_bb): Same.
3235         * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3236         * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3237
3238 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
3239
3240         * graphite.c: Free local memory.
3241         * graphite-ppl.c: Same.
3242
3243 2009-02-15  Sebastian Pop  <sebastian.pop@amd.com>
3244
3245         * graphite.c (const_column_index, get_first_matching_sign_row_index,
3246         get_lower_bound_row, get_upper_bound_row, copy_constraint,
3247         swap_constraint_variables, scale_constraint_variable): Removed.
3248         (graphite_trans_bb_strip_mine): Remove pong.
3249         * graphite-ppl.c: Include missing header files.
3250         (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3251         * graphite-ppl.h (ppl_strip_loop): Declared.
3252         * Makefile.in (graphite-ppl.o): Adjust dependences.
3253
3254 2009-02-14  Sebastian Pop  <sebastian.pop@amd.com>
3255
3256         * graphite.c (build_loop_iteration_domains): Remove ping pong.
3257         (build_scop_iteration_domain): Same.
3258
3259 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
3260
3261         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3262         ping pong.
3263         (add_value_to_dim, scan_tree_for_params_right_scev,
3264         scan_tree_for_params_int): New.
3265         * graphite-ppl.c (oppose_constraint): New.
3266         (insert_constraint_into_matrix): Implement missing cases.
3267         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3268
3269 2009-02-13  Sebastian Pop  <sebastian.pop@amd.com>
3270
3271         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3272         use ppl_move_dimension.
3273
3274 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
3275
3276         * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3277         * graphite.c: Same.
3278         * graphite.h: Same.
3279         * graphite-ppl.c: Same.
3280         * graphite-ppl.h: Same.
3281
3282 2009-02-12  Sebastian Pop  <sebastian.pop@amd.com>
3283
3284         Revert last 3 commits.
3285
3286 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3287
3288         * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3289         ping pong.
3290         (add_value_to_dim, scan_tree_for_params_right_scev,
3291         scan_tree_for_params_int): New.
3292         * graphite-ppl.c (oppose_constraint): New.
3293         (insert_constraint_into_matrix): Implement missing cases.
3294         * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3295
3296 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3297
3298         * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3299
3300 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3301             Tobias Grosser  <grosser@fim.uni-passau.de>
3302
3303         * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3304         use ppl_move_dimension.
3305         * graphite-ppl.c (ppl_move_dimension): New.
3306         * graphite-ppl.h (ppl_move_dimension): Declared.
3307
3308 2009-02-10  Sebastian Pop  <sebastian.pop@amd.com>
3309
3310         * graphite.c: Do not include cloog/cloog.h.
3311         (print_graphite_bb): Remove ping pong, call PPL print function.
3312
3313 2009-02-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3314
3315         * Makefile.in (OBJS-common): Add graphite-ppl.o.
3316         (graphite.o): Add dependence on graphite-ppl.h.
3317         (graphite-ppl.o): New.
3318         (graphite-data-ref.c): Ping pong between PPL data structures
3319         and matrices.
3320         * graphite-ppl.c: New.
3321         * graphite-ppl.h: New.
3322         * graphite.c: Include graphite-ppl.h.
3323         (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3324         graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3325         Ping pong between PPL data structures and matrices.
3326         (new_graphite_bb): Create a PPL constraint system.
3327         Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3328         (build_loop_iteration_domains): Use PPL functions.
3329         * graphite.h: Include graphite-ppl.h.  Fix comments.
3330         (graphite_bb): Use a ppl_Constraint_System_t instead of
3331         CloogMatrix for representing the domain.
3332         (scop): Remove static_schedule.
3333         (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3334
3335 2009-02-06  Sebastian Pop  <sebastian.pop@amd.com>
3336
3337         * graphite.c: Fix some comments.
3338
3339 2009-02-05  Sebastian Pop  <sebastian.pop@amd.com>
3340
3341         PR middle-end/38953
3342         * graphite.c (if_region_set_false_region): After moving a region
3343         in the false branch of a condition, remove the empty dummy
3344         basic block.
3345         (gloog): Remove wrong fix for PR38953.
3346
3347 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3348
3349         * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3350         sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3351         register_bb_in_sese, new_sese, free_sese): Moved.
3352         (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3353         outermost_loop_in_scop, build_scop_iteration_domain,
3354         expand_scalar_variables_ssa_name, get_vdef_before_scop,
3355         limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3356         Use loop_in_sese_p instead of loop_in_scop_p.
3357         (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3358         (free_scop): Do not free SCOP_BBS_B.
3359         (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3360         ref_nb_loops): Moved here...
3361         * graphite.h (ref_nb_loops): ... from here.
3362         (struct scop): Remove bbs_b bitmap.
3363         (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3364         * testsuite/gcc.dg/graphite/scop-19.c: New
3365
3366 2009-02-03  Tobias Grosser  <grosser@fim.uni-passau.de>
3367
3368         * graphite.c (scopdet_basic_block_info): Fix bug in scop
3369         detection.
3370
3371 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3372
3373         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3374         eq_loop_to_cloog_loop): Remove.
3375         (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3376         * graphite.h (struct scop): Remove loop2cloog_loop.
3377         (loop_domain_dim, loop_iteration_vector_dim): Remove.
3378
3379 2009-01-30  Tobias Grosser  <grosser@fim.uni-passau.de>
3380
3381         * opts.c (decode_options): Only add graphite options to O2
3382         if we compile with graphite enabled.
3383
3384 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
3385
3386         * Merge from mainline (r143163:143684).
3387
3388 2009-01-26  Sebastian Pop  <sebastian.pop@amd.com>
3389
3390         * graphite.c (debug_value): Removed.
3391         * graphite.h (debug_value): Removed.
3392
3393 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3394
3395         * passes.c (init_optimization_passes): Do not call pass_copy_prop
3396         after graphite: pass_copy_prop does not maintain a proper loop closed
3397         SSA form.  pass_copy_prop should be fixed.
3398
3399 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3400
3401         * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3402
3403 2009-01-23  Sebastian Pop  <sebastian.pop@amd.com>
3404
3405         * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3406         (gloog): Split the exit of the scop when the scop exit is a loop exit.
3407         (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3408         changed the CFG.
3409
3410 2009-01-20  Sebastian Pop  <sebastian.pop@amd.com>
3411
3412         * graphite.c (gloog): Return true when code gen succeeded.
3413         (graphite_transform_loops): Do not call cleanup_tree_cfg if
3414         the code of the function did not changed.  After cleanup_tree_cfg
3415         call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3416         form.
3417
3418 2009-01-19  Sebastian Pop  <sebastian.pop@amd.com>
3419
3420         * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3421         gimple_call_lhs is NULL.
3422
3423 2009-01-16  Sebastian Pop  <sebastian.pop@amd.com>
3424             Tobias Grosser  <tobi.grosser@amd.com>
3425
3426         * graphite.c (graphite_trans_scop_block): Do not block single
3427         nested loops.
3428
3429 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3430             Tobias Grosser  <tobi.grosser@amd.com>
3431
3432         * graphite.c (build_scop_canonical_schedules): Start schedules at
3433         zero.
3434
3435 2009-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3436             Tobias Grosser  <tobi.grosser@amd.com>
3437
3438         * graphite.c (compare_prefix_loops): New.
3439         (build_scop_canonical_schedules): Rewritten.
3440         (graphite_transform_loops): Move build_scop_canonical_schedules
3441         after build_scop_iteration_domain.
3442
3443 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3444             Tobias Grosser  <tobi.grosser@amd.com>
3445
3446         * graphite.c (add_conditions_to_domain): Add the loops to
3447         the dimension of the iteration domain.  Do copy the domain
3448         only when it exists.
3449         (build_scop_conditions_1): Do not call add_conditions_to_domain.
3450         (add_conditions_to_constraints): New.
3451         (can_generate_code_stmt, can_generate_code): Removed.
3452         (gloog): Do not call can_generate_code.
3453         (graphite_transform_loops): Call add_conditions_to_constraints
3454         after building the iteration domain.
3455
3456 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3457             Tobias Grosser  <tobi.grosser@amd.com>
3458             Jan Sjodin  <jan.sjodin@amd.com>
3459
3460         * graphite.c (scan_tree_for_params): On substractions negate
3461         all the coefficients of the term.
3462         (clast_to_gcc_expression_red): New.  Handle reduction expressions
3463         of more than two operands.
3464         (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3465         (get_vdef_before_scop): Handle also the case of default definitions.
3466
3467 2009-01-14  Sebastian Pop  <sebastian.pop@amd.com>
3468
3469         PR middle-end/38431
3470         * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3471         (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3472         (gloog): Do not call cleanup_tree_cfg.
3473         (graphite_transform_loops): Call cleanup_tree_cfg after all
3474         scops have been code generated.
3475
3476 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
3477
3478         * passes.c (init_optimization_passes): Schedule after
3479         graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3480
3481 2009-01-13  Sebastian Pop  <sebastian.pop@amd.com>
3482
3483         * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3484         Fix comment.
3485         (expand_scalar_variables_ssa_name): Do not pass loop_p.  Fix comment.
3486         Set the type of an expression to the type of its assign statement.
3487         (expand_scalar_variables_expr):  Do not pass loop_p.
3488         Fix comment.  Stop recursion on tcc_constant or tcc_declaration.
3489         (copy_bb_and_scalar_dependences): Do not pass loop_p.
3490         (translate_clast): Update call to copy_bb_and_scalar_dependences.
3491
3492 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3493
3494         * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3495         an expression to the gimple_expr_type of its assign statement.
3496         (expand_scalar_variables_expr): Stop recursion on tcc_constant
3497         or tcc_declaration.
3498
3499 2009-01-11  Sebastian Pop  <sebastian.pop@amd.com>
3500
3501         PR tree-optimization/38786
3502         * testsuite/gcc.dg/graphite/pr38786.c: New.
3503         * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3504         the SSA_NAME case of expand_scalar_variables_expr.
3505         (expand_scalar_variables_expr): Also gather the scalar computation
3506         used to index the memory access.
3507         (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3508         the gimple_stmt_iterator where it inserts new code.
3509
3510 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3511
3512         * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3513
3514 2009-01-10  Sebastian Pop  <sebastian.pop@amd.com>
3515
3516         * opts.c (decode_options): Enable flag_graphite_identity and
3517         flag_loop_block in -O2 and above.
3518
3519 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3520
3521         * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3522         Fix merge problem: replace with the file from trunk.
3523
3524 2009-01-08  Sebastian Pop  <sebastian.pop@amd.com>
3525
3526         * Merge from mainline (r141727:143163).
3527
3528 2009-01-07  Sebastian Pop  <sebastian.pop@amd.com>
3529             Jan Sjodin  <jan.sjodin@amd.com>
3530
3531         PR tree-optimization/38559
3532         * testsuite/gcc.dg/graphite/pr38559.c: New.
3533
3534         * graphite.c (debug_value, copy_constraint,
3535         swap_constraint_variables, scale_constraint_variable, ): New.
3536         (get_lower_bound, get_upper_bound): Removed.
3537         (graphite_trans_bb_strip_mine): Clean up this code that works
3538         only for constant number of iterations.  Fully copy upper and
3539         lower bound constraints, not only the constant part of them.
3540         * graphite.h (debug_value): Declared.
3541
3542 2009-01-06  Jan Sjodin  <jan.sjodin@amd.com>
3543
3544         PR tree-optimization/38492
3545         PR tree-optimization/38498
3546         * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3547         * tree-chrec.h (scev_is_linear_expression): Declared.
3548         * graphite.c (graphite_cannot_represent_loop_niter): New.
3549         (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3550         (graphite_loop_normal_form): Use gcc_assert.
3551         (scan_tree_for_params): Use CASE_CONVERT.
3552         (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3553         (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3554         Use gcc_assert.  Discard scops that contain unhandled cases.
3555         (build_scop_conditions): Return a boolean status for unhandled cases.
3556         (strip_mine_profitable_p): Print the loop number, not its depth.
3557         (is_interchange_valid): Pass the depth of the loop nest, don't
3558         recompute it wrongly.
3559         (graphite_trans_bb_block): Same.
3560         (graphite_trans_bb_block): Print tentative of loop blocking.
3561         (graphite_trans_scop_block): Do not print that the loop has been
3562         blocked.
3563         (graphite_transform_loops): Do not handle scops that contain condition
3564         scalar phi nodes.
3565
3566         * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3567         in trunk.
3568         * testsuite/gcc.dg/graphite/block-0.c: Update test.
3569         * testsuite/gcc.dg/graphite/block-1.c: Same.
3570         * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3571         blocking.
3572         * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3573         * testsuite/gcc.dg/graphite/block-3.c: New.
3574         * testsuite/gcc.dg/graphite/pr38498.c: New.
3575
3576 2008-12-22  Harsha Jagasia  <harsha.jagasia@amd.com>
3577
3578         PR tree-optimization/38510
3579         * gcc.dg/graphite/pr38510.c: New.
3580         * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3581           (translate_clast): Call recompute_all_dominators before
3582           graphite_verify.
3583           (gloog): Call recompute_all_dominators before graphite_verify.
3584
3585 2008-12-12  Sebastian Pop  <sebastian.pop@amd.com>
3586
3587         PR tree-optimization/38492
3588         * graphite.c (rename_map_elt, debug_rename_elt,
3589         debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3590         rename_map_elt_info, eq_rename_map_elts,
3591         get_new_name_from_old_name, bb_in_sese_p): Moved around.
3592         (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3593         (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3594         (sese_build_livein_liveouts): New.
3595         (new_sese, free_sese): New.
3596         (new_scop): Call new_sese.
3597         (free_scop): Call free_sese.
3598         (rename_variables_from_edge, rename_phis_end_scop): Removed.
3599         (register_old_new_names): Renamed register_old_and_new_names.
3600         (register_scop_liveout_renames, add_loop_exit_phis,
3601         insert_loop_close_phis, struct igp,
3602         default_liveout_before_guard, add_guard_exit_phis,
3603         insert_guard_phis, copy_renames): New.
3604         (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3605         (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3606         (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3607         (scop_adjust_phis_for_liveouts): New.
3608         (gloog): Call scop_adjust_phis_for_liveouts.
3609
3610         * graphite.h (struct sese): Documented.  Added fields liveout,
3611         num_ver and livein.
3612         (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3613         (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3614         (struct scop): Added field liveout_renames.
3615         (SCOP_LIVEOUT_RENAMES): New.
3616
3617 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3618
3619         PR tree-optimization/38409
3620         * gcc.dg/graphite/pr38409.c: New.
3621         * graphite.c (nb_reductions_in_loop): Use simple_iv.
3622
3623 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3624
3625         * graphite.c (gcc_type_for_cloog_iv): By default return
3626         integer_type_node.
3627         (graphite_create_new_loop): Don't fold_convert the already
3628         fold_convert-ed expression.
3629
3630 2008-12-11  Harsha Jagasia  <harsha.jagasia@amd.com>
3631
3632         PR tree-optimization/38446
3633         * gcc.dg/graphite/pr38446.c: New.
3634         * graphite.c (register_bb_in_sese): New.
3635         (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3636         looking at the bbs in the region.
3637         * graphite.h (sese): Add region_basic_blocks pointer set to
3638         structure and initialize at the time of defining new scop.
3639
3640 2008-12-11  Tobias Grosser  <grosser@fim.uni-passau.de>
3641
3642         * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3643         (find_params_in_bb): Do not free data refs.
3644         (free_graphite_bb): Add FIXME on disabled free_data_refs.
3645
3646 2008-12-11  Sebastian Pop  <sebastian.pop@amd.com>
3647
3648         * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3649         * testsuite/gcc.dg/graphite/scop-17.c: Same.
3650         * testsuite/gcc.dg/graphite/block-5.c: New.
3651         * testsuite/gcc.dg/graphite/block-6.c: New.
3652         * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3653         * testsuite/gcc.dg/graphite/pr37684.c: Same.
3654         * testsuite/gcc.dg/graphite/block-2.c: Same.
3655
3656         * graphite.c (struct ivtype_map_elt): New.
3657         (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3658         new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3659         gcc_type_for_cloog_iv): New.
3660         (loop_iv_stack_patch_for_consts): Use the type of the induction
3661         variable from the original loop, except for the automatically
3662         generated loops, i.e., in the case of a strip-mined loop, in
3663         which case there is no original loop: in that case just use
3664         integer_type_node.
3665         (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3666         (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3667         (clast_name_to_gcc): Accept params to be NULL.
3668         (clast_to_gcc_expression): Take an extra parameter for the type.
3669         Convert to that type all the expressions built by this function.
3670         (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3671         (graphite_translate_clast_equation): Compute the type of the
3672         clast_equation before translating its LHS and RHS.
3673         (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3674         (graphite_create_new_loop): Compute the type of the induction
3675         variable before translating the lower and upper bounds and before
3676         creating the induction variable.
3677         (rename_variables_from_edge, rename_phis_end_scop): New.
3678         (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3679         (sese_add_exit_phis_edge): Do not use integer_zero_node.
3680         (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3681         compute_cloog_iv_types): New.
3682         (gloog): Call compute_cloog_iv_types before starting the
3683         translation of the clast.
3684
3685         * graphite.h (struct graphite_bb): New field cloog_iv_types.
3686         (GBB_CLOOG_IV_TYPES): New.
3687         (debug_ivtype_map): Declared.
3688         (oldiv_for_loop): New.
3689
3690 2008-12-10  Tobias Grosser  <grosser@fim.uni-passau.de>
3691
3692         PR middle-end/38459
3693         * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3694         (param_index): Assert if parameter is not know after parameter
3695         detection.
3696         (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3697         (find_scop_parameters): Mark, that we have finished parameter
3698         detection.
3699         (graphite_transform_loops): Move condition detection before parameter
3700         detection.
3701         * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3702         * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3703
3704 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3705
3706         * graphite.c (graphite_transform_loops): Always call find_transform ()
3707         in ENABLE_CHECKING.  So we test these code paths, even if we do not
3708         generate code.
3709
3710 2008-12-09  Tobias Grosser  <grosser@fim.uni-passau.de>
3711
3712         * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3713         (print_scop): Ditto.
3714
3715 2008-12-08  Tobias Grosser  <grosser@fim.uni-passau.de>
3716
3717         PR middle-end/38084
3718         Fix testsuite/gfortran.dg/graphite/id-3.f90.
3719         * graphite.c (scopdet_basic_block_info): Fix bug that found some
3720         regions more than once.
3721
3722 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3723
3724         Fix testsuite/gfortran.dg/graphite/id-4.f90.
3725         * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3726         when not needed.
3727
3728 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3729
3730         Fix testsuite/gfortran.dg/graphite/id-1.f90.
3731         * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3732         (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3733         (max_precision_type): New.
3734         (value_clast): Removed.
3735         (clast_to_gcc_expression): Be more careful to types of expressions.
3736         Use max_precision_type and update use of gmp_cst_to_tree.
3737         (graphite_translate_clast_equation): Use max_precision_type.
3738         (graphite_create_guard_cond_expr): Do not use integer_type_node,
3739         use the type of the condition.
3740         (graphite_create_new_loop): Do not use integer_type_node, use the
3741         max_precision_type of lb and ub.
3742
3743 2008-12-03  Sebastian Pop  <sebastian.pop@amd.com>
3744
3745         * graphite.c (build_scops_1): Initialize open_scop.exit
3746         and sinfo.last.
3747
3748 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3749
3750         * testsuite/gcc.dg/graphite/pr38084.c: New.
3751         * testsuite/gfortran.dg/graphite/id-1.f90: New.
3752         * testsuite/gfortran.dg/graphite/id-2.f90: New.
3753         * testsuite/gfortran.dg/graphite/id-3.f90: New.
3754         * testsuite/gfortran.dg/graphite/id-4.f90: New.
3755         * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3756
3757 2008-12-02  Sebastian Pop  <sebastian.pop@amd.com>
3758             Jan Sjodin  <jan.sjodin@amd.com>
3759             Harsha Jagasia  <harsha.jagasia@amd.com>
3760
3761         PR middle-end/37852
3762         PR middle-end/37883
3763         PR middle-end/37928
3764         PR middle-end/37980
3765         PR middle-end/38038
3766         PR middle-end/38039
3767         PR middle-end/38073
3768         PR middle-end/38083
3769         PR middle-end/38125
3770
3771         * testsuite/gcc.dg/graphite/pr38073.c: New.
3772         * testsuite/gcc.dg/graphite/pr37928.c: New.
3773         * testsuite/gcc.dg/graphite/pr37883.c: New.
3774         * testsuite/gcc.dg/graphite/pr38125.c: New.
3775         * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3776         * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3777         * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3778
3779         * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3780         the number of detected scops.  Copy exact same test for loop
3781         blocking...
3782         * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3783         loops to be blocked as reductions are not handled.
3784         * testsuite/gcc.dg/graphite/block-4.c: ...here.  New.
3785
3786         * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3787         * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3788         ...here.
3789         * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3790         * Makefile.in (graphite.o): Depend on value-prof.h.
3791         (graphite.o-warn): Removed -Wno-error.
3792         * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3793         to be a NULL pointer.  Call update_stmt.  Return the newly created
3794         cannonical induction variable.
3795
3796         * graphite.h (debug_rename_map): Declared.  Fix some comments.
3797
3798         * graphite.c: Reimplement the code generation from graphite to gimple.
3799         Include value-prof.h.
3800         (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3801         (get_old_iv_from_ssa_name): Removed.
3802         (graphite_stmt_p): New.
3803         (new_graphite_bb): Test for useful statements before building a
3804         graphite statement for the basic block.
3805         (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3806         in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3807         reason.
3808         (recompute_all_dominators, graphite_verify,
3809         nb_reductions_in_loop, graphite_loop_normal_form): New.
3810         (scop_record_loop): Call graphite_loop_normal_form.
3811         (build_scop_loop_nests): Iterate over all the blocks of the
3812         function instead of relying on the incomplete information from
3813         SCOP_BBS.  Return the success of the operation.
3814         (find_params_in_bb): Use the data from GBB_DATA_REFS.
3815         (add_bb_domains): Removed.
3816         (build_loop_iteration_domains): Don't call add_bb_domains.
3817         Add the iteration domain only to the basic blocks that have been
3818         translated to graphite.
3819         (build_scop_conditions_1): Add constraints only if the basic
3820         block have been translated to graphite.
3821         (build_scop_data_accesses): Completely disabled until data
3822         dependence is correctly implemented.
3823         (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3824         (remove_all_edges_1, remove_all_edges): Removed.
3825         (get_new_name_from_old_name): New.
3826         (graphite_rename_variables_in_stmt): Renamed
3827         rename_variables_in_stmt.  Call get_new_name_from_old_name.
3828         Use replace_exp and update_stmt.
3829         (is_old_iv): Renamed is_iv.
3830         (expand_scalar_variables_stmt): Extra parameter for renaming map.
3831         Use replace_exp and update_stmt.
3832         (expand_scalar_variables_expr): Same.  Use the map to get the
3833         new names for the renaming of induction variables and for the
3834         renaming of variables after a basic block has been copied.
3835         (expand_scalar_variables): Same.
3836         (graphite_rename_variables): Renamed rename_variables.
3837         (move_phi_nodes): Removed.
3838         (get_false_edge_from_guard_bb): New.
3839         (build_iv_mapping): Do not insert the induction variable of a
3840         loop in the renaming iv map if the basic block does not belong
3841         to that loop.
3842         (register_old_new_names, graphite_copy_stmts_from_block,
3843         copy_bb_and_scalar_dependences): New.
3844         (translate_clast): Heavily reimplemented: copy basic blocks,
3845         do not move them.  Finally, in call cleanup_tree_cfg in gloog.
3846         At each translation step call graphite_verify ensuring the
3847         consistency of the SSA, loops and dominators information.
3848         (collect_virtual_phis, find_vdef_for_var_in_bb,
3849         find_vdef_for_var_1, find_vdef_for_var,
3850         patch_phis_for_virtual_defs): Removed huge hack.
3851         (mark_old_loops, remove_dead_loops, skip_phi_defs,
3852         collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3853         gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3854         (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3855         if_region_get_condition_block, if_region_set_false_region,
3856         create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3857         sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3858         sese_add_exit_phis_edge, sese_add_exit_phis_var,
3859         rewrite_into_sese_closed_ssa): New.
3860         (gloog): Remove dead code.  Early return if code cannot be
3861         generated.  Call cleanup_tree_cfg once the scop has been code
3862         generated.
3863         (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3864         block loops with less than two loops.
3865         (graphite_apply_transformations): Remove the call to
3866         scop_remove_ignoreable_gbbs.
3867         (limit_scops): When build_scop_loop_nests fails, continue on
3868         the next scop.  Fix open_scop.entry.
3869         (graphite_transform_loops): Call recompute_all_dominators: force the
3870         recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3871         Call initialize_original_copy_tables and free_original_copy_tables
3872         to be able to copy basic blocks during code generation.
3873         When build_scop_loop_nests fails, continue on next scop.
3874         (value_clast): New union.
3875         (clast_to_gcc_expression): Fix type cast warning.
3876
3877 2008-11-09  Sebastian Pop  <sebastian.pop@amd.com>
3878
3879         * Merge from mainline (r140838:141727).
3880
3881 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3882
3883         PR middle-end/37833
3884
3885         * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3886
3887 2008-11-05  Tobias Grosser  <grosser@fim.uni-passau.de>
3888
3889         PR middle-end/37943
3890
3891         * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3892         exits and conditions.
3893         * testsuite/gcc.dg/graphite/pr37943.c: New.
3894
3895 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3896
3897         PR middle-end/37886
3898         * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3899
3900 2008-10-23  Tobias Grosser  <grosser@fim.uni-passau.de>
3901
3902         * doc/invoke.texi: Fix spaces.
3903
3904 2008-10-22  Sebastian Pop  <sebastian.pop@amd.com>
3905
3906         PR tree-optimization/37891
3907         Reverted last commit.
3908         * graphite.c (create_single_entry_edge): Set
3909         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3910
3911 2008-10-21  Sebastian Pop  <sebastian.pop@amd.com>
3912             Mitul Thakkar  <mitul.thakkar@amd.com>
3913
3914         * graphite.c (create_single_entry_edge): Set
3915         EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3916
3917 2008-10-16  Tobias Grosser  <grosser@fim.uni-passau.de>
3918
3919         * doc/invoke.texi: Add -fgraphite-identity.
3920         * graphite.c (graphite_apply_transformations): Check for
3921         -fgraphite-identity.
3922         * toplev.c (process_options): Add flag_graphite_identity.
3923         * tree-ssa-loop.c: Add flag_graphite_identity.
3924
3925 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3926
3927         Undo changes from 2008-10-02:
3928         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3929         operand type when copying the operand to a variable of different type.
3930         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3931 &