OSDN Git Service

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