OSDN Git Service

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