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