OSDN Git Service

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