OSDN Git Service

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