OSDN Git Service

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