OSDN Git Service

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