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         -fgraphite-identity.
3913         * toplev.c (process_options): Add flag_graphite_identity.
3914         * tree-ssa-loop.c: Add flag_graphite_identity.
3915
3916 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3917
3918         Undo changes from 2008-10-02:
3919         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3920         operand type when copying the operand to a variable of different type.
3921         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3922         with the IV name after increment.
3923
3924 2008-10-14  Sebastian Pop  <sebastian.pop@amd.com>
3925             Harsha Jagasia  <harsha.jagasia@amd.com>
3926
3927         PR tree-optimization/37828
3928         * testsuite/gcc.dg/graphite/pr37828.c: New.
3929         * graphite.c (graphite_trans_loop_block): Do not loop block
3930         single nested loops.
3931
3932 2008-10-09  Harsha Jagasia  <harsha.jagasia@amd.com>
3933             Sebastian Pop  <sebastian.pop@amd.com>
3934
3935         * graphite.c (struct rename_map_elt, new_rename_map_elt,
3936         rename_map_elt_info, eq_rename_map_elts): New.
3937         (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3938         (expand_scalar_variables_expr): Change parameters.
3939         (expand_scalar_variables_stmt): Same.
3940         (expand_scalar_variables): Same.
3941         (graphite_rename_ivs): Rename graphite_rename_variables.
3942         (build_iv_mapping): New.
3943         (translate_clast): Call build_iv_mapping.
3944         * graphite.h (gbb_p): New name.
3945
3946 2008-10-03  Harsha Jagasia  <harsha.jagasia@amd.com>
3947
3948         PR tree-optimization/37684
3949         * gcc.dg/graphite/pr37684.c: New.
3950         * graphite.c (exclude_component_ref): New.
3951         (is_simple_operand): Call exclude_component_ref.
3952
3953 2008-10-02  Jan Sjodin  <jan.sjodin@amd.com>
3954             Harsha Jagasia  <harsha.jagasia@amd.com>
3955
3956         PR tree-optimization/37485
3957         * gcc.dg/graphite/block-2.c: New
3958         * graphite.c (gmp_cst_to_tree): Moved.
3959         (iv_stack_entry_is_constant): New.
3960         (iv_stack_entry_is_iv): New.
3961         (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3962         (loop_iv_stack_insert_constant): New.
3963         (loop_iv_stack_pop): Use new datatpype.
3964         (loop_iv_stack_get_iv): Same.
3965         (loop_iv_stack_get_iv_from_name): Same.
3966         (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3967         (loop_iv_stack_patch_for_consts): New.
3968         (loop_iv_stack_remove_constants): New.
3969         (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3970         (translate_clast): Call loop_iv_stack_patch_for_consts and
3971         loop_iv_stack_remove_constants.
3972         (gloog): Use new datatype.  Redirect construction edge to end
3973         block to avoid accidental deletion.
3974         * graphite.h (enum iv_stack_entry_kind): New.  Tag for data in
3975         iv stack entry.
3976         (union iv_stack_entry_data): New.  Data in iv stack entry.
3977         (struct iv_stack_entry): New.  Datatype for iv stack entries.
3978
3979 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3980
3981         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3982         operand type when copying the operand to a variable of different type.
3983
3984 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3985
3986         * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3987         with the IV name after increment.
3988
3989 2008-10-02  Sebastian Pop  <sebastian.pop@amd.com>
3990
3991         * Merge from mainline (r140164:140838).
3992
3993 2008-09-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
3994
3995         * graphite-data-ref.c: New.
3996         * graphite.c (print_scop): Also dump the dependence graph.
3997         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3998         (new_scop): Initialize SCOP_DEP_GRAPH.
3999         (build_scop_dynamic_schedules): New.
4000         (build_access_matrix_with_af): Fixed column numbering.
4001         (graphite_transform_loops): Call build_scop_dynamic_schedules.
4002         * graphite.h: Add ifndef/define guards against multiple inclusion.
4003         (struct scop): Add dep_graph field.
4004         (SCOP_DEP_GRAPH): Defined.
4005         (ref_nb_loops): Fixed and moved to other position.
4006         (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
4007         (nb_loops_around_loop_in_scop): New.
4008         (graphite_dump_dependence_graph): Declared.
4009         (graphite_build_rdg_all_levels): Declared.
4010         (graphite_test_dependence): Declared.
4011         * Makefile.in (graphite-data-ref.o): New target.
4012
4013 2008-09-09  Sebastian Pop  <sebastian.pop@amd.com>
4014
4015         * Merge from mainline (139870:140164).
4016
4017 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
4018
4019         * Merge from mainline (138275:139870).
4020         * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
4021         the commits from trunk broke the niter detection.
4022
4023 2008-09-01  Sebastian Pop  <sebastian.pop@amd.com>
4024
4025         * graphite.c: Add more documentation.  Fix formatting.
4026         (debug_loop_vec, debug_oldivs, loop_iv_stack,
4027         loop_iv_stack_debug): Moved...
4028         (schedule_to_scattering): Move before use.
4029         (dot_all_scops): Include in "#if 0" the code for system
4030         call dotty.
4031
4032         * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
4033         loop_iv_stack_debug): ...here.
4034
4035 2008-08-29  Jan Sjodin  <jan.sjodin@amd.com>
4036
4037         * tree-phinodes.c (make_phi_node): Extern.
4038         (add_phi_node_to_bb): New.
4039         (create_phi_node): Call add_phi_node_to_bb.
4040         * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
4041         (remove_statement): Handle case where stored phi was updated
4042         and is no longer the same.
4043         * graphite.c (is_parameter): New.
4044         (is_old_iv): New.
4045         (expand_scalar_variables_expr): New.
4046         (expand_scalar_variables_stmt): New.
4047         (expand_scalar_variables): New.
4048         (move_phi_nodes): Create new phi instead of moving old one.
4049         (translate_clast): Call expand_scalar_variables.
4050         (find_vdef_for_var_in_bb): Also scan regular definitions.
4051         (skip_phi_defs): New.
4052         (collect_scop_exit_phi_args): New.
4053         (patch_scop_exit_phi_args): New.
4054         (gloog): Patch phis after scop.
4055         * tree-flow.h: (add_phi_node_to_bb): Declared.
4056         (make_phi_node): Declared.
4057
4058 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
4059
4060         * graphite.c (end_scop): Split the entry of the scop when it
4061         is the header of the loop in which the scop is ending.
4062         (build_scops_1, limit_scops): Update uses of end_scop.
4063
4064 2008-08-26  Sebastian Pop  <sebastian.pop@amd.com>
4065
4066         * graphite.c (dot_all_scops_1): Do not fail on uninitialized
4067         SCOP_ENTRY or SCOP_EXIT.
4068
4069 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4070
4071         * graphite.c (get_construction_edge): Removed.
4072         (gloog): Construction edge is the scop entry edge.
4073
4074 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4075
4076         * graphite.c (can_generate_for_scop): Removed.
4077         (gloog): Do not call it.
4078
4079 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4080
4081         * graphite.c (new_scop): Entry of a scop is an edge.
4082         Initialize SESE region.
4083         (free_scop): Free SESE region.
4084         (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
4085         (split_difficult_bb): New, split from end_scop.
4086         (end_scop): Exit of a scop is an edge.
4087         (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
4088         not automatically updated and thus is always wrong.
4089         * graphite.h (struct sese): New.
4090         (SESE_ENTRY): New.
4091         (SESE_EXIT): New.
4092         (struct scop): New field for a SESE region.  Remove entry, exit.
4093         (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
4094         semantics as before.  Moved comment around.
4095
4096 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4097             Sebastian Pop  <sebastian.pop@amd.com>
4098
4099         * graphite.c (graphite_transform_loops): Always enable gloog
4100         and find_transform when ENABLE_CHECKING.
4101
4102 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4103
4104         * graphite.c (graphite_transform_loops): Move pretty printer
4105         of SCOPs before doing any transform.  Remove call to print_scops
4106         and dot_all_scops_1.
4107
4108 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4109
4110         * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
4111         (print_graphite_bb): Same.
4112
4113 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4114
4115         * graphite.c (dot_all_scops_1): Cleanup.
4116         (move_scops): Fix comment.
4117
4118 2008-08-25  Sebastian Pop  <sebastian.pop@amd.com>
4119
4120         * graphite.c (build_scop_bbs): Revert commit 139355:
4121
4122         2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4123                     Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4124
4125                 * graphite.c (build_scop_bbs): Factor up code.
4126
4127 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4128
4129         * graphite.c (gloog): Update dominator info.
4130
4131 2008-08-25  Tobias Grosser  <grosser@fim.uni-passau.de>
4132
4133         * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
4134
4135 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4136
4137         * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
4138         initialization.
4139         (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
4140         (translate_clast): Correct formatting.
4141         * graphite.h (struct num_map): Removed.
4142         (struct graphite_bb): Remove num_map field.
4143         (GBB_INDEX_TO_NUM_MAP): Removed.
4144
4145 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4146
4147         * graphite.c (build_access_matrix_with_af): Fix comments.
4148         (build_scop_data_accesses): Same.
4149
4150 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4151
4152         * graphite.c (build_scop_data_accesses): Don't construct
4153         access matrices.  Add a FIXME and an assert condition that
4154         should pass when the access matrices will be needed.
4155
4156 2008-08-24  Sebastian Pop  <sebastian.pop@amd.com>
4157
4158         * tree-data-ref.c (stmt_simple_memref_p): Don't call
4159         really_constant_p.
4160         * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4161         Moved close by free_graphite_bb.
4162         (free_graphite_bb): Call free_data_refs.  Reset bb->aux.
4163         (new_scop): Move close by free_scop.
4164         (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4165
4166 2008-08-22  Jan Sjodin  <jan.sjodin@amd.com>
4167
4168         * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4169         * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4170         instead of recursive call.
4171         (graphite_translate_clast_equation): New.
4172         (graphite_create_guard_cond_expr): New.
4173         (graphite_create_new_guard): New.
4174         (get_stack_index_from_iv): Removed.
4175         (graphite_rename_ivs_stmt): Use gbb_loop_index.
4176         (get_true_edge_from_guard_bb): New.
4177         (translate_clast): Handle stmt_guard in clast.
4178         (get_construction_edge): Allow construction edge detection for
4179         a scope entry with multiple predecessors if one predecessor is
4180         the immediate dominator of scope entry.
4181         (can_generate_code_stmt): Enable code generation for clast_guard.
4182         (gloog): Use correct context loop.  Removed check for post dominators.
4183         * cfgloop.h (create_empty_if_region_on_edge): Declared.
4184
4185 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4186
4187         * graphite.c (remove_dead_loops): Document better which
4188         loops are removed.
4189
4190 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4191
4192         * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4193         and PPLINC.
4194         (graphite.o): Also depends on pointer-set.h.
4195
4196 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4197
4198         * graphite.c (scop_record_loop): Fix compile warning.
4199
4200 2008-08-21  Harsha Jagasia  <harsha.jagasia@amd.com>
4201             Sebastian Pop  <sebastian.pop@amd.com>
4202
4203         * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4204
4205 2008-08-21  Sebastian Pop  <sebastian.pop@amd.com>
4206
4207         * graphite.c (build_graphite_bb): Initialize bb->aux to
4208         point to the graphite_bb_p.
4209         (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4210         content of bb->aux.
4211         (add_bb_domains): Does not use the scop parameter.
4212         (graphite_transform_loops): Clean bb->aux at the end.
4213
4214 2008-08-20  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4215             Sebastian Pop  <sebastian.pop@amd.com>
4216
4217         * testsuite/lib/target-supports.exp
4218         (check_effective_target_fgraphite): New.
4219
4220         * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4221         check_effective_target_fgraphite returns false.
4222         Set dg-do-what-default to compile.
4223         (scan-graphite-dump-times): Removed.
4224         * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4225
4226         * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4227         Use scan-tree-dump-times instead of scan-graphite-dump-times.
4228         * testsuite/gcc.dg/graphite/scop-1.c: Same.
4229         * testsuite/gcc.dg/graphite/scop-2.c: Same.
4230         * testsuite/gcc.dg/graphite/scop-3.c: Same.
4231         * testsuite/gcc.dg/graphite/scop-4.c: Same.
4232         * testsuite/gcc.dg/graphite/scop-5.c: Same.
4233         * testsuite/gcc.dg/graphite/scop-6.c: Same.
4234         * testsuite/gcc.dg/graphite/scop-7.c: Same.
4235         * testsuite/gcc.dg/graphite/scop-8.c: Same.
4236         * testsuite/gcc.dg/graphite/scop-9.c: Same.
4237         * testsuite/gcc.dg/graphite/scop-10.c: Same.
4238         * testsuite/gcc.dg/graphite/scop-11.c: Same.
4239         * testsuite/gcc.dg/graphite/scop-12.c: Same.
4240         * testsuite/gcc.dg/graphite/scop-13.c: Same.
4241         * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4242         * testsuite/gcc.dg/graphite/scop-14.c: Same.
4243         * testsuite/gcc.dg/graphite/scop-15.c: Same.
4244         * testsuite/gcc.dg/graphite/block-0.c: Same.
4245         * testsuite/gcc.dg/graphite/scop-16.c: Same.
4246         * testsuite/gcc.dg/graphite/block-1.c: Same.
4247         * testsuite/gcc.dg/graphite/scop-17.c: Same.
4248         * testsuite/gcc.dg/graphite/scop-18.c: Same.
4249         * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4250         * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4251         * testsuite/gfortran.dg/graphite/block-2.f: Same.
4252
4253 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4254
4255         * graphite.c: Fix some XXX comments.
4256         (build_scop_dynamic_schedules): Removed.
4257
4258 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4259
4260         * graphite.h (scop_max_loop_depth): Moved...
4261         * graphite.c (scop_max_loop_depth): ...here.
4262         (remove_all_edges_1): New.
4263         (remove_all_edges): Factored code.
4264         (remove_cond_exprs): Check only the last statement for
4265         a GIMPLE_COND expression.
4266
4267 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4268
4269         * graphite.c (scan_tree_for_params): Early return when the
4270         expression is a chrec_dont_know.  Handle case NEGATE_EXPR.
4271         (find_scop_parameters): Factor out code.
4272         (graphite_trans_bb_strip_mine): Remove dead code.
4273
4274 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4275
4276         * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4277         graphite_trans_bb_move_loop): Factor asserts.
4278         (gloog): Perform sanity checks only for ENABLE_CHECKING.
4279         Do not call calculate_dominance_info and estimate_bb_frequencies.
4280
4281 2008-08-20  Jan Sjodin  <jan.sjodin@amd.com>
4282
4283         * graphite.c (create_loops_mapping, free_loops_mapping,
4284         create_loops_mapping_num, debug_loop_mapping_1,
4285         debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4286         get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4287         graphite_loops_mapping_add_child_num,
4288         graphite_loops_mapping_insert_child,
4289         graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4290         get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4291         loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4292         create_num_from_index, get_num_from_index,
4293         swap_loop_mapped_depth): Removed.
4294         (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4295         (free_scop): Do not call free_loops_mapping.
4296         (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4297         get_stack_index_from_iv.  Use GBB_LOOPS instead of calling
4298         get_loop_mapped_depth.
4299         (graphite_trans_bb_move_loop): Do not update the loop mapping.
4300         (graphite_trans_bb_strip_mine): Same.
4301         * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4302         (struct scop): Remove field loops_mapping.
4303
4304 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4305             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4306
4307         * graphite.c (scop_record_loop): Factor out one level of the
4308         condition by early return.
4309         (build_scop_loop_nests): Format following FSF coding style.
4310         (build_scop_dynamic_schedules): Factor out code.
4311         (scopdet_bb_info): Reindent.  Default case should not be reachable.
4312
4313 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4314             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4315
4316         * graphite.c (loop_affine_expr): Check for DECL_P or struct
4317         assignments that are not handled as simple operands for now.
4318
4319 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4320             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4321
4322         * graphite.c (build_scop_bbs): Factor up code.
4323
4324 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4325             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4326
4327         * graphite.c (stmt_simple_for_scop_p): Factor code out
4328         of the loop.
4329         (enum gbb_type): New.  Group all the GBB_* types under it.
4330         (is_loop_exit): Moved...
4331         (end_scop): Enable BB spliting.
4332         * cfgloop.c (is_loop_exit): ...here.  Reimplemented.
4333         * cfgloop.h (is_loop_exit): Declared.
4334
4335 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4336
4337         * doc/invoke.texi: Remove strides from examples containing
4338         DO loops when the strides are equal to 1.
4339
4340 2008-08-20  Harsha Jagasia  <harsha.jagasia@amd.com>
4341             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4342
4343         * graphite.c (graphite_trans_scop_block): Or the result with
4344         the result from graphite_trans_loop_block.
4345         * testsuite/gcc.dg/graphite/block-1.c: New.
4346         * testsuite/gfortran.dg/graphite/block-1.f90: New.
4347         * testsuite/gfortran.dg/graphite/block-2.f: New.
4348
4349 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4350
4351         * graphite.c (graphite_transform_loops): Call cloog_initialize
4352         and cloog_finalize.
4353
4354 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4355
4356         * tree-data-ref.c) (stmt_simple_memref_p): New.
4357         * tree-data-ref.h (stmt_simple_memref_p): Declared.
4358         * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4359         (is_simple_operand): Call stmt_simple_memref_p.
4360
4361         * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4362         using pointer arithmetic, as this is optimized by PRE and
4363         makes the code too difficult to analyze.
4364
4365         * testsuite/gcc.dg/graphite/scop-18.c: Same.
4366
4367 2008-08-20  Sebastian Pop  <sebastian.pop@amd.com>
4368
4369         * gdbinit.in (pgg): New.
4370
4371 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4372
4373         * graphite.c (graphite_trans_loop_block): Fix warning.
4374
4375 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4376
4377         * graphite.c (graphite_trans_loop_block): Fix my merge error.
4378
4379 2008-08-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4380
4381         * graphite.c (graphite_trans_bb_block): Remove check for
4382         flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4383         Check if loop blocking is profitable for every loop, before applying
4384         the changes.
4385         (graphite_apply_transformations): Call graphite_trans_bb_block only,
4386         if flag_loop_block is set.
4387
4388 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4389
4390         * graphite.c: Add some more documentation for the loop
4391         mapping.
4392
4393 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4394
4395         * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4396         * graphite.c: Format on less than 80 columns.
4397         * graphite.h: Same.
4398
4399 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4400
4401         * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4402
4403 2008-08-14  Sebastian Pop  <sebastian.pop@amd.com>
4404
4405         * doc/invoke.texi (floop-block, floop-strip-mine,
4406         floop-interchange): Update documentation with examples.
4407
4408 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
4409
4410         * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4411         add_referenced_var.
4412         * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4413
4414 2008-08-13  Sebastian Pop  <sebastian.pop@amd.com>
4415
4416         * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4417         Factor gcc_asserts into a single one.  Use force_gimple_operand_gsi.
4418         * tree-scalar-evolution.c: Revert useless changes.
4419         * tree-phinodes.c: Same.
4420         * cfghooks.c: Same.
4421         * vec.h: Same.
4422         * tree-vectorizer.h: Same.
4423         * tree-flow.h: Same.
4424         * tree-cfg.c: Same.
4425         * common.opt (fgraphite): Update documentation.
4426
4427 2008-08-12  Harsha Jagasia  <harsha.jagasia@amd.com>
4428
4429         * doc/invoke.texi (-floop-block, -floop-strip-mine,
4430         -floop-interchange): Add more text for explaining what each of these
4431         flags is doing.
4432         * tree-into-ssa.c (gimple_vec): Moved to...
4433         * graphite.c: Include gimple.h.
4434         (gimple_vec): Moved to...
4435         (del_loop_to_cloog_loop): Removed.
4436         (loop_affine_expr): Do not call create_data_ref when the
4437         operand is a constant.
4438         (new_scop): Use free instead of del_loop_to_cloog_loop.
4439         * Makefile.in (graphite.o): Depend on GIMPLE_H.
4440         * gimple.h (gimple_vec): ... here.
4441
4442 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4443
4444         * graphite.c (scopdet_bb_info): Only allow loops with known number of
4445         latch executions.
4446         (build_loop_iteration_domains): Fail, if latch executions unknown.
4447
4448 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4449
4450         * graphite.c (add_conditions_to_domain): New.
4451         (build_scop_conditions_1): Call add_conditions_to_domain.
4452         (set_cloog_options): Allow to disable optimizations.
4453
4454 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4455
4456         * graphite.c (find_params_in_bb): Look for parameters in conditions.
4457         Do not use walk_dominator_tree.
4458         (find_scop_parameters): Do not use walk_dominator_tree.
4459
4460 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4461
4462         * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4463         (idx_record_params): Adapt.
4464         * graphite.h (scop_gimple_loop_depth): New.
4465
4466 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4467
4468         * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4469         (scan_tree_for_params): Remove value_init.
4470         (build_scop_context): Remove value_init.
4471         (build_loop_iteration_domains): Remove value_init.
4472         (schedule_to_scattering): Remove value_init.
4473         (graphite_trans_bb_strip_mine): Remove value_init.
4474
4475 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4476
4477         * gcc/graphite.c (limit_scops): New.
4478         (graphite_transform_loops): Add limit SCoPs.
4479         * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4480         * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4481         * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4482         * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4483         * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4484         * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4485         * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4486         * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4487         * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4488         Change loop numbers.
4489         * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4490         Change loop numbers.
4491         * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4492         * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4493         * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4494         * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4495         * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4496         * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4497         * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4498         * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4499         * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4500         * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4501
4502 2008-08-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4503
4504         * graphite.c (graphite_transform_loops): Call always find_transform.
4505
4506 2008-08-08  Tobias Grosser  <grosser@fim.uni-passau.de>
4507
4508         * graphite.c (free_loops_mapping): New.
4509         (stmt_simple_for_scop_p): Fix typo.
4510         (stmt_simple_for_scop_p): Fix tuples functions, that
4511         broke polyhedron.
4512         (free_graphite_bb): Fix some memleaks.
4513         (free_scop): Fix some memleaks.
4514         (scopdet_bb_info): Do not forget some tmp SCoPs.
4515         (find_params_in_bb): Fix some memleaks.
4516         (clast_to_gcc_expression): Fix warning.
4517
4518 2008-08-07  Tobias Grosser  <grosser@fim.uni-passau.de>
4519
4520         * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4521         * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4522
4523 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
4524
4525         * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4526         Move code ifdef-ed HAVE_cloog...
4527         * graphite.c: Include toplev.h.
4528         ... here.
4529         * Makefile.in (OBJS-common): Always build graphite.o.
4530         (BACKEND): Remove @GRAPHITE@.
4531         (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4532         (graphite.o): Depend on TOPLEV_H.
4533
4534 2008-08-04  Sebastian Pop  <sebastian.pop@amd.com>
4535
4536         * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4537         Remove typo left from polylib to ppl conversion.
4538         * graphite.c (graphite_transforms): Use sorry instead of fatal.
4539
4540 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
4541
4542         * toplev.c (process_options): Move the graphite loop optimization
4543         flags...
4544         * tree-ssa-loop.c (graphite_transforms): ... here.
4545         When not configured with CLooG, print to dump_file that
4546         Graphite transforms were not performed.
4547         * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4548         New.
4549         * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4550         scan-graphite-dump-times.
4551
4552 2008-08-03  Sebastian Pop  <sebastian.pop@amd.com>
4553
4554         * graphite.c (dot_scop, dot_all_scops): Do not call system.
4555         Do not open /tmp/scop.dot and /tmp/allscops.dot.
4556
4557 2008-08-02  Sebastian Pop  <sebastian.pop@amd.com>
4558             Jan Sjodin  <jan.sjodin@amd.com>
4559
4560         * configure: Regenerated.
4561         * omp-low.c (expand_omp_sections): Remove now unused code.
4562         * config.in (HAVE_polylib): Removed.
4563         * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4564         (PPLLIBS, PPLINC): Added.
4565         * graphite.c: Replace unsigned with int wherever possible.
4566         Don't access Cloog's data structures, but use accessor functions.
4567         Clast's stmt->type is now implemented as a vtable: change the
4568         switches of stmt->type into ifs.
4569         (polylib/polylibgmp.h): Don't include.
4570         (initialize_dependence_polyhedron,
4571         initialize_data_dependence_polyhedron, is_empty_polyhedron,
4572         statement_precedes_p, test_dependence, build_rdg_all_levels,
4573         dump_dependence_graph): Removed until this code is cleaned up
4574         or ported to Cloog.
4575         * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4576         (POLYLIBINC): Renamed PPLINC.
4577
4578 2008-08-01  Harsha Jagasia  <harsha.jagasia@amd.com>
4579             Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4580             Jan Sjodin  <jan.sjodin@amd.com>
4581
4582         Finish the merge and tuplification of graphite.
4583
4584 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
4585             Jan Sjodin  <jan.sjodin@amd.com>
4586
4587         Partial merge from mainline (138072:138275).
4588         * graphite.c still has to be tuplified.
4589
4590 2008-07-29  Jan Sjodin  <jan.sjodin@amd.com>
4591
4592         * graphite.c (graphite_loops_mapping_max_loop_num): New.
4593         (create_num_from_index): New.
4594         (get_num_from_index): Also pass in the graphite BB.
4595         (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4596         (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4597         (graphite_trans_bb_strip_mine): Call create_num_from_index.
4598         (is_interchange_valid): Return false when failing.
4599         * graphite.h (struct num_map): New.
4600         (struct graphite_bb): New field num_map.
4601         (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4602
4603 2008-07-29  Tobias Grosser  <grosser@fim.uni-passau.de>
4604
4605         * graphite.c (dump_gbb_conditions): Print also conditions like
4606         "if (a)".  Remove dublicated code and use print_generic_expr ().
4607         (stmt_simple_for_scop_p): Only allow conditions we can handle
4608         {<, <=, >, >=}.
4609
4610 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
4611
4612         * graphite.h (struct scop): Removed new_ivs field.
4613         (SCOP_NEWIVS): Deleted.
4614         * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4615         clast_to_gcc_expression, graphite_create_new_loop):
4616         Removed use of new_ivs.
4617
4618 2008-07-25  Jan Sjodin  <jan.sjodin@amd.com>
4619
4620         * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4621         create_loops_mapping_num, debug_loop_mapping_1): New.
4622         (debug_loop_mapping): Call debug_loop_mapping_1.
4623         (get_loop_mapping_for_num,
4624         graphite_loops_mapping_add_child,
4625         graphite_loops_mapping_add_child_num,
4626         graphite_loops_mapping_insert_child,
4627         graphite_loops_mapping_parent,
4628         split_loop_mapped_depth_for_num,
4629         loop_mapped_depth_split_loop): New.
4630         (increment_loop_mapped_depths): Removed.
4631         (swap_loop_mapped_depth_for_num): Reimplemented.
4632         (new_scop): Call create_loops_mapping.
4633         (scop_record_loop): Call graphite_loops_mapping_insert_child.
4634         (translate_clast): Pass the old loop father in parameter, and pass
4635         it to get_old_iv_from_ssa_name.
4636         (remove_edges_around_useless_blocks, can_generate_code_stmt,
4637         can_generate_code, can_generate_for_scop): New.
4638         (graphite_trans_bb_block): Returns false when it fails to transform.
4639         * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4640
4641 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4642
4643         Reverted all the changes related to the streamization and
4644         loop fusion.
4645         These changes are now tracked in the streamization branch.
4646
4647 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4648             Jan Sjodin  <jan.sjodin@amd.com>
4649
4650         * graphite.c (gbb_compare): Correctly constify.
4651         (gbb_can_be_ignored): Indent.
4652         (graphite_trans_scop_swap_1and2): Add legality check.
4653         Remove dead FIXMEs.
4654
4655 2008-07-25  Sebastian Pop  <sebastian.pop@amd.com>
4656
4657         Remove fallouts from "Reverted the Condate changes".
4658         * tree.h: Remove unused decl.
4659         * testsuite/gcc.dg/tree-checker: Same.
4660         * timevar.def: Remove counter.
4661
4662 2008-07-24  Sebastian Pop  <sebastian.pop@amd.com>
4663
4664         * Merge from mainline (135673:138072).
4665
4666         Reverted the MIRO changes (from 2008-04-05) that are now
4667         tracked in the miro branch.
4668         * tree-bounds.c: Removed.
4669         * tree-bounds.h: Removed.
4670
4671         Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4672         are now tracked in the condate branch.
4673         * tree-check.c: Removed.
4674         * tree-match.c: Removed.
4675         * condate.y: Removed.
4676
4677 2008-07-24  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4678
4679         * common.opt: New user flag -floop-block, -floop-strip-mine
4680         and -floop-interchange.
4681         * toplev.c (process_options): Enable -fgraphite pass if any one of the
4682         graphite loop optimization flags is turned on.
4683         * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4684         flag_loop_strip_mine and flag_loop_interchange checks before
4685         optimizations.
4686         * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4687         -floop-strip-mine and -floop-interchange.
4688         * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4689         -fgraphite.
4690         * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4691         * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4692         * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4693
4694 2008-07-23  Jan Sjodin  <jan.sjodin@amd.com>
4695             Sebastian Pop  <sebastian.pop@amd.com>
4696
4697         * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4698         (create_empty_loop_on_edge): More fixes.
4699         * tree-phinodes.c (resize_phi_node): Extern.
4700         (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4701         * cfghooks.c (update_dominator_information): New split from
4702         split_edge.
4703         * tree-vectorizer.c (rename_variables_in_bb): Extern.
4704         * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4705         successor of the function entry block.
4706
4707         * graphite.c: Include pointer-set.h.
4708         (debug_loop_mapping, increment_loop_mapped_depths,
4709         get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4710         set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4711         swap_loop_mapped_depth_for_num, get_num_from_index,
4712         swap_loop_mapped_depth, loop_iv_stack_debug,
4713         loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4714         loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4715         get_old_iv_from_ssa_name): New.
4716         (new_scop): Initialize SCOP_LOOPS_MAPPING.
4717         (free_scop): Free SCOP_LOOPS_MAPPING.
4718         (scop_record_loop): Record old ivs.
4719         (create_var_name): Removed.
4720         (initialize_cloog_names): Allocate double space in case strip mine
4721         applies to all loops once.
4722         (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4723         (clast_to_gcc_expression): Same.  Implement more clast to gimple
4724         translation.
4725         (graphite_create_new_loop): Pass in ivstack.
4726         (remove_all_edges): Pass in the construction_edge.
4727         (graphite_remove_iv): Removed.
4728         (graphite_rename_ivs, graphite_rename_ivs_stmt,
4729         remove_cond_exprs): Rewritten.
4730         (move_phi_nodes): New.
4731         (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4732         (translate_clast): Pass in ivstack.  Rewrite some cases.
4733         (set_cloog_options, debug_clast_stmt): New.
4734         (find_transform): Use set_cloog_options.
4735         (outermost_loop_layer): Removed.
4736         (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4737         find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4738         mark_old_loops, remove_dead_loops): New.
4739         (gloog): Rewritten.
4740         (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4741         (const_column_index, get_first_matching_sign_row_index,
4742         get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4743         get_upper_bound): New.
4744         (graphite_trans_bb_strip_mine): Also update the iv map.
4745
4746         * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4747         (struct name_tree): Add a loop field.
4748         (struct scop): Add a graphite_loops_mapping field.
4749         (SCOP_LOOPS_MAPPING): New.
4750         (debug_clast_stmt): Declare.
4751         * lambda.h (find_induction_var_from_exit_cond): Declare.
4752         (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4753         * cfgloop.h (update_dominators_in_loop): Removed declaration.
4754         (create_empty_loop_on_edge): Updated.
4755         * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4756         rename_variables_in_bb): Declare.
4757         * tree-cfg.c (remove_bb): Extern.
4758
4759         * testsuite/gcc.dg/graphite/block-0.c: New.
4760
4761 2008-07-21  Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
4762             Sebastian Pop  <sebastian.pop@amd.com>
4763
4764         * graphite.c (strip_mine_profitable_p): New.
4765         (graphite_trans_bb_block): Disable strip mining if not profitable.
4766
4767         * testsuite/gcc.dg/graphite/scop-18.c: New.
4768         * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4769         * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4770
4771 2008-07-17  Harsha Jagasia  <harsha.jagasia@amd.com>
4772             Jan Sjodin  <jan.sjodin@amd.com>
4773             Sebastian Pop  <sebastian.pop@amd.com>
4774
4775         * graphite.c (is_interchange_valid): New.
4776         (graphite_trans_bb_block): Check loop nest of basic block for legality
4777         of interchange.
4778
4779         * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4780         outer_most_loop, gbb_outer_most_loop_index): New.
4781
4782         * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4783         * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4784         * testsuite/gcc.dg/graphite/scop-16.c: New.
4785         * testsuite/gcc.dg/graphite/scop-17.c: New.
4786
4787 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4788
4789         * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4790         (graphite_trans_scop_block): Ignore SCoPs without bbs.
4791
4792 2008-07-11  Tobias Grosser  <grosser@fim.uni-passau.de>
4793
4794         * graphite.c (new_scop): Initialize SCOP_EXIT.
4795         (scopdet_info): Add.
4796         (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4797         (build_scops_1): Cleanup, bugfixes.
4798         (build_scops): Cleanup.
4799
4800         * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4801         * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4802
4803 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4804
4805         * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4806
4807         * testsuite/gfortran.dg/graphite/graphite.exp: Use
4808         DEFAULT_GRAPHITE_FLAGS.
4809
4810         * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4811
4812 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4813
4814         * graphite.c (scan_tree_for_params): Do not assert any more if
4815         MULT_EXPR parameter is negative.
4816
4817         * testsuite/gfortran.dg/graphite/scop-1.f: New.
4818
4819         * testsuite/gfortran.dg/graphite/graphite.exp: New.
4820
4821         * testsuite/gcc.dg/graphite/scop-15.c: New.
4822
4823 2008-07-10  Harsha Jagasia  <harsha.jagasia@amd.com>
4824
4825         * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4826
4827 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4828
4829         * graphite.c (graphite_trans_bb_swap_loops): Rename from
4830         graphite_swap_loops.
4831         (graphite_trans_bb_move_loop): New.
4832         (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4833         (graphite_trans_bb_block): New.
4834         (graphite_trans_loop_block): New.
4835         (graphite_trans_scop_swap_1and2): Rename from
4836         graphite_trans_swap_1and2.
4837         (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4838         (graphite_trans_scop_block): New.
4839         (graphite_apply_transformations): Rename from
4840         graphite_transformations.
4841
4842         * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4843
4844 2008-07-10  Tobias Grosser  <grosser@fim.uni-passau.de>
4845
4846         * graphite.c (gbb_compare): New.
4847         (graphite_sort_gbbs): New.
4848         (gbb_can_be_ignored): New.
4849         (scop_remove_ignoreable_gbbs): New.
4850         (graphite_transformations): Cleanup and add
4851         scop_remove_ignoreable_gbbs.
4852         * lambda.h (lambda_vector_compare): New.
4853
4854 2008-07-09  Tobias Grosser  <grosser@fim.uni-passau.de>
4855
4856         * graphite.c (print_graphite_bb): Correct printing of static schedule.
4857         (graphite_swap_loops): int -> unsigned
4858         (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4859         (graphite_transformations): New.
4860         (graphite_transform_loops): Move to graphite_transformations.
4861         * graphite.h (gbb_nb_loops): Return unsigned.
4862
4863 2008-07-04  Tobias Grosser  <grosser@fim.uni-passau.de>
4864
4865         * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4866         the domain matrix.  This makes scop-0.c work again.
4867
4868 2008-06-20  Richard Guenther  <rguenther@suse.de>
4869
4870         * graphite.h: Adjust copyright to GPLv3.
4871         * graphite.c: Likewise.
4872         (stmt_simple_memref_for_scop_p): Split out from ...
4873         (stmt_simple_for_scop_p): ... here.  Fix handling of calls
4874         and simplify.
4875         (get_bb_type): Optimize.
4876         (is_pred): Remove.
4877         (is_bb_addable): Fix memleak, replace is_pred call with
4878         single_pred.
4879         (build_scops): Use current_loops.
4880         (param_index): Fix memleak.
4881
4882 2008-06-20  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4883
4884         * graphite.c: Fix formatting.
4885
4886 2008-06-19  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4887
4888         * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4889         (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4890         (create_var_name, save_var_name): Newly defined functions.
4891         (initialize_cloog_names): Part of the code factored out to
4892         save_var_name.
4893         (clast_to_gcc_expression): Now handles the case of clast_red_sum
4894         in clast_reduction statement.
4895         (graphite_create_new_loop): Now takes a new parameter
4896         for outer_loop.
4897         (translate_clast): Now also takes the context_loop and bb_exit
4898         parameters. Rewritten the code so that it creates a gimple code
4899         inside the given context.
4900         (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4901         remove_cond_expr, disconnect_cond_expr,
4902         disconnect_virtual_phi_nodes): Newly defined functions.
4903         * graphite.h (struct scop): added old_ivs vector.
4904         SCOP_OLDIVS: New macro.
4905
4906 2008-06-19  Sebastian Pop  <sebastian.pop@amd.com>
4907
4908         * cfgloopmanip.c: Add missing function comments, fix formatting.
4909
4910 2008-06-18  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
4911
4912         * cfgloopmanip.c (update_dominators_in_loop): Defined.
4913         (create_empty_loop_on_edge): Defined.
4914         * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4915         instead of void.
4916         * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4917         (update_dominators_in_loop): Declared as extern
4918         * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4919
4920 2008-06-16  Tobias Grosser  <grosser@fim.uni-passau.de>
4921
4922         * graphite.c (print_graphite_bb): Allow changing number of loops
4923         in SCoP domain.
4924         (initialize_cloog_names): Allow changing number of loops.
4925         (build_cloog_prog): Simplify.
4926         (find_transform): Enable cloog option --strides.
4927         (graphite_swap_loops): New.
4928         (graphite_strip_mine_loop): New.
4929         (graphite_trans_swap_1and2): New.
4930         (graphite_trans_strip): New.
4931         (graphite_transform_loops): Add graphite_trans_strip.
4932         * graphite.h (scop_max_loop_depth): New.
4933
4934 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4935
4936         * graphite.c (build_scop_iteration_domain): Remove forgotten
4937         line. (Fixes compile)
4938
4939 2008-06-15  Tobias Grosser  <grosser@fim.uni-passau.de>
4940
4941         * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4942         (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4943         (build_bb_loops): New.
4944         (graphite_transform_loops): Add build_bb_loops.
4945         (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4946         numbers.
4947         * graphite.h (graphite_bb): Add loops.
4948         (gbb_nb_loops): New.
4949         (gbb_loop_at_index): New.
4950         (gbb_loop_index): New.
4951         (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4952         using nb_params_in_scop.
4953
4954 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4955
4956         * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4957         (build_scop_canonical_schedules): Build minimized schedule.
4958         (schedule_to_scattering): Adapt to minimized schedule.
4959         * graphite.h (graphite_bb): Add/Update descriptions.
4960
4961 2008-06-14  Adrien Eliche  <aeliche@isty.uvsq.fr>
4962             Tobias Grosser  <grosser@fim.uni-passau.de>
4963
4964         * graphite.c (print_graphite_bb): Add condition printing.
4965         (dump_value): New.
4966         (dump_gbb_conditions): New.
4967         (build_scop_conditions_1): New.
4968         (build_scop_conditions): New.
4969         * graphite.h (graphite_bb): Add conditions.
4970
4971 2008-06-14  Tobias Grosser  <grosser@fim.uni-passau.de>
4972
4973         * graphite.c (print_graphite_bb):
4974         (free_graphite_bb): New.
4975         (free_scop): Free bbs.
4976         (get_bb_type): Free doms.
4977         (build_scop_context): Free context matrix.
4978         (build_loop_iteration_domains): Remove unused code.
4979         (build_cloog_prog): Free scattering function and blocklist.
4980         (find_transform): Free options.
4981
4982 2008-06-13  Tobias Grosser  <grosser@fim.uni-passau.de>
4983
4984         * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4985         Remove unnecessery cloog data structures. Make a copy of the domain
4986         (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4987         unnecessary cloog data structures. Fix memory leaks. Remove insert
4988         into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4989         used.
4990         (build_scop_iteration_domain): Remove unnecessary cloog
4991         data structures.  Fix memory leaks.
4992         (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4993         uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4994
4995 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
4996
4997         * graphite.c (find_scop_params): Remove initialize_cloog_names.
4998
4999 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5000
5001         * graphite.c (end_scop): Style fix.
5002         (schedule_to_scattering): Style and comment fix.
5003
5004 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5005         * graphite.c (print_graphite_bb): Fix definiton of
5006         schedule_to_scattering.
5007         (initialize_cloog_names): Change nb_scattdims to max loop
5008         depth in SCoP.
5009         (schedule_to_scattering): Take parameter for number of scattering
5010         dimensions.
5011         (build_cloog_prog): Only build as much scattering dimensions as
5012         necessary.
5013
5014 2008-06-12  Tobias Grosser  <grosser@fim.uni-passau.de>
5015
5016         * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
5017         in polyhedron/aermod.f90.
5018
5019 2008-06-11  Tobias Grosser  <grosser@fim.uni-passau.de>
5020             Dwarak Rajagopal  <dwarak.rajagopal@amd.com>
5021             Harsha Jagasia  <harsha.jagasia@amd.com>
5022
5023         * graphite.c (is_bb_addable): Fix segfault.
5024
5025 2008-06-10  Tobias Grosser  <grosser@fim.uni-passau.de>
5026
5027         * graphite.c (is_bb_addable): Fix memory leak, handling of loops
5028         with multiple exits and conditional handling in edge cases.
5029         (is_loop_exit): Fix memory leak. (Forgotten in last commit)
5030
5031         * testsuite/gcc.dg/graphite/scop-14.c: New.
5032
5033 2008-06-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5034             Adrien Eliche  <aeliche@isty.uvsq.fr>
5035
5036         * graphite.c (is_bb_addable): Add more comments and enhance
5037         readablity of the source code. Fix memory leak.
5038         (is_loop_exit): Fix memory leak.
5039
5040 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5041
5042         * graphite.c (first_loop_in_scop): Deleted.
5043         (setup_cloog_loop): Only walk the loop chain for inner loops.
5044         (build_scop_iteration_domain): Execute setup_cloog_loop for
5045         all loops in the first layer.
5046
5047 2008-06-05  Tobias Grosser  <grosser@fim.uni-passau.de>
5048
5049         * graphite.c (scan_tree_for_params): Change the way params are
5050         added to be indepenent of the number of loops.
5051         (setup_cloog_loop): Revert to short matrix format. Fix parameter
5052         handling.
5053         (build_cloog_prog): Revert to short matrix format.
5054
5055 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
5056             Dwarak Rajagopal <dwarak.rajagopal@amd.com>
5057
5058         * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
5059         warning.
5060
5061 2008-06-05  Sebastian Pop  <sebastian.pop@amd.com>
5062
5063         * graphite.c (nb_data_refs_in_scop): New.
5064         (graphite_transform_loops): Print more stats: number of
5065         loops, basic blocks and data references per scop.
5066
5067 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5068             Jan Sjodin  <jan.sjodin@amd.com>
5069
5070         * graphite.c (loop_affine_expr, idx_record_params,
5071         find_scop_parameters, setup_cloog_loop): Use instantiate_scev
5072         instead of instantiate_parameters.
5073
5074 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5075
5076         * graphite.c (schedule_to_scattering): Fix scattering dimensions,
5077         add support for parameters, add STATIC_SCHEDULE at the right places,
5078         cleanup.
5079
5080 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5081
5082         * graphite.c (build_scop_loop_nests): Only add the loops, that
5083         are contained completely in the SCoP.
5084         (build_cloog_prog): Disable scattering, until schedule_to_scattering
5085         and the domains are fixed.
5086         (build_scop_canonical_schedules): Add support for bbs not contained
5087         in any SCoP.
5088
5089 2008-06-04  Tobias Grosser  <grosser@fim.uni-passau.de>
5090
5091         * graphite.h (scop_contains_loop): Update comments to match
5092         the actual behavior.
5093         (scop_contains_loop): New.
5094         * graphite.c (schedule_to_scattering): Use scop_contains_loop.
5095
5096 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5097
5098         * graphite.c (get_bb_type): On function body, i.e. loop_0,
5099         don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
5100         as GBB_COND_HEADER.
5101
5102 2008-06-04  Sebastian Pop  <sebastian.pop@amd.com>
5103             Tobias Grosser  <grosser@fim.uni-passau.de>
5104
5105         * graphite.c (graphite_transform_loops): Early return when
5106         there are no loops in the function.
5107
5108 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5109             Jan Sjodin  <jan.sjodin@amd.com>
5110
5111         * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
5112         offset of the last loop.
5113         (setup_cloog_loop): Copy the entire outer constraint matrix.
5114
5115 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5116             Jan Sjodin  <jan.sjodin@amd.com>
5117
5118         * graphite.c (stmt_in_scop_p, function_parameter_p,
5119         invariant_in_scop_p): Removed.
5120         (scan_tree_for_params): Can be used with no constraint
5121         matrix for gathering parameters.
5122         (idx_record_params): Don't use idx_record_param, instead use
5123         scan_tree_for_params.
5124         (find_scop_parameters): Same.
5125         (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
5126         Fix the size of loop domains.
5127         (schedule_to_scattering): Exit when the outer loop is not in scop.
5128         (find_transform): Enable build_cloog_prog.
5129
5130 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5131             Jan Sjodin  <jan.sjodin@amd.com>
5132
5133         * graphite.c (schedule_to_scattering): Make scattering domains
5134         uniformly of the same size, as required by CLooG 0.14.0 and before.
5135
5136 2008-05-31  Sebastian Pop  <sebastian.pop@amd.com>
5137             Jan Sjodin  <jan.sjodin@amd.com>
5138
5139         * graphite.c (schedule_to_scattering): Rewrite, correct the
5140         translation of the scheduling function to scattering.
5141         (build_cloog_prog): Call schedule_to_scattering only once.
5142         * graphite.h (scop_loop_index): Do not fail for loops not
5143         in the scop: return -1.
5144
5145 2008-05-30 Tobias Grosser  <grosser@fim.uni-passau.de>
5146
5147         * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5148         (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5149         (setup_cloog_loop): Export GBB_DOMAIN.
5150         (build_cloog_prog): New.  Create new CLOOG_PROG, which should be
5151         able to rebuild the original control flow.
5152         * graphite.h (graphite_bb): Add domain field and access macro.
5153         (GBB_DOMAIN): New.
5154
5155 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
5156
5157         * graphite.c (debug_gbb): New.
5158         (print_scop, build_graphite_bb): Use SCOP_BBS.
5159         (build_scop_bbs): Reimplemented.
5160         (dfs_bb_in_scop_p): Removed.
5161         (build_scop_loop_nests): Reorder loops inserted in
5162         SCOP_LOOP_NEST: outer loops should come first.
5163         (build_scop_canonical_schedules): Reinitialize at zero
5164         the components of the SCOP_STATIC_SCHEDULE for the loops
5165         that have already been parsed.
5166
5167         * graphite.h (debug_gbb): Declared.
5168
5169 2008-05-30  Sebastian Pop  <sebastian.pop@amd.com>
5170             Jan Sjodin  <jan.sjodin@amd.com>
5171
5172         * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5173         (graphite_loop_to_gcc_loop): Removed.
5174         (remove_all_edges): New.
5175         (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5176         (gloog): Remove useless code.
5177
5178 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5179
5180         * graphite.c (get_bb_type): Reworked. We distinguish between
5181         loops with one or multiple exits.
5182         (is_loop_exit): New.
5183         (is_pred): New.
5184         (is_bb_addable): Rework condition handling, now support for case
5185         case statements and loops with multiple exits.
5186
5187         * testsuite/gcc.dg/graphite/scop-11.c: New.
5188         * testsuite/gcc.dg/graphite/scop-12.c: New.
5189         * testsuite/gcc.dg/graphite/scop-13.c: New.
5190
5191 2008-05-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5192
5193         * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5194         we have too many colors.
5195
5196 2008-05-22  Sandeep Maram <smaram_b04@iiita.ac.in>
5197
5198         * doc/invoke.texi (-ftree-loop-fusion): Document.
5199         * tree-pass.h (pass_loop_fusion): Declared.
5200         * tree-loop-fusion.c: New.
5201         * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5202         * tree-data-ref.c (find_data_references_in_loop): Make extern.
5203         * tree-data-ref.h (find_data_references_in_loop): Declared.
5204         * common.opt (ftree-loop-fusion): Declared.
5205         * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5206
5207 2008-05-21  Sebastian Pop  <sebastian.pop@amd.com>
5208
5209         * graphite.c (build_access_matrix): Fix typo from the merge.
5210
5211 2008-05-20  Sebastian Pop  <sebastian.pop@amd.com>
5212
5213         * Merge from mainline (130800:135673).
5214
5215 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
5216
5217         * graphite.c (end_scop): The exit of the scop is not part of the scop.
5218         Update dominators after splitting.
5219
5220 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
5221
5222         * graphite.c (is_bb_addable): Return the harmful statement.
5223         Factor up some code.
5224         (end_scop): New.  Splits end of scope bbs on a harmful statement.
5225         (build_scops_1): Call end_scop.
5226
5227 2008-05-07  Sebastian Pop  <sebastian.pop@amd.com>
5228
5229         * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5230         all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5231         add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5232         build_scops_1): Removed.
5233         (build_scops_2): Renamed build_scops_1.
5234
5235 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
5236
5237         * graphite.c: Fix formatting.
5238
5239 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5240
5241         * graphite.c (get_bb_type): New.
5242         (move_scops): New.
5243         (build_scops_2): New.
5244         (is_bb_addable): New.
5245         (build_scops): Switch the scop detection.
5246         (build_scop_bbs): Add entry bb to scop.
5247         * graphite.h (struct scop): Update comment.
5248
5249 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5250
5251         * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5252         more colors.
5253
5254 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5255
5256         * testsuite/gcc.dg/graphite/scop-1.c: Update.
5257         * testsuite/gcc.dg/graphite/scop-2.c: Update.
5258         * testsuite/gcc.dg/graphite/scop-4.c: Update.
5259         * testsuite/gcc.dg/graphite/scop-5.c: Add.
5260         * testsuite/gcc.dg/graphite/scop-6.c: Add.
5261
5262 2008-05-06  Sebastian Pop  <sebastian.pop@amd.com>
5263
5264         * testsuite/gcc.dg/graphite/scop-0.c: Add.
5265         * testsuite/gcc.dg/graphite/scop-7.c: Add.
5266         * testsuite/gcc.dg/graphite/scop-8.c: Add.
5267         * testsuite/gcc.dg/graphite/scop-9.c: Add.
5268         * testsuite/gcc.dg/graphite/scop-10.c: Add.
5269
5270 2008-05-06  Tobias Grosser  <grosser@fim.uni-passau.de>
5271
5272         * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5273         Check affine expressions depending on the outermost loop
5274         instead of a scop.
5275         (stmt_simple_for_scop_p): Same.
5276         (harmfule_stmt_in_scop): Same.
5277
5278 2008-04-28  Tobias Grosser  <grosser@fim.uni-passau.de>
5279
5280         * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5281         mark entry and exit, that are not part of the SCoP and update HTML
5282         formatting.
5283
5284 2008-04-25  Sebastian Pop  <sebastian.pop@amd.com>
5285
5286         * graphite.c (basic_block_simple_for_scop_p): Renamed
5287         harmful_stmt_in_bb.
5288         (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5289         (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5290         (all_preds_visited_p, all_succs_visited_p,
5291         start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5292         scop_end_loop): New.
5293         (build_scops): Do not use dfs_enumerate_from.
5294
5295         * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5296
5297 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
5298
5299         * graphite.c: Add comments to functions that are missing a
5300         description.
5301         (graphite_create_iv): Removed.  Merged in graphite_loop_to_gcc_loop.
5302
5303 2008-04-23  Sebastian Pop  <sebastian.pop@amd.com>
5304
5305         * graphite.c (nb_params_in_scop): Moved...
5306         (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5307         (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5308         (clast_to_gcc_expression): Reduce column size to less than 80.
5309         (graphite_create_iv): Return the new name of the IV.
5310         (find_transform): Set options->esp and options->cpp.
5311         (gloog): Comment out the invalidation of the old loop code.
5312         (initialize_dependence_polyhedron): Replace scop_nb_params with
5313         nb_params_in_scop.
5314
5315         * graphite.h (nb_params_in_scop): ... here.
5316         (scop_nb_params): Removed.
5317         (loop_domain_dim): Return something even when the loop was not
5318         found in the hash table: avoid ICEing on all the graphite.exp
5319         testcases.
5320
5321 2008-04-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5322
5323         * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5324
5325         * graphite.c (build_scop_dynamic_schedules): Schedule is built
5326         according to nesting level.
5327         (find_scop_parameters): Call instantiate_parameters.
5328         (scan_tree_for_params): Extend it to handle general affine bounds.
5329         Inner loop bound can depend on outer loop induction variable.
5330         (setup_cloog_loop): tmp variable is allocated on stack. Call
5331         instantiate_parameters with respect to outermost_loop_in_scop.
5332         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5333         graphite.h.
5334         (create_empty_loop): Function loopify should be given edge
5335         probability, instead of edge frequency. Dominance relation from
5336         switch_bb to loop_header.
5337         (clast_to_gcc_expression): Added handling of clast_reduction node.
5338         (gloog): New functionality for removing old loop.
5339         (test_dependence): Factored out from build_rdg_all_levels.
5340         (build_rdg_all_levels): Dependence testing factored out to
5341         test_dependence function.
5342
5343         * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5344         (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5345         from graphite.c
5346
5347 2008-04-07  Sebastian Pop  <sebastian.pop@amd.com>
5348
5349         * graphite.c (free_scop, param_index, initialize_cloog_names,
5350         nb_params_in_scop): Use name_tree map instead of just a tree
5351         for keeping track of the variable name associated to that tree.
5352         (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5353         clast_to_gcc_expression, graphite_create_iv,
5354         graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5355         graphite_stmt_to_gcc_stmt): New.
5356         (gloog): Call these.
5357         * graphite.h (struct name_tree): New.
5358         (struct scop): Use name_tree instead of tree for params.
5359         Store a vector of name_tree for new_ivs.
5360         (SCOP_NEWIVS): New.
5361         (scop_nb_params): Use name_tree instead of tree.
5362
5363 2008-04-05  Alexander Lamaison  <awl03@doc.ic.ac.uk>
5364             Sebastian Pop  <sebastian.pop@amd.com>
5365
5366         * tree-bounds.c: New.
5367         * tree-bounds.h: New.
5368         * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5369         * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5370         * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5371         flag_mudflap.
5372         * gcc.c: Same.
5373         * toplev.c: Same.
5374         * c-cppbuiltin.c: Same.
5375         * c-pragma.c: Same.
5376         * common.opt: Same.
5377         * varasm.c: Same.
5378         * tree-outof-ssa.c: Same.
5379         * c-common.c: Same.
5380         * Makefile.in: Same.
5381
5382 2008-03-15  Antoniu Pop  <antoniu.pop@gmail.com>
5383             Sebastian Pop  <sebastian.pop@amd.com>
5384
5385         * tree-loop-distribution.c (remaining_stmts,
5386         upstream_mem_writes): Removed static variables.
5387         (copy_loop_before, create_bb_after_loop,
5388         mark_nodes_having_upstream_mem_writes, free_rdg_components,
5389         rdg_build_components, rdg_build_partitions,
5390         dump_rdg_partitions): Extern.
5391         (generate_loops_for_partition, generate_code_for_partition): Do not
5392         return a bool.
5393         (already_processed_vertex_p, predecessor_has_mem_write,
5394         mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5395         rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5396         rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5397         build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5398         Pass remaining_stmts and upstream_mem_writes as parameters.
5399         (rdg_component): Moved...
5400         (build_rdg_partition_for_component): Do not aggregate components when
5401         flag_streamize_loops is set.
5402         (gen_sequential_loops): New.
5403         (ldist_gen): Call gen_sequential_loops.
5404
5405         * tree-pass.h (pass_loop_streamization): Declared.
5406
5407         * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5408         basic blocks when loops structures exist.
5409
5410         * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5411
5412         * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5413
5414         * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5415         eliminate_local_variables_stmt, eliminate_local_variables,
5416         separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5417         separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5418         of code delimited by two edges in the CFG.
5419         (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5420         (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5421         (separate_decls_in_loop): Renamed separate_decls_in_region.  Isolate
5422         the case of parallelisation of reductions.
5423         (create_loop_fn): Extern.
5424         (create_omp_parallel_region): New.
5425
5426         * tree-data-ref.c (dump_data_dependence_relation): Don't call
5427         dump_data_reference for printing dra and drb.
5428         (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5429         RDGE_RELATION.
5430         (build_rdg): Don't call free_dependence_relations for the moment, as
5431         we attach dependence relations on each edge of the RDG.
5432         To be fixed later.
5433
5434         * tree-data-ref.h (rdg_component): ...here.
5435         (struct rdg_edge): New field ddr_p relation.
5436         (RDGE_RELATION): New.
5437         (create_bb_after_loop, copy_loop_before,
5438         mark_nodes_having_upstream_mem_writes, rdg_build_components,
5439         rdg_build_partitions, dump_rdg_partitions,
5440         free_rdg_components): Declared.
5441
5442         * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5443         BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5444
5445         * tree-loop-streamization.c: New.
5446
5447         * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5448         create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5449
5450         * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5451
5452         * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5453
5454         * passes.c: Schedule pass_loop_streamization.
5455
5456 2008-03-08  Tobias Grosser  <grosser@fmi.uni-passau.de>
5457
5458         * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5459         update comment.
5460
5461 2008-03-07  Tobias Grosser  <grosser@fim.uni-passau.de>
5462
5463         * graphite.c (dot_all_scops): Update formatting.
5464         Bbs can now be part of more than one SCoP.
5465
5466 2008-03-04  Sebastian Pop  <sebastian.pop@amd.com>
5467
5468         * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5469         malloc problems.
5470         (loop_domain_dim): Check for unregistered toplev SCOP loop.
5471         * graphite.h (loop_to_cloog_loop): New.
5472
5473 2008-03-04  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5474
5475         * graphite.c (loop_domain_dim, ref_nb_loops,
5476         loop_iteration_vector_dim): New.
5477         (build_access_matrix_with_af, build_access_matrix,
5478         initialize_dependence_polyhedron): Fixed for new matrix layout.
5479         No longer assume that all iteration domains are of the same
5480         dimensionality.
5481
5482 2008-03-02  Sebastian Pop  <sebastian.pop@amd.com>
5483
5484         * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5485         defined in a loop at depth 0 is invariant.
5486         * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5487         * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5488         be called at loop depth 0.
5489
5490         * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5491         a parameter.
5492         (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5493         (down_open_scop): Removed.
5494         (loop_in_scop_p): Redefined.
5495         (scop_affine_expr): New argument: scop.
5496         (stmt_simple_for_scop_p): New argument: scop.  RETURN_EXPR is not
5497         a harmful statement ending a scop.
5498         (basic_block_simple_for_scop_p): New argument: scop.
5499         (get_loop_start): Removed.
5500         (new_scop): Initialize SCOP_LOOPS.
5501         (free_scop): Free SCOP_LOOPS.
5502         (succs_at_same_depth, preds_at_same_depth): New.
5503         (end_scop): Test the validity of a scop.
5504         (add_dominators_to_open_scops): New.
5505         (test_for_scop_bound): Call add_dominators_to_open_scops.
5506         Add cases for opening and closing multiple scops.
5507         (build_scops, build_scop_bbs): Iterate over basic blocks in
5508         depth first order.
5509         (build_graphite_bb): Pass scop directly.
5510         (dfs_bb_in_scop_p): New.
5511         (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5512         several times.
5513         (nb_loops_around_gb): Use loop_in_scop_p.
5514         (schedule_to_scattering): Disabled for the moment the code computing
5515         the "textual order for outer loop".
5516
5517         * graphite.h (struct scop): New field loops.
5518         (SCOP_LOOPS): New.
5519         (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5520
5521         * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5522
5523 2008-02-27  Antoniu Pop  <antoniu.pop@gmail.com>
5524             Sebastian Pop  <sebastian.pop@amd.com>
5525
5526         * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5527         * common.opt (fstreamize-loops): New.
5528         * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5529         BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5530         BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5531         BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5532
5533 2008-02-22  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5534
5535         * tree-data-ref.c (build_empty_rdg): New.
5536         (build_rdg): Use it.
5537         * tree-data-ref.h (build_empty_rdg): Declared.
5538         * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5539         (find_vertex_for_stmt): Removed.
5540         (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5541
5542 2008-02-21  Sebastian Pop  <sebastian.pop@amd.com>
5543
5544         * tree-loop-distribution.c (generate_builtin): After cancelling the
5545         loop tree, also delete basic blocks.
5546         (rdg_flag_uses): Stop recursion when a vertex has already been
5547         processed.
5548
5549 2008-02-15  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5550
5551         * graphite.c (build_scop_alpha): Removed.
5552         (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5553         and dump_dependence_graph to avoid compiler warnings.
5554
5555 2008-02-14  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5556
5557         * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5558         * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5559         * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5560         eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5561         (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5562         (initialize_dependence_polyhedron, find_vertex_for_stmt,
5563         initialize_data_dependence_polyhedron, is_empty_polyhedron,
5564         statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5565         dump_dependence_graph): New.
5566         * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5567         (GBB_ALPHA): New.
5568         (struct scop): New field loop2cloog_loop.
5569         (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5570         RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5571
5572 2008-02-10  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5573
5574         * graphite.c (build_graphite_bb): Fix initialization
5575         of the graphite basic block.
5576
5577 2008-02-05  Sebastian Pop  <sebastian.pop@amd.com>
5578
5579         * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5580         loop domain matrix.  Pass in the number of loops contained in the
5581         constraint matrix.
5582         (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5583         (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5584         loops that are not surrounding the current loop are not represented
5585         in the domain constraint matrix.
5586         (build_scop_iteration_domain): Initial domain constraint matrix
5587         contains only the eq/ineq, cst, and scop parameters columns.
5588
5589 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5590
5591         * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5592         (print_graphite_bb): Print scattering.
5593
5594 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5595
5596         * graphite.c (initialize_cloog_names): Initialize names of
5597         scattering variables.
5598
5599 2009-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5600
5601         * graphite.c (dot_all_scops_1): Disable debug output while
5602         printing graph.
5603
5604 2008-01-29  Tobias Grosser  <grosser@fim.uni-passau.de>
5605
5606         * graphite.c (find_transform): Change cloog output language to C.
5607
5608 2008-01-27  Sebastian Pop  <sebastian.pop@amd.com>
5609
5610         * tree-loop-distribution.c (generate_memset_zero,
5611         generate_builtin, generate_code_for_partition,
5612         rdg_flag_all_uses): New.
5613         (rdg_flag_uses): Gather in the same partition the statements defining
5614         the VUSES of the current statement.
5615         (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5616         Gather in the same partition not only the stores to the same memory
5617         access, but also the reads.
5618         (ldist_generate_loops): Renamed ldist_gen.
5619
5620 2008-01-24  Sebastian Pop  <sebastian.pop@amd.com>
5621             Tobias Grosser  <grosser@fmi.uni-passau.de>
5622
5623         * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5624         next pointer, don't use the inner pointer.
5625
5626 2008-01-20  Tobias Grosser  <grosser@fmi.uni-passau.de>
5627
5628         * graphite.c (dot_all_scops, dot_all_scops_1): New.
5629         (find_transform): Call dot_all_1.
5630         * graphite.h (dot_all_scops): Declared.
5631
5632 2007-12-14  Sebastian Pop  <sebastian.pop@amd.com>
5633
5634         * tree-loop-distribution.c: Fix apsi.f ICE.
5635         (create_bb_after_loop): New.
5636         (generate_loops_for_partition): Use it.
5637         * testsuite/gfortran.dg/ldist-1.f90: New.
5638
5639         * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5640         * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5641
5642 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5643
5644         * graphite.c (find_transform): Dump cloog program sent to cloog.
5645
5646 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5647
5648         * graphite.c (initialize_cloog_names): Initialize cloog
5649         iterator names.
5650
5651 2007-12-13  Tobias Grosser  <grosser@fmi.uni-passau.de>
5652
5653         * graphite.c (build_scop_context): Fix typo, for the matrix
5654         format: insert '0 >= 0' instead of '-1 >= 0'.
5655
5656 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
5657
5658         * Fix merge problems.
5659
5660 2007-12-13  Sebastian Pop  <sebastian.pop@amd.com>
5661
5662         * graphite.c (setup_cloog_loop): Fix typo.
5663
5664 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5665
5666         * doc/invoke.texi (-ftree-loop-distribution): Documented.
5667         * tree-loop-distribution.c: Reimplemented.
5668         * tree-pass.h (pass_loop_distribution): New.
5669         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5670         print_loops.
5671         * graphds.h (struct graph): New field indexes.
5672         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5673
5674         * tree-vect-analyze.c: Remove declaration of static functions when not
5675         needed.
5676         * tree-vectorizer.c: Same.
5677         (rename_variables_in_loop): Now extern.
5678         (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5679         tree_duplicate_loop_to_edge_cfg.  Reset PENDING_STMT for edges after
5680         calling redirect_edge_and_branch_force.
5681
5682         * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5683
5684         * tree-data-ref.c: Don't include tree-chrec.h.
5685         (debug_data_dependence_relations): New.
5686         (dump_data_dependence_relation): Call dump_data_reference on data refs
5687         in the relation.
5688         (same_access_functions): Moved...
5689         (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5690         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5691         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5692         struct rdg_vertex_info, ): New.
5693         (create_rdg_edge_for_ddr): Compute the dependence level before looking
5694         at DDR_REVERSED_P.
5695         (create_rdg_vertices): Initialize the htab of graph->indexes.
5696         Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5697         (stmts_from_loop): Don't save LABEL_EXPR.
5698         (hash_stmt_vertex_info, eq_stmt_vertex_info,
5699         hash_stmt_vertex_del): New.
5700         (build_rdg): Initialize rdg->indexes.
5701         (free_rdg, stores_from_loop, ref_base_address,
5702         rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5703         have_similar_memory_accesses_1, ref_base_address_1,
5704         remove_similar_memory_refs): New.
5705
5706         * tree-data-ref.h: Include tree-chrec.h.
5707         (debug_data_dependence_relations): Declared.
5708         (same_access_functions): ...here.  Now static inline.
5709         (ddr_is_anti_dependent, ddrs_have_anti_deps,
5710         ddr_dependence_level): New.
5711         (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5712         (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5713         RDG_MEM_READS_STMT): New.
5714         (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5715         debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5716         rdg_vertex_for_stmt): Declared.
5717         (struct rdg_edge): New field level.
5718         (RDGE_LEVEL, free_rdg): New.
5719         (stores_from_loop, remove_similar_memory_refs,
5720         rdg_defs_used_in_other_loops_p,
5721         have_similar_memory_accesses): Declared.
5722         (rdg_has_similar_memory_accesses): New.
5723
5724         * lambda.h (dependence_level): New.
5725         * common.opt (ftree-loop-distribution): New.
5726         * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5727         (print_loop_ir): Renamed print_loops.
5728         (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5729         tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5730         * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5731         (tree-loop-distribution.o): Added.
5732         * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5733         (mark_virtual_ops_in_bb): New.
5734         (print_loops_bb, debug_loop_num, debug_loop): New.
5735         * passes.c: Scheduled pass_loop_distribution.
5736
5737 2007-12-12  Konrad Trifunovic  <konrad.trifunovic@inria.fr>
5738
5739         * graphite.c (scan_tree_for_params): Correct the number of columns
5740         for polylib format.
5741         (nb_flat_iterator): New.
5742         (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5743         (build_scop_iteration_domain): Correct the number of columns for
5744         polylib format.
5745
5746 2007-12-12  Sebastian Pop  <sebastian.pop@amd.com>
5747
5748         * Merge from mainline (129697:130800).
5749
5750 2007-10-30  Sebastian Pop  <sebastian.pop@amd.com>
5751
5752         * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5753         dominated by SCoP's exit.
5754         (graphite_transform_loops): Compute post dominators.
5755
5756 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
5757
5758         * Merge from mainline (127169:129697).
5759
5760 2007-10-28  Sebastian Pop  <sebastian.pop@amd.com>
5761
5762         * graphite.c (affine_expr): Renamed scop_affine_expr.  Use an extra
5763         parameter for the basic block that contains the expression.  Use
5764         outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5765         (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5766         the expression.
5767         * graphite.h (gbb_loop): New.
5768         (GBB_LOOP): Removed.
5769
5770 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5771
5772         * Makefile.in: Fix merge problem.
5773
5774 2007-08-03  Sebastian Pop  <sebpop@gmail.com>
5775
5776         * Merge from mainline (125309:127169).
5777         * tree-loop-distribution.c: Disabled.
5778
5779 2007-06-05  Sebastian Pop  <sebpop@gmail.com>
5780
5781         * Merge from mainline (r123693:125309).
5782
5783 2007-05-30  Sebastian Pop  <sebpop@gmail.com>
5784
5785         * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5786         correct_modify_p
5787         (correct_modify_p, check_statements, number_of_lvalue_uses,
5788         number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5789         instead of MODIFY_EXPR.
5790         (update_edge_with_ddv): Don't pass index_of_edge.  Initialize
5791         and push new edges.
5792
5793 2007-05-24  Sebastian Pop  <sebpop@gmail.com>
5794
5795         * tree-loop-distribution.c (struct rdg): Replace arrays by
5796         VECs for edges and vertices.
5797         (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5798         (RDGV_NB_PARTITIONS): New.
5799         (PRDG_NBV, PRDG_NBE): Removed.
5800         (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5801         dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5802         number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5803
5804 2007-05-17  Georges-Andre Silber  <silber@cri.ensmp.fr>
5805             Sebastian Pop  <sebpop@gmail.com>
5806
5807         * doc/invoke.texi (-ftree-loop-distribution): Document.
5808         * tree-loop-distribution.c: New file.
5809         * tree-pass.h (pass_loop_distribution): Declared.
5810         * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5811         * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5812         and set reversed_p.
5813         * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5814         (DDR_REVERSED_P): New.
5815         * common.opt (-ftree-loop-distribution): New.
5816         * tree-flow.h (distribute_loops): Declared.
5817         * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5818         * passes.c (init_optimization_passes): Schedule loop distribution.
5819
5820 2007-05-12  Sebastian Pop  <sebastian.pop@inria.fr>
5821
5822         * graphite.c (print_graphite_bb): Don't call dump_data_references.
5823         (print_scop): Don't print when scop is NULL.
5824         (build_scop_context, find_transform): Don't output to stderr.
5825
5826 2007-05-09  Sebastian Pop  <sebastian.pop@inria.fr>
5827
5828         * tree-data-ref.c: Don't include graphite.h.
5829         Comment out the code for printing data reference's scop.
5830         (build_access_matrix_with_af): Moved...
5831         * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5832         * graphite.c (build_access_matrix_with_af): ... here.  Now static.
5833         (print_graphite_bb): Print basic block's schedule.
5834         (print_scop): Don't print the schedule, call cloog's pretty printer.
5835         (bb_in_scop_p): A basic block is in a scop only if it is both
5836         dominated and postdominated by the scop's entry and exit basic blocks.
5837         (function_parameter_p): New.
5838         (invariant_in_scop_p): Use function_parameter_p.
5839         (new_scop, save_scop): New.
5840         (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5841         save_scop.
5842         (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5843         (loop_in_scop_p): New.
5844         (scop_record_loop): Use loop_in_scop_p.
5845         (build_scop_domain): Renamed build_scop_iteration_domain.
5846         (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5847         nb_params_in_scop, build_scop_context, first_loop_in_scop,
5848         setup_cloog_loop, dot_scop_1, dot_scop): New.
5849         * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5850         (struct scop): Add a pointer to cloog's representation of a program.
5851
5852 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5853
5854         * doc/invoke.texi (-ftree-check-verbose): Renamed
5855         -ftree-checks-verbose.
5856         * common.opt (flag_tree_check_verbose): Renamed
5857         flag_tree_checks_verbose.
5858         * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5859
5860 2007-04-14  Sebastian Pop  <sebastian.pop@inria.fr>
5861
5862         * configure: Regenerated.
5863         * config.in: Regenerated.
5864         * tree-ssa-loop.c (graphite_transforms): Execute
5865         graphite_transform_loops only when HAVE_cloog.
5866         * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5867         * graphite.c: Include polylibgmp.h and cloog.h.
5868         (graphite_transform_loops): Removed loops parameter.
5869         * tree-flow.h (graphite_transform_loops): Update declaration.
5870         * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5871         (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5872         (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5873         (OBJS-common): Remove dependence on graphite.o.
5874         (BACKEND): Depend on @GRAPHITE@.
5875
5876 2007-04-13  Sebastian Pop  <sebastian.pop@inria.fr>
5877
5878         * doc/invoke.texi (-ftree-check-verbose): Documented.
5879         * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5880         * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5881         * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5882         * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5883         * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5884         * testsuite/gcc.dg/tree-checker/condates.crp: New.
5885         * common.opt (ftree-checks-verbose): New.
5886         * tree-check.c (tree_check_warning): Move extra stderr output
5887         under control of flag_tree_check_verbose.
5888
5889 2007-04-12  Sebastian Pop  <sebastian.pop@inria.fr>
5890
5891         * tree-match.c: Fix comments formatting.
5892         * tree-match.h: Fix comments formatting.
5893         * tree-check.c: Fix comments formatting.
5894         (tree_check_init): Restructure.
5895
5896 2007-04-12  Nic Volanschi  <nic.volanschi@free.fr>
5897
5898         * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5899
5900 2007-04-10  Sebastian Pop  <sebastian.pop@inria.fr>
5901
5902         * Merge from mainline (r120733:123693).
5903
5904 2007-03-20  Nic Volanschi  <nic.volanschi@free.fr>
5905
5906         * condate.y: New file.
5907         * tree-match.h (struct patt_info_s): New field sign.
5908         (struct condate_s): New field msg.
5909         (normalize_condate, name_condate, add_condate): New.
5910         (conds[], condate_parse): Made extern.
5911         * tree-check.c (tree_check_warning): First arg changed to cond;
5912         warning reformatted.
5913         (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5914         (tree_scan): New.
5915         (tree_check): Process trivial condates.
5916         (read_delimited_string): Removed.
5917         (print_cond): Print name and msg.
5918         (conds[]): Made extern.
5919         (parse_tree_check_file_once): Rewritten to use the parser in
5920         condate.y.
5921         Processing of option --tree_check_string moved to tree_scan().
5922         * Makefile.in: Added condate.y
5923
5924 2007-03-12  Sebastian Pop  <sebastian.pop@inria.fr>
5925
5926         * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5927         Use VECs instead of varrays.
5928         * diagnostic.h (lazy_dump_generic_node): Update declaration.
5929         * Makefile.in (pretty-print.o): Depend on vec.h.
5930         * pretty-print.c: Include tree.h and vec.h.
5931         (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5932         pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5933         new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5934         pp_free_list): Use VECs instead of varrays.
5935         * pretty-print.h: Do not include varray.h.
5936         (struct tree_chunk_s): Declaration moved before its use.
5937         (output_buffer): Rename varray field to chunks.
5938         * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5939         tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5940         save_global_holes): Use VECs instead of varrays.
5941         * tree-match.h: Declare VECs of cfg_node, and hole_p.
5942         * tree-check.c (scan_cfg_stmts, push_node,
5943         print_matching_stmt): Removed.
5944         (tree_check_instance, push_global_holes_if_new, tree_check,
5945         execute_tree_check): Use VECs instead of varrays.
5946         (gate_tree_check): Don't execute the CFG check when basic_block_info
5947         is not available.
5948
5949 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5950
5951         * Merge from mainline (r115016:120733).
5952
5953 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5954
5955         * Merge from mainline (r117632:117661).
5956
5957 2007-01-12  Sebastian Pop  <sebastian.pop@inria.fr>
5958
5959         * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5960         * tree-pass.h (TDF_DEBUG, debug_p): New.
5961         * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5962         get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5963         get_loop_exit_condition, analyze_evolution_in_loop,
5964         analyze_initial_condition, analyze_scalar_evolution,
5965         instantiate_parameters, number_of_latch_executions): Use debug_p.
5966         * tree-chrec.c (chrec_apply): Use debug_p.
5967         * tree-data-ref.c: Include graphite.h.
5968         (dump_data_reference): Print also the access matrix.
5969         (analyze_array, analyze_indirect_ref, init_data_ref,
5970         analyze_offset_expr, address_analysis, object_analysis,
5971         create_data_ref, finalize_ddr_dependent,
5972         non_affine_dependence_relation, analyze_ziv_subscript,
5973         analyze_siv_subscript_cst_affine,
5974         compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5975         can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5976         analyze_miv_subscript, analyze_overlapping_iterations,
5977         build_classic_dist_vector, subscript_dependence_tester,
5978         compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5979         (build_access_matrix_with_af): No longer static.
5980         * tree-data-ref.h (scop_p): ... declaration here.
5981         (data_reference.scop): New field.
5982         (DR_SCOP, DR_ACCESS_MATRIX): New.
5983         (build_access_matrix_with_af, dr_num_subscripts): Declared.
5984         * graphite.c (print_graphite_bb): Call dump_data_references.
5985         (print_scop): Use scop_nb_loops and scop_dim_domain.
5986         (test_for_scop_bound): Use debug_p.
5987         (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5988         scop_nb_params.
5989         (scop_loop_index): Moved...
5990         (scop_record_loop): New.
5991         (build_scop_loop_nests): Use scop_record_loop.
5992         (build_scop_domain): Use scop_dim_domain.
5993         (build_access_matrix): Implemented.
5994         (build_scop_canonical_schedules): Use scop_nb_loops.
5995         (build_graphite_bb): Initialize GBB_SCOP.
5996         * graphite.h (scop_p): Moved...
5997         (graphite_bb.scop): New field.
5998         (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5999         scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
6000         SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
6001         (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
6002         scop_loop_index): New.
6003         * Makefile.in (tree-data-ref.o): Depends on graphite.h.
6004
6005 2007-01-05  Sebastian Pop  <sebastian.pop@inria.fr>
6006
6007         * Merge from mainline (r117661:120450).
6008
6009 2006-10-12  Sebastian Pop  <sebastian.pop@inria.fr>
6010
6011         * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
6012         at the first declaration outside the varying loop, instantiate as
6013         far as possible.
6014         * tree-chrec.c (for_each_scev_op): New.
6015         * tree-chrec.h (for_each_scev_op): Declared.
6016         * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
6017         * tree-data-ref.c (get_references_in_stmt,
6018         find_data_references_in_stmt): New, from trunk.
6019         (find_data_references_in_loop): Use get_references_in_stmt
6020         and find_data_references_in_loop, modified as in trunk.
6021         (build_access_matrix_with_af): New.
6022         * tree-data-ref.h (data_reference): Add a field access_matrix.
6023         (data_ref_loc): New, as in trunk.
6024         * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
6025         invariant_in_scop_p, param_index, scan_tree_for_params,
6026         scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
6027         idx_record_param, idx_record_params, build_access_matrix,
6028         build_scop_data_accesses, build_scop_canonical_schedules,
6029         build_graphite_bb, build_scop_bbs, find_params_in_bb,
6030         build_scop_params): New.
6031         * graphite.h (graphite_bb): New.
6032         (scop): Add fields static_schedule, params, loop_nest,
6033         iteration_domain.
6034         * lambda.h: Declare vecs of lambda_matrix.
6035         * tree-flow.h (print_loop_ir_bb): Declared.
6036         * tree-cfg.c (print_loop_ir_bb): New.
6037         (print_loop): Use print_loop_ir_bb.
6038
6039 2006-10-12  Sebastian Pop  <pop@cri.ensmp.fr>
6040
6041         * Merge from mainline (r115016:117632).
6042
6043 2006-10-11  Sebastian Pop  <pop@cri.ensmp.fr>
6044
6045         * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
6046         break due to a warning.
6047
6048 2006-10-10  Sebastian Pop  <pop@cri.ensmp.fr>
6049
6050         * graphite.c (print_scops, debug_scops): New.
6051         (graphite_transform): Renamed graphite_find_transform.
6052         * graphite.h (debug_scops): Declared.
6053
6054 2006-08-17  Sebastian Pop  <pop@cri.ensmp.fr>
6055
6056         * tree-match.c: Reformat following the GNU style.
6057         * tree-match.h: Reformat following the GNU style.
6058         * tree-pattern.h: Removed empty file.
6059         * Makefile.in: Remove references to tree-pattern.h.
6060         * tree-check.c: Reformat following the GNU style.
6061         (execute_tree_check): Move gate condition code to...
6062         (gate_tree_check): ...here.  New function.
6063         (pass_check): Use the gate function.
6064
6065 2006-07-04  Nic Volanschi <nic.volanschi@free.fr>
6066
6067         * tree-pattern.h: New. Tree pattern matching and checking using
6068         concrete syntax.
6069         * tree-check.c: New. Tree/CFG checking pass.
6070         * tree-match.c: New. Library for tree pattern matching.
6071         * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
6072         * toplev.c, flags.h: Add globals for tree-check pass.
6073         * Makefile.in: Integrate the files in tree-check pass.
6074         * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
6075         * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
6076         Introduce a "lazy" pretty-print mode.
6077         * tree.c, tree.h: Add tree_name.
6078
6079 2006-07-04  Sebastian Pop  <pop@cri.ensmp.fr>
6080
6081         * doc/invoke.texi (-fgraphite): Correct typo.
6082         * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
6083         use of print_loop_ir.
6084         * testsuite/gcc.dg/graphite/scop-1.c: New.
6085         * testsuite/gcc.dg/graphite/scop-2.c: New.
6086         * testsuite/gcc.dg/graphite/graphite.exp: New.
6087         * graphite.c: Include domwalk.h.
6088         (print_scop): Print only the entry and exit blocks.
6089         (debug_scop): No longer static.
6090         (affine_expr): Fix formating.  Return also true when the expression is
6091         constant.
6092         (stmt_simple_for_scop_p): Fix formating.
6093         (build_scops): Use domwalk.
6094         (get_loop_start, end_scop, test_for_scop_bound): New.
6095         (graphite_transform_loops): Avoid printing on stderr.
6096         * graphite.h (debug_scop): Declared.
6097         * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
6098         * Makefile.in (graphite.o): Depend on domwalk.h.
6099         * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
6100         declarations for static functions.
6101         (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
6102         controlling output verbosity.
6103
6104 2006-06-26  Sebastian Pop  <pop@cri.ensmp.fr>
6105             Plesco Alexandru  <shurikx@gmail.com>
6106
6107         * doc/invoke.texi (-fgraphite): Document.
6108         * tree-pass.h (pass_graphite_transforms): Declared.
6109         * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
6110         * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
6111         (pass_graphite_transforms): Defined.
6112         * tree-data-ref.c (free_data_ref, data_reference): Extern.
6113         * tree-data-ref.h (free_data_ref, data_reference): Declared.
6114         * graphite.c, graphite.h: New.
6115         * common.opt (fgraphite): Declared.
6116         * tree-flow.h (graphite_transform_loops): Declared.
6117         * Makefile.in (OBJS-common): Add graphite.o.
6118         (graphite.o): New rule.
6119         * passes.c (pass_graphite_transforms): Scheduled.
6120