OSDN Git Service

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