OSDN Git Service

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