]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
tree-scalar-evolution.c (instantiate_scev_binary): New.
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
15fda317
SP
12009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2
3 * tree-scalar-evolution.c (instantiate_scev_binary): New.
4 (instantiate_scev_1): Move code in instantiate_scev_binary.
5
320f5a78
SP
62009-09-01 Sebastian Pop <sebastian.pop@amd.com>
7
8 * tree-scalar-evolution.c (instantiate_scev_name): New.
9 (instantiate_scev_1): Move code in instantiate_scev_name.
10
112009-08-28 Sebastian Pop <sebastian.pop@amd.com>
12
13 * Merge from mainline (150992:151171).
14
211694b6
SP
152009-08-25 Sebastian Pop <sebastian.pop@amd.com>
16
17 * graphite-dependences.c (graphite_legal_transform_bb): Call
18 pbb_remove_duplicate_pdrs.
19 * graphite-poly.c (can_collapse_pdr): Removed.
20 (pdr_find_duplicate): Removed.
21 (can_collapse_pdrs): New.
22 (pbb_remove_duplicate_pdrs): New.
23 (new_poly_dr): Do not look for duplicates.
24 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
25 (PBB_PDR_DUPLICATES_REMOVED): New.
26 (pbb_remove_duplicate_pdrs): Declared.
27
7bd2a8a7
SP
282009-08-25 Sebastian Pop <sebastian.pop@amd.com>
29
30 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
31 the strides by multiplying by PDR_NB_REFS.
32 * graphite-poly.c (can_collapse_pdr): New.
33 (pdr_find_duplicate): New.
34 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
35 Initialize PDR_NB_REFS.
36 * graphite-poly.h (struct poly_dr): Add field nb_refs.
37 (PDR_NB_REFS): New.
38 (new_poly_dr): Number of subscripts is a graphite_dim_t.
39
402009-08-25 Sebastian Pop <sebastian.pop@amd.com>
41
42 Revert one of the previous commits:
43 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
44 the computation of symmetric data dependence relations.
45 (dependency_between_pbbs_p): Same.
46
93b2db87
SP
472009-08-25 Sebastian Pop <sebastian.pop@amd.com>
48
49 PR middle-end/40965
50 * graphite-poly.c (apply_poly_transforms): Remove legality test before
51 any transform.
52
d8eeb078
SP
532009-08-25 Sebastian Pop <sebastian.pop@amd.com>
54
55 * graphite-dependences.c (pddr_original_scattering): Return NULL
56 for read-read dependence relations.
57 * graphite-poly.h (enum poly_dr_type): Fix comment.
58 (pdr_read_p): New.
59 (pdr_write_p): New.
60 (pdr_may_write_p): New.
61
e6dec0fb
SP
622009-08-25 Sebastian Pop <sebastian.pop@amd.com>
63
64 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
65 (struct poly_dr): Same.
66 (new_poly_dr): Same.
67 * graphite-poly.c (new_poly_dr): Same.
68
baf4b881
KT
692009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
70 Sebastian Pop <sebastian.pop@amd.com>
71
72 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
73 pbb_strip_mine_time_depth. Changed the implementation so that
74 transformation is expressed as a transformation on
75 time (scatttering) dimensions. Also, ensures that the 2d+1
76 scheduling format is preserved.
77 (pbb_strip_mine_profitable_p): Profitability is based on the
78 iteration number of a given time (scattering) dimension,
79 and not on a original loop depth dimension.
80 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
81 (pbb_do_strip_mine): Call psct_dynamic_dim.
82 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
83 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
84 (pbb_nb_dynamic_scattering_transform): New.
85 (psct_dynamic_dim): New.
86
059a5f9f
KT
872009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
88
89 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
90 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
91 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
92 * graphite-interchange.c (build_linearized_memory_access): Same.
93 (memory_stride_in_loop): Same.
94
afae0207
SP
952009-08-25 Sebastian Pop <sebastian.pop@amd.com>
96
97 * graphite-dependences.c (pddr_original_scattering): New.
98 (graphite_legal_transform_dr): Call pddr_original_scattering.
99 (dot_deps_1): New.
100 (dot_deps): New.
101 * graphite-dependences.h (dot_deps): Declared.
102 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
103 (print_pdr): Print PDR_ID.
104 * graphite-poly.h (struct poly_dr): Add field id.
105 (PDR_ID): New.
106 (pbb_index): New.
107 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
108
f8e0bb8b
SP
1092009-08-22 Sebastian Pop <sebastian.pop@amd.com>
110
111 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
112 not delete the original dependence relation.
113
1142009-08-21 Sebastian Pop <sebastian.pop@amd.com>
115
116 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
117 the computation of symmetric data dependence relations.
118 (dependency_between_pbbs_p): Same.
119
e37f165f
SP
1202009-08-21 Sebastian Pop <sebastian.pop@amd.com>
121
122 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
123 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
124 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
125 (free_poly_ddr): New.
126 (pddr_is_empty): New.
127 (dependence_polyhedron_1): Now returns a poly_ddr_p.
128 (dependence_polyhedron): Same. Remove useless gcc_assert.
129 Remove fprintfs.
130 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
131 (graphite_carried_dependence_level_k): Call pddr_is_empty.
132 * graphite-dependences.h (enum poly_dependence_kind): New.
133 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
134 (PDRP_SOURCE): Renamed PDDR_SOURCE.
135 (PDRP_SINK): Renamed PDDR_SINK.
136 (PDRP_DDP): Renamed PDDR_DDP.
137 (PDDR_KIND): New.
138 (free_poly_ddr): Declared.
139 * graphite-poly.c (new_scop): Use the new hash function names.
140 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
141 into original_pddrs.
142 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
143
1442009-08-21 Sebastian Pop <sebastian.pop@amd.com>
145
146 * Merge from mainline (150764:150992).
147
45e76e9f
SP
1482009-08-18 Sebastian Pop <sebastian.pop@amd.com>
149
150 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
151 bounds with LT_EXPR to make niter analysis more precise on code
152 generated by Graphite.
153
66b466c3
SP
1542009-08-18 Sebastian Pop <sebastian.pop@amd.com>
155
156 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
157 (graphite_legal_transform_bb): Same.
158 (poly_drs_may_alias_p): Same.
159
f263917c
SP
1602009-08-15 Sebastian Pop <sebastian.pop@amd.com>
161
162 PR middle-end/40981
163 * graphite-ppl.c (ppl_max_for_le): Correct the use of
164 ppl_Pointset_Powerset_C_Polyhedron_maximize.
165
1662009-08-13 Sebastian Pop <sebastian.pop@amd.com>
167
168 * graphite-poly.c (print_pbb): Print PBB index.
169
1702009-08-13 Sebastian Pop <sebastian.pop@amd.com>
171
172 * Merge from mainline (r150672:150764).
173
1742009-08-13 Sebastian Pop <sebastian.pop@amd.com>
175
176 * graphite-interchange.c (ppl_max_for_le): Moved...
177 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
178 * graphite-ppl.c (ppl_max_for_le): ... here.
179 * graphite-ppl.h (ppl_max_for_le): Declared.
180
1812009-08-12 Sebastian Pop <sebastian.pop@amd.com>
182
183 * Merge from mainline (r150372:150672).
184
30de1632
SP
1852009-08-11 Sebastian Pop <sebastian.pop@amd.com>
186
187 PR middle-end/40980
188 * sese.c (convert_for_phi_arg): New.
189 (add_guard_exit_phis): Use convert_for_phi_arg.
190
191 * testsuite/gfortran.dg/graphite/id-17.f: New.
192
8c31ebfa
SP
1932009-08-11 Sebastian Pop <sebastian.pop@amd.com>
194
195 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
196 unknown subscript upper bounds.
197
198 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
199
fb9fb290
SP
2002009-08-11 Sebastian Pop <sebastian.pop@amd.com>
201 Pranav Garg <pranav.garg2107@gmail.com>
202
203 * graphite-interchange.c (gather_access_strides): Removed.
204 (ppl_max_for_le): New.
205 (build_linearized_memory_access): New.
206 (memory_stride_in_loop): New.
207 (pbb_interchange_profitable_p): Reimplemented.
208 * graphite-ppl.h (ppl_new_id_map): New.
209 (ppl_interchange): New.
210
211 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
212
312aea7f
SP
2132009-08-11 Sebastian Pop <sebastian.pop@amd.com>
214
215 * graphite-interchange.c (compute_subscript): Removed.
216 (compute_array_size_cstr): Removed.
217 (compute_array_size_poly): Removed.
218 (compute_array_size): Removed.
219 (gather_access_strides_poly): Removed.
220 (gather_access_strides): Empty.
221
25d7cc15
SP
2222009-08-11 Sebastian Pop <sebastian.pop@amd.com>
223
224 * graphite-dependences.c (dependence_polyhedron_1): Replace
225 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
226 (graphite_legal_transform_dr): Same.
227 (graphite_carried_dependence_level_k): Same.
228 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
229 Initialize PDR_NB_SUBSCRIPTS.
230 (print_pdr_access_layout): Replace pdr_nb_subscripts with
231 PDR_NB_SUBSCRIPTS.
232 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
233 (PDR_NB_SUBSCRIPTS): New.
234 (pdr_nb_subscripts): Removed.
235 (pdr_dim): Simplified.
236 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
237 with PDR_NB_SUBSCRIPTS.
238
66096911
SP
2392009-08-11 Sebastian Pop <sebastian.pop@amd.com>
240
241 * graphite-interchange.c (compute_array_size): Remove use of
242 PDR_DATA_CONTAINER.
243 * graphite-poly.c (new_poly_dr): Remove argument data_container.
244 Do not initialize PDR_DATA_CONTAINER.
245 (print_pdr): Do not print PDR_DATA_CONTAINER.
246 * graphite-poly.h (struct poly_dr): Remove data_container field.
247 (PDR_DATA_CONTAINER): Removed.
248 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
249 PDR_DATA_CONTAINER.
250 (build_poly_dr): Same.
251
273c5dd3
SP
2522009-08-11 Sebastian Pop <sebastian.pop@amd.com>
253
254 * testsuite/gcc.dg/graphite/interchange-9.c: New.
255
7491e5f0
KT
2562009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
257 Sebastian Pop <sebastian.pop@amd.com>
258
259 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
260 copy of the dependence polyhedron. Free the temporary objects.
261 (graphite_carried_dependence_level_k): Free unused objects before
262 returning.
263
264 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
265 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
266 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
267 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
268 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
269
f4648ed1
SP
2702009-08-05 Sebastian Pop <sebastian.pop@amd.com>
271
272 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
273 Early return without analyzing the data dependences if no
274 transform has been done. Call restore_scattering if the transform
275 is not legal.
276 (graphite-interchange.c): Same.
277 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
278 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
279 (apply_poly_transforms): Do not gcc_assert that
280 the transform is legal.
281 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
282 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
283 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
284 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
285 * graphite-poly.h (struct poly_scattering): New.
286 (struct poly_bb): Add original, transformed, and saved fields.
287 Remove transformed_scattering, original_scattering, nb_local_variables,
288 and nb_scattering_transform fields.
289 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
290 (poly_scattering_new): New.
291 (poly_scattering_free): New.
292 (poly_scattering_copy): New.
293 (store_scattering_pbb): New.
294 (store_scattering): New.
295 (restore_scattering_pbb): New.
296 (restore_scattering): New.
297 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
298 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
273c5dd3 299
e31a5bd4
SP
3002009-08-05 Sebastian Pop <sebastian.pop@amd.com>
301
302 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
303 (print_scop): Same.
304
8e88f9fd
SP
3052009-08-05 Sebastian Pop <sebastian.pop@amd.com>
306
307 * Makefile.in (graphite.o): Depends on PREDICT_H.
308 * graphite.c: Include predict.h.
309 (graphite_finalize): Call tree_estimate_probability.
310 * predict.c (predict_loops): Do not call scev_initialize and
311 scev_finalize.
312 (tree_estimate_probability_bb): New.
313 (tree_estimate_probability): Do not initialize loops: move that
314 code to the driver. Call tree_estimate_probability_bb.
315 (tree_estimate_probability_driver): New.
316 (pass_profile): Use tree_estimate_probability_driver.
317 * predict.h (tree_estimate_probability): Declared.
318
87d4d0ee
SP
3192009-08-05 Sebastian Pop <sebastian.pop@amd.com>
320
321 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
322 * graphite-dependences.c (graphite_legal_transform): Add time to
323 TV_GRAPHITE_DATA_DEPS.
324 (dependency_between_pbbs_p): Same.
325 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
326
3272009-08-03 Sebastian Pop <sebastian.pop@amd.com>
328
329 * Merge from mainline (r149952:150372).
330
2abae5f1
SP
3312009-07-28 Sebastian Pop <sebastian.pop@amd.com>
332
333 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
334 * graphite-blocking.c: Same.
335 * graphite-clast-to-gimple.c: Same.
336 * graphite-dependences.c: Same.
337 * graphite-poly.c: Same.
338 * graphite-poly.h: Same.
339 * graphite-ppl.c: Same.
340 * graphite-scop-detection.c: Same.
341 * graphite-sese-to-poly.c: Same.
342 * graphite.c: Same.
343
3442009-07-28 Sebastian Pop <sebastian.pop@amd.com>
345
346 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
347 (remove_simple_copy_phi): New.
348 (remove_invariant_phi): New.
349 (simple_copy_phi_p): New.
350 (reduction_phi_p): New.
351 (gsi_for_ssa_name_def): New.
352 (insert_out_of_ssa_copy): New.
353 (insert_out_of_ssa_copy_on_edge): New.
354 (create_zero_dim_array): New.
355 (scalar_close_phi_node_p): New.
356 (rewrite_close_phi_out_of_ssa): New.
357 (rewrite_phi_out_of_ssa): New.
358 (rewrite_reductions_out_of_ssa): New.
359 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
360
361 * testsuite/gcc.dg/graphite/id-11.c: New.
362 * testsuite/gcc.dg/graphite/id-15.c: New.
363 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
364 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
365 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
366 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
367 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
368 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
369 * testsuite/gfortran.dg/graphite/id-13.f: New.
370 * testsuite/gfortran.dg/graphite/id-5.f: New.
371
3722009-07-28 Sebastian Pop <sebastian.pop@amd.com>
373
374 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
375 check that nb_reductions_in_loop is zero.
376 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
377 reduction phi nodes.
378 (nb_reductions_in_loop): Removed.
379 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
380 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
381 (bb_contains_non_iv_scalar_phi_nodes): Removed.
382 (scop_contains_non_iv_scalar_phi_nodes): Removed.
383 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
384
3852009-07-28 Sebastian Pop <sebastian.pop@amd.com>
386
387 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
388 statements that have an empty iteration domain.
389 * testsuite/gfortran.dg/graphite/id-16.f: New.
390
3912009-07-28 Sebastian Pop <sebastian.pop@amd.com>
392
393 * tree-scalar-evolution.c (instantiate_scev_1): Return
394 chrec_dont_know when the result is not above instantiate_below.
395 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
396 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
397 the tree has a known scalar evolution.
398 * testsuite/gfortran.dg/graphite/id-14.f: New.
399 * testsuite/gfortran.dg/graphite/id-15.f: New.
400
4012009-07-28 Sebastian Pop <sebastian.pop@amd.com>
402
403 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
404 insert_gsi.
405 (rename_variables): Keep inserting renames after the ones already
406 inserted.
407
4082009-07-28 Sebastian Pop <sebastian.pop@amd.com>
409
410 * graphite-sese-to-poly.c (compare_bb_depths): New.
411 (graphite_sort_dominated_info): New.
412 (build_scop_bbs_1): Call graphite_sort_dominated_info.
413 (build_scop_scattering): Fix comment.
414
4152009-07-28 Sebastian Pop <sebastian.pop@amd.com>
416
417 * graphite.c (graphite_finalize): Call print_loops instead of
418 dump_function_to_file.
419 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
420 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
421 loops generated in the graphite output file.
422 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
423 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
424 * testsuite/gfortran.dg/graphite/id-12.f: New.
425
4262009-07-24 Li Feng <nemokingdom@gmail.com>
427
428 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
429 Remove 2 XFAIL.
430
4312009-07-24 Li Feng <nemokingdom@gmail.com>
432 Tobias Grosser <grosser@fim.uni-passau.de>
433
434 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
435 alias set number build alias in ACCESSES polyhedron.
436 (build_alias_set_for_drs): New.
437 (build_pbb_drs): Added build_alias_set_for_drs.
438 * graphite-dependences.c (poly_drs_may_alias_p): New.
439 (graphite_carried_dependence_level_k): Check alias information
440 before building polyhedron.
441
4422009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
443
444 * Makefile.in (lambda-code.o): Fix formatting.
445
4462009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
447
448 * Merge from mainline (r149350-149952)
449
4502009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
451
452 * graphite-poly.c (apply_poly_transforms): Move strip_mine
453 before interchange to prepare for loop blocking.
454
4552009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
456
457 * graphite-poly.c (apply_poly_transforms): Add checks after every
458 transformation.
459 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
460 done in apply_poly_transforms.
461
4622009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
463
464 * graphite-dependences.c (build_lexicographically_gt_constraint):
465 Replace RES parameter with *RES.
466 (dependence_polyhedron_1): Pass an address of the parameter RES
467 instead of value of RES.
468
4692009-07-16 Sebastian Pop <sebastian.pop@amd.com>
470
471 * graphite.c (graphite_finalize): Fix comment.
472 (graphite_transform_loops): Reset scev info after code generation
473 of each scop.
474
4752009-07-16 Sebastian Pop <sebastian.pop@amd.com>
476
477 * graphite.c (graphite_finalize): Call scev_reset.
478
4792009-07-16 Sebastian Pop <sebastian.pop@amd.com>
480
481 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
482 GBB_CLOOG_IV_TYPES hash table twice.
483 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
484 (add_condition_to_domain): Clear GMP values.
485
4862009-07-16 Sebastian Pop <sebastian.pop@amd.com>
487
488 * graphite-dependences.c: Fix formatting.
489 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
490 (pbb_number_of_iterations): Free ppl_Linear_Expression.
491 * graphite-sese-to-poly.c: Fix formatting.
492 * graphite.c (graphite_transform_loops): Create the hash table
493 after the early return.
494
4952009-07-16 Sebastian Pop <sebastian.pop@amd.com>
496
497 * testsuite/gcc.dg/graphite/id-14.c: New.
498 * testsuite/gcc.dg/graphite/pr40157.c: New.
499 * testsuite/gfortran.dg/graphite/id-11.f: New.
500
5012009-07-16 Sebastian Pop <sebastian.pop@amd.com>
502
503 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
504 (build_poly_scop): Return false when there are no pbbs within
505 loops to avoid to pass to cloog scops with no loops.
506
5072009-07-16 Sebastian Pop <sebastian.pop@amd.com>
508
509 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
510 useless test "i % 2".
511 (build_pbb_scattering_polyhedrons): Fix formatting.
512 (build_poly_dr): Same.
513 * graphite.c (graphite_transform_loops): Restructure.
514
5152009-07-14 Razya Ladelsky <razya@il.ibm.com>
516
517 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
518 reduction_list parameter.
519 (rewrite_all_phi_nodes_with_iv): Same.
520 (canonicalize_loop_ivs): Same.
521 * tree-parloops.c (struct brli): Removed.
522 (build_reduction_list_info): Removed.
523 (build_new_reduction): New.
524 (analyze_reduction_list): Removed.
525 (gather_scalar_reductions): Find reductions instead of phi
526 nodes that can't be canonicalized.
527 (try_create_reduction_list): Remove reduction_list parameter.
528 (gen_parallel_loop): Same.
529 (parallelize_loops): Remove analyze_reductions variable,
530 initialization and free.
531 Change reduction_list htab initialization to reduction_info
532 elements instead of ssa names.
533 Call try_create_reduction_list and gen_parallel_loop without
534 analyzed_reduction argument.
535 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
536 canonicalize_loop_ivs with one less argument.
537 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
538
5392009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
540
541 * graphite-dependences.c (new_poly_dr_pair): New.
542 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
543 (new_poly_dr_pair): New.
544 (eq_poly_dr_pair_p): New.
545 (hash_poly_dr_pair_p): New.
546 * graphite-dependences.h (struct poly_dr_pair): New.
547 (eq_poly_dr_pair_p): Declared.
548 (hash_poly_dr_pair_p): Declared.
549 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
550 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
551 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
552 * Makefile.in (graphite-poly.o): Add dependence on
553 graphite-dependences.h.
554
5552009-07-14 Sebastian Pop <sebastian.pop@amd.com>
556
557 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
558 polynomials of degree > 1 pass to Graphite.
559 * tree-chrec.c (scev_is_linear_expression): Call
560 evolution_function_is_affine_multivariate_p.
561 * testsuite/gfortran.dg/graphite/id-10.f90: New.
562
5632009-07-14 Sebastian Pop <sebastian.pop@amd.com>
564
565 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
566 Instantiate scevs varying in outer loops.
567 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
568
5692009-07-14 Sebastian Pop <sebastian.pop@amd.com>
570
571 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
572 redundant constraint.
573
5742009-07-14 Sebastian Pop <sebastian.pop@amd.com>
575
576 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
577 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
578 based on the file names as in the C testsuite.
579 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
580 * testsuite/gfortran.dg/graphite/block-2.f: Same.
581 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
582 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
583 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
584 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
585 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
586 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
587 * testsuite/gfortran.dg/graphite/id-6.f: Same.
588 * testsuite/gfortran.dg/graphite/id-9.f: Same.
589 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
590 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
591 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
592
5932009-07-14 Sebastian Pop <sebastian.pop@amd.com>
594
595 * sese.c (expand_scalar_variables_call): New.
596 (expand_scalar_variables_ssa_name): Handle calls in expander.
597
5982009-07-13 Sebastian Pop <sebastian.pop@amd.com>
599
600 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
601 Expect to see the pattern twice.
602 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
603 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
604 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
605
6062009-07-13 Sebastian Pop <sebastian.pop@amd.com>
607
608 * testsuite/gcc.dg/graphite/id-10.c: New.
609 * testsuite/gcc.dg/graphite/id-12.c: New.
610 * testsuite/gfortran.dg/graphite/id-7.f: New.
611 * testsuite/gfortran.dg/graphite/id-8.f: New.
612
6132009-07-13 Sebastian Pop <sebastian.pop@amd.com>
614
615 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
616 zero.
617
6182009-07-13 Sebastian Pop <sebastian.pop@amd.com>
619
620 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
621
6222009-07-13 Sebastian Pop <sebastian.pop@amd.com>
623
624 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
625
6262009-07-10 Sebastian Pop <sebastian.pop@amd.com>
627
628 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
629 building PDR subscripts.
630
6312009-07-10 Sebastian Pop <sebastian.pop@amd.com>
632
633 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
634 computation of array sizes.
635
6362009-07-10 Sebastian Pop <sebastian.pop@amd.com>
637
638 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
639
6402009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
641
642 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
643 build_pairwise_constraint, dr_equality_constraints,
644 build_pairwise_scheduling_equality,
645 build_pairwise_scheduling_inequality, lexicographically_gt_p,
646 build_lexicographically_gt_constraint, dependence_polyhedron,
647 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
648 Move from NNC_Polyhedron to C_Polyhedron.
649 * graphite-interchange.c (compute_array_size_poly,
650 gather_access_strides): Dito.
651 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
652 free_scop, pbb_number_of_iterations): Dito.
653 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
654 pbb_dim_iter_domain, struct scop): Dito.
655 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
656 new_Cloog_Domain_from_ppl_Polyhedron,
657 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
658 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
659 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
660 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
661 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
662 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
663 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
664 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
665 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
666 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
667 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
668 build_scop_iteration_domain, build_poly_dr): Dito
669
6702009-07-09 Sebastian Pop <sebastian.pop@amd.com>
671
672 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
673 run-id-*.c files.
674 * testsuite/gcc.dg/graphite/run-id-1.c: New.
675
6762009-07-09 Sebastian Pop <sebastian.pop@amd.com>
677
678 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
679 positivity constraint on the symbolic number of iterations.
680
6812009-07-09 Sebastian Pop <sebastian.pop@amd.com>
682
683 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
684
6852009-07-09 Sebastian Pop <sebastian.pop@amd.com>
686 Tobias Grosser <grosser@fim.uni-passau.de>
687
688 * graphite-clast-to-gimple.c (build_scop_context): Removed.
689 (build_cloog_prog): Directly use SCOP_CONTEXT.
690 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
691 (free_scop): Free SCOP_CONTEXT.
692 (print_scop_context): New.
693 (print_scop): Call print_scop_context.
694 (debug_scop_context): New.
695 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
696 (struct scop): Added field context.
697 (SCOP_CONTEXT): New.
698 * graphite-sese-to-poly.c (add_param_constraints): New.
699 (build_scop_context): New.
700 (build_poly_scop): Call build_scop_context.
701
7022009-07-09 Sebastian Pop <sebastian.pop@amd.com>
703
704 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
705 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
706 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
707 * graphite-ppl.h: Include double-int.h and tree.h.
708 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
709 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
710 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
711 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
712
7132009-07-09 Sebastian Pop <sebastian.pop@amd.com>
714
715 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
716 POINTER_PLUS_EXPR for pointer types.
717 (clast_to_gcc_expression): Same.
718
7192009-07-09 Sebastian Pop <sebastian.pop@amd.com>
720
721 * graphite-poly.c (print_scattering_function): Early return when
722 PBB_TRANSFORMED_SCATTERING is not initialized.
723 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
724
7252009-07-08 Sebastian Pop <sebastian.pop@amd.com>
726
727 * tree-parloops.c (analyze_reduction_list): Remove unused variable
728 to fix bootstrap.
729
7302009-07-08 Razya Ladelsky <razya@il.ibm.com>
731
732 * tree-parloops.c (analyze_reduction_list): Change return
733 value to void.
734 (try_create_reduction_list): Move the call to
735 analyze_reduction_list to the beginining.
736 Call reduction_phi with analyzed_reductions as argument
737 instead of reduction_list.
738
7392009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
740
741 * Merge from mainline (r148296:149346)
742
7432009-07-07 Sebastian Pop <sebastian.pop@amd.com>
744
745 * graphite-scop-detection.c (graphite_can_represent_init): New.
746 (graphite_can_represent_scev): Call graphite_can_represent_init:
747 check that the initial value does not contain multiplications of
748 parameters.
749 (stmt_has_simple_data_refs_p): New.
750 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
751 (is_simple_operand): Fix formatting.
752 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
753
7542009-07-07 Sebastian Pop <sebastian.pop@amd.com>
755
756 * testsuite/gcc.dg/graphite/id-13.c: New.
757 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
758 analyze_scalar_evolution, use scalar_evolution_in_region.
759 (scan_tree_for_params_right_scev): Add extra assert.
760 (parameter_index_in_region_1): Split from parameter_index_in_region.
761 (idx_record_params): Use scalar_evolution_in_region.
762 (find_params_in_bb): Same.
763 (find_scop_parameters): Same.
764 (build_loop_iteration_domains): Same.
765 (create_linear_expr_from_tree): Same.
766 * sese.c (scalar_evolution_in_region): New.
767 * sese.h (scalar_evolution_in_region): Declared.
768 (defined_in_sese_p): New.
769 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
770 static anymore.
771 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
772 Declared.
773
7742009-07-07 Sebastian Pop <sebastian.pop@amd.com>
775
776 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
777 TREE_DATA_REF_H also implies SCEV_H.
778
7792009-07-07 Sebastian Pop <sebastian.pop@amd.com>
780
781 * graphite-poly.c (print_scop_params): New.
782 (print_scop): Call print_scop_params.
783 (debug_scop_params): New.
784 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
785
7862009-07-07 Li Feng <nemokingdom@gmail.com>
787
788 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
789 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
790 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
791 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
792 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
793 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
794
7952009-07-07 Li Feng <nemokingdom@gmail.com>
796
797 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
798 for dependency checking part.
799 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
800 tests for dependency checking.
801 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
802 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
803 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
804 flag -fdump-tree-graphite-all for autopar testsuites.
805
8062009-07-06 Sebastian Pop <sebastian.pop@amd.com>
807
808 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
809 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
810 canonicalize_loop_ivs): Moved...
811 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
812
8132009-07-06 Sebastian Pop <sebastian.pop@amd.com>
814
815 * tree-parloops.c (try_create_reduction_list): Pass an extra
816 argument analyzed_reductions. Call analyze_reduction_list.
817 (gen_parallel_loop): Do not call analyze_reduction_list.
818 (parallelize_loops): Init and finalize analyzed_reductions.
819
8202009-07-06 Li Feng <nemokingdom@gmail.com>
821
822 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
823 Added flag -fno-loop-strip-mine for autopar testcase.
824
8252009-07-04 Li Feng <nemokingdom@gmail.com>
826
827 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
828 transformed scattering dimension instead of unmatch orignal when
829 calling dependence_polyhedron.
830
8312009-06-30 Sebastian Pop <sebastian.pop@amd.com>
832
833 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
834
8352009-06-30 Sebastian Pop <sebastian.pop@amd.com>
836
837 * graphite-poly.c (pbb_number_of_iterations): Check for returned
838 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
839
8402009-06-30 Sebastian Pop <sebastian.pop@amd.com>
841
842 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
843 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
844 * graphite-poly.c (pbb_number_of_iterations): New.
845 * graphite-poly.h (pbb_number_of_iterations): Declared.
846 (pbb_iterator_dim, pbb_parameter_dim): New.
847
8482009-06-29 Sebastian Pop <sebastian.pop@amd.com>
849
850 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
851 last commit on type of lower and upper bound of loops.
852
8532009-06-29 Li Feng <nemokingdom@gmail.com>
854
855 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
856 graphite-dependences.h.
857 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
858 (mark_bb_with_pbb): New.
859 (get_stmtfor_depth): New.
860 (find_pbb_via_hash): New.
861 (dependency_in_loop_p): New.
862 (mark_loops_parallel): New.
863 (free_aux_in_new_loops): New.
864 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
865 bb with it's relevant pbb. Mark newly created loops. Remove mark
866 innermost loop parallel without checking.
867 (gloog): Add parameter BB_PBB_MAPPING.
868 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
869 (gloog): Change declaration.
870 (mark_loop_parallel): Make extern.
871 (free_aux_in_new_loops): Declare.
872 (bb_pbb_map_hash): New.
873 (eq_bb_pbb_map): New.
874 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
875 auto parallelization when flag_graphite_force_parallel is set.
876 (graphite_finalize): Added free_aux_in_new_loops.
877 * tree-parloops.c (parallelize_loops): Only generate parallel code for
878 the innermost loop that marked parallel. Use
879 flag_graphite_force_parallel instead of loop->can_be_parallel.
880 (loop_parallel_p): Move inner most checking out of function.
881
8822009-06-26 Sebastian Pop <sebastian.pop@amd.com>
883
884 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
885 type of lower and upper bound of loops signed long int.
886
8872009-06-26 Sebastian Pop <sebastian.pop@amd.com>
888
889 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
890 expression outside the loop.
891
8922009-06-26 Sebastian Pop <sebastian.pop@amd.com>
893
894 * gcc.dg/graphite/interchange-8.c: New.
895
8962009-06-26 Sebastian Pop <sebastian.pop@amd.com>
897
898 * gcc.dg/graphite/interchange-0.c: XFailed.
899 * gcc.dg/graphite/interchange-5.c: XFailed.
900 * gcc.dg/graphite/interchange-6.c: XFailed.
901
9022009-06-26 Sebastian Pop <sebastian.pop@amd.com>
903
904 * graphite-interchange.c (compute_array_size_poly): The end of the
905 recursion should return 1.
906
9072009-06-26 Sebastian Pop <sebastian.pop@amd.com>
908
909 * graphite-interchange.c (compute_array_size_cstr): Allow the
910 subscript multiplier to be -1.
911 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
912 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
913 data_container. Initializes PDR_DATA_CONTAINER.
914 (print_pdr_access_layout): New.
915 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
916 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
917 data_container.
918 (PDR_DATA_CONTAINER): New.
919 (new_poly_dr): Update declaration.
920 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
921 (build_poly_dr): Call pdr_add_data_dimensions.
922
9232009-06-26 Sebastian Pop <sebastian.pop@amd.com>
924
925 * graphite-poly.h (struct poly_dr): Fix comment.
926 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
927 (pdr_add_memory_accesses): New.
928 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
929
9302009-06-26 Sebastian Pop <sebastian.pop@amd.com>
931
932 * graphite-poly.c (print_pdrs, debug_pdrs): New.
933 (print_pbb): Add call to print_pdrs.
934 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
935
9362009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
937 Li Feng <nemokingdom@gmail.com>
938
939 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
940 (dependency_between_pbbs_p): New.
941 (lexicographically_gt_p): Assure !empty_p before polyhedron
942 intersection assign.
943 (build_lexicographically_gt_constraint): Correct lexicographically
944 judging.
945 * graphite-dependences.h: New.
946 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
947
9482009-06-24 Sebastian Pop <sebastian.pop@amd.com>
949
950 * graphite-clast-to-gimple.c (print_clast_stmt): New.
951 (gloog): Print to dump_file the generated clast.
952 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
953 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
954
9552009-06-24 Sebastian Pop <sebastian.pop@amd.com>
956
957 * graphite-poly.c (extend_scattering): Increment
958 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
959
9602009-06-24 Sebastian Pop <sebastian.pop@amd.com>
961
962 * graphite-interchange.c (compute_array_size_poly): Added exit of
963 recursion condition. Continue iterating even after the first equality.
964 (compute_array_size): Same.
965
9662009-06-24 Li Feng <nemokingdom@gmail.com>
967
968 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
969 -fdump-tree-final_cleanup to -fdump-tree-optimized.
970 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
971 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
972 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
973
9742009-06-23 Sebastian Pop <sebastian.pop@amd.com>
975
976 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
977 only when the use verifies is_gimple_reg.
978
9792009-06-23 Sebastian Pop <sebastian.pop@amd.com>
980
981 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
982 Allocate scaldims after call to unify_scattering_dimensions.
983
9842009-06-23 Sebastian Pop <sebastian.pop@amd.com>
985
986 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
987
9882009-06-23 Sebastian Pop <sebastian.pop@amd.com>
989 Albert Cohen <albert.cohen@inria.fr>
990
991 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
992 variables for the strip mining.
993
9942009-06-23 Sebastian Pop <sebastian.pop@amd.com>
995 Pranav Garg <pranav.garg2107@gmail.com>
996
997 * Makefile.in (OBJS-common): Added graphite-blocking.o.
998 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
999 (graphite-blocking.o): New rule.
1000 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1001 * graphite-blocking.c: New.
1002 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1003 flag_loop_strip_mine.
1004 (psct_scattering_dim_for_loop_depth): New.
1005 * graphite-poly.h (scop_do_strip_mine): Declared.
1006 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1007 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1008 flag_loop_strip_mine.
1009
10102009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1011
1012 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1013 a GMP value and a PPL coefficient at each iteration of a loop.
1014
10152009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1016
1017 * graphite-dependences.c (dependence_polyhedron): Do not use
1018 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1019 pbb_nb_scattering_transform.
1020 (graphite_legal_transform_dr): Same.
1021 * graphite-poly.c (extend_scattering): Same.
1022 (unify_scattering_dimensions): Same.
1023 (print_scattering_function): Same.
1024 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1025 PBB_NB_LOCAL_VARIABLES.
1026 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1027 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1028 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1029 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1030 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1031 (pbb_nb_scattering_transform): New.
1032 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1033 (psco_scattering_dim): Add assert on parameters.
1034 (psct_scattering_dim): Same.
1035 (psct_scattering_dim_for_loop_depth): Declared.
1036 (psct_local_var_dim): New.
1037 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1038 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1039 correct layout, call pbb_nb_local_vars.
1040 (psct_add_local_variable, psct_add_scattering_dimension): New.
1041 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1042 Initialize PBB_NB_SCATTERING_TRANSFORM.
1043
10442009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1045
1046 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1047 (set_coef): Renamed ppl_set_coef.
1048 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1049
10502009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1051
1052 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1053 test a boolean against 1.
1054 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1055 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1056 (pbb_do_interchange): Returns true when a transform has been performed.
1057 (scop_do_interchange): Same.
1058 * graphite-poly.c (apply_poly_transforms): Use the return value of
1059 scop_do_interchange.
1060 * graphite-poly.h (scop_do_interchange): Update declaration.
1061
10622009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1063
1064 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1065 after last use.
1066 * sese.c (sese_reset_aux_in_loops): New.
1067 * sese.h (sese_reset_aux_in_loops): New.
1068
10692009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1070
1071 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1072 multiplier and multiply the constant by the multiplier.
1073 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1074 (build_poly_dr): Do not use the multiplier to define the subscript.
1075
10762009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1077
1078 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1079 compiler's data reference. Initialize PDR_CDR.
1080 (print_pdr): Call dump_data_reference.
1081 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1082 Add compiler_dr field.
1083 (PDR_BB): Renamed PDR_PBB.
1084 (PDR_CDR): New.
1085 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1086 GCC's data reference representation.
1087 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1088 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1089
10902009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1091
1092 * graphite-poly.c (print_scattering_function): Also print the layout.
1093 * graphite-poly.h (pbb_nb_local_vars): New.
1094
10952009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1096
1097 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1098
10992009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1100
1101 * graphite-poly.c (print_pdr, debug_pdr): New.
1102 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1103 (PDR_BASE): Removed.
1104
11052009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1106
1107 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1108 ltrans-{1..6,8}.c.
1109
11102009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1111
1112 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1113 subscript identification column.
1114 (pbb_do_interchange): Print to dump_file that some loops "will be
1115 interchanged". Rely on that chain of characters in the testcases.
1116 * gcc.dg/graphite/interchange-0.c: New.
1117 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1118 interchange-*.c files and compile them with -floop-interchange.
1119
11202009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1121
1122 * graphite-interchange.c (interchange_profitable_p): Renamed
1123 pbb_interchange_profitable_p.
1124
11252009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1126 Harsha Jagasia <harsha.jagasia@amd.com>
1127 Pranav Garg <pranav.garg2107@gmail.com>
1128
1129 * graphite-interchange.c (interchange_profitable_p): Make static.
1130 (pbb_interchange_loop_depths, pbb_do_interchange,
1131 scop_do_interchange): New.
1132 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1133 for flag_loop_interchange.
1134 * graphite-poly.h (scop_do_interchange): Declared.
1135 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1136 flag_loop_interchange is used.
1137
11382009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1139
1140 * graphite-dependences.c (dependence_polyhedron): Update use of
1141 pbb_nb_scattering_dims.
1142 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1143 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1144 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1145 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1146
11472009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1148
1149 * graphite.c: Cleanup foo.
1150
11512009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1152
1153 * Merge from mainline (r143684:148293).
1154 * Disabled libpcp until it gets fixed.
1155
11562009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1157 Harsha Jagasia <harsha.jagasia@amd.com>
1158
1159 * graphite-interchange.c: New.
1160 * Makefile.in (graphite-interchange.o): New.
1161 * graphite-poly.h (interchange_profitable_p): Declared.
1162 * graphite-ppl.h (value_max): New.
1163
11642009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1165
1166 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1167 * graphite-poly.h: Fix some comments.
1168 (pdr_dim): New.
1169 (pdr_scop): New.
1170
11712009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1172
1173 * graphite-poly.h
1174 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1175 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1176 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1177 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1178 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1179 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1180 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1181 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1182 * graphite-clast-to-gimple.c: Same.
1183 * graphite-dependences.c: Same.
1184 * graphite-poly.c: Same.
1185 * graphite-sese-to-poly.c: Same.
1186
11872009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1188
1189 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1190 expressions for an IV rename, as returned by clast_to_gcc_expression.
1191 (copy_renames): Rename new_name to expr.
1192 * sese.c (debug_rename_elt): Same.
1193 (get_rename): Same.
1194 (set_rename): Same.
1195 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1196 the information from the rename map.
1197 (rename_variables_in_stmt): Same.
1198 (add_loop_exit_phis): Rename new_name to expr.
1199 (insert_loop_close_phis): Same.
1200 (add_guard_exit_phis): Same. Call force_gimple_operand.
1201 * sese.h (struct rename_map_elt): Rename new_name to expr.
1202 (new_rename_map_elt): Same.
1203
12042009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1205
1206 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1207 * sese.c (set_rename): Make it extern.
1208 * sese.h (set_rename): Declared.
1209
12102009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1211
1212 * graphite-poly.c (extend_scattering): Free values.
1213 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1214 Free iterators.
1215 (ppl_print_powerset_matrix): Same.
1216 * graphite-scop-detection.c (free_scops_1): New.
1217 (limit_scops): Call free_scops_1.
1218 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1219 (build_poly_dr): Free PPL coefficients.
1220 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1221
12222009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1223
1224 * graphite-dependences.c: New.
1225 * graphite-data-ref.c: Removed.
1226 * graphite-data-ref.h: Removed.
1227 * Makefile.in (graphite-data-ref.o): Removed.
1228 (graphite-dependences.o): Added.
1229 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1230 * graphite-poly.c: Same.
1231 Move the data dependence testing to graphite-dependences.c.
1232
12332009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1234
1235 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1236 from graphite_cannot_represent_loop. Code refactored.
1237 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1238
12392009-05-17 Li Feng <nemokingdom@gmail.com>
1240
1241 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1242 Cover all the testcases (not only the filtered ones).
1243
12442009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1245
1246 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1247 unnecessary check. Update comments. Move check for REAL_TYPE here.
1248 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1249 done in (stmt_simple_for_scop_p).
1250
12512009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1252
1253 * graphite.c (print_global_statistics): New.
1254 (print_graphite_scop_statistic): New.
1255 (print_graphite_statistics): New.
1256 (graphite_initialize, graphite_transform_loops): Print statistics.
1257 * graphite-scop-detection (build_scops): Print statistics.
1258 (print_graphite_scop_statistics): New.
1259 (print_graphite_statistics): New.
1260
12612009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1262
1263 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1264 (debug_clast_name_index): Removed.
1265 (debug_clast_name_indexes_1): Removed.
1266 (debug_clast_name_indexes): Removed.
1267 (clast_name_index_elt_info): Removed.
1268 (eq_clast_name_indexes): Removed.
1269 (clast_name_to_index): Removed.
1270 (new_clast_name_index): Removed.
1271 (save_clast_name_index): Removed.
1272 (save_var_name): Moved...
1273 (init_sese_params_index): Removed.
1274 (clast_name_to_gcc): Remove use of name_tree.
1275 (initialize_cloog_names): Same.
1276 (gloog): Do not call init_sese_params_index.
1277 * graphite-sese-to-poly.c (save_var_name): ...here.
1278 (parameter_index_in_region): New.
1279 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1280 (parameter_index_in_region): Removed.
1281 (is_parameter): Remove use of name_tree.
1282 * sese.h (struct name_tree): Removed.
1283 (struct sese): Remove use of name_tree. New field params_names.
1284 (SESE_PARAMS_NAMES): New.
1285 (SESE_PARAMS): Remove duplicate.
1286 (parameter_index_in_region): Removed.
1287 (sese_nb_params): Remove use of name_tree.
1288 (struct clast_name_index): New.
1289 (new_clast_name_index): New.
1290 (clast_name_to_index): New.
1291 (save_clast_name_index): New.
1292 (debug_clast_name_index): New.
1293 (debug_clast_name_indexes_1): New.
1294 (debug_clast_name_indexes): New.
1295 (clast_name_index_elt_info): New.
1296 (eq_clast_name_indexes): New.
1297
12982009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1299
1300 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1301 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1302 (graphite_loop_normal_form): Do not pass region. Do not
1303 initialize SESE_OLDIVS.
1304 (build_graphite_loop_normal_form): Update call to
1305 graphite_loop_normal_form.
1306 * sese.c (debug_oldivs): Removed.
1307 (new_sese): Do not initialize SESE_OLDIVS.
1308 (free_sese): Do not free SESE_OLDIVS.
1309 (oldiv_for_loop): Removed.
1310 * sese.h (struct sese): Remove old_ivs.
1311 (SESE_OLDIVS): Removed.
1312 (oldiv_for_loop): Removed.
1313
13142009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1315
1316 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1317 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1318 replaced by a call to newivs_to_depth_to_newiv.
1319 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1320 (clast_to_gcc_expression_red): Same.
1321 (gcc_type_for_clast_expr): Same.
1322 (gcc_type_for_clast_eq): Same.
1323 (graphite_translate_clast_equation): Same.
1324 (graphite_create_guard_cond_expr): Same.
1325 (graphite_create_new_guard): Same.
1326 (graphite_create_new_loop): Same.
1327 (build_iv_mapping): Same.
1328 (translate_clast): Same.
1329 (gloog): Same.
1330 (loop_iv_stack_patch_for_consts): Removed. *
1331 sese.c (iv_stack_entry_is_constant): Removed.
1332 (iv_stack_entry_is_iv): Removed.
1333 (loop_iv_stack_push_iv): Removed.
1334 (loop_iv_stack_insert_constant): Removed.
1335 (loop_iv_stack_pop): Removed.
1336 (loop_iv_stack_get_iv): Removed.
1337 (loop_iv_stack_get_iv_from_name): Removed.
1338 (debug_loop_iv_stack): Removed.
1339 (free_loop_iv_stack): Removed.
1340 (loop_iv_stack_remove_constants): Removed. *
1341 sese.h (iv_stack_entry_kind): Removed.
1342 (iv_stack_entry_data_union): Removed.
1343 (iv_stack_entry_struct): Removed.
1344 (iv_stack_entry_p): Removed.
1345 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1346 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1347 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1348 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1349 (gbb_loop_at_index): Fix indenting.
1350 (gbb_loop_index): Removed.
1351
13522009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1353
1354 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1355 Call clast_name_to_index.
1356
13572009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1358
1359 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1360 do not pass params. Get params from SESE_PARAMS.
1361 (clast_to_gcc_expression): Same.
1362 (clast_to_gcc_expression_red): Same.
1363 (gcc_type_for_clast_eq): Same.
1364 (graphite_translate_clast_equation): Same.
1365 (graphite_create_new_loop): Same.
1366 * sese.c (rename_variables_in_stmt): Fix comment.
1367
13682009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1369
1370 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1371 newivs_index.
1372 Call save_clast_name_index.
1373 (translate_clast): Pass newivs_index.
1374 (gloog): Create and free newivs_index.
1375
13762009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1377
1378 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1379 (clast_name_index_p): New type.
1380 (debug_clast_name_index): New.
1381 (debug_clast_name_indexes_1): New.
1382 (debug_clast_name_indexes): New.
1383 (clast_name_index_elt_info): New.
1384 (eq_clast_name_indexes): New.
1385 (clast_name_to_index): New.
1386 (new_clast_name_index): New.
1387 (save_clast_name_index): New.
1388 (init_sese_params_index): New.
1389 (gloog): Call init_sese_params_index.
1390 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1391 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1392 (free_sese): Free SESE_PARAMS_INDEX.
1393 * sese.h (struct sese): Add params_index.
1394 (SESE_PARAMS_INDEX): New.
1395
13962009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1397
1398 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1399 (graphite_create_new_loop): Pass the newivs vector. Push the
1400 newly created IV to newivs.
1401 (translate_clast): Pass the newivs vector.
1402 (gloog): Create and destroy the newivs vector.
1403
14042009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1405
1406 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1407 (graphite_loop_normal_form): Initialize loop->aux with the unique
1408 IV that has been created.
1409
14102009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1411
1412 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1413 scev with parameters in the base part. They where forbidden
1414 exidently.
1415
14162009-05-11 Li Feng <nemokingdom@gmail.com>
1417
1418 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1419 compile options by file names.
1420 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1421 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1422 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1423 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1424
14252009-05-08 Li Feng <nemokingdom@gmail.com>
1426
1427 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1428 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1429 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1430 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1431
14322009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1433
1434 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1435 by final cleanup.
1436
14372009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1438
1439 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1440 allow integer constant strides.
1441 (graphite_can_represent_expr): Depend on outermost_loop.
1442 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1443 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1444 build_scops_1): Same.
1445 (scopdet_basic_block_info): Same and insert layered SCoP
1446 detection.
1447 (try_generate_gimple_bb): Cleanup.
1448 (build_scops): Enable data references.
1449
1450 * testsuite/gcc.dg/graphite/id-5.c: New.
1451 * testsuite/gcc.dg/graphite/id-9.c: New.
1452 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1453 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1454
14552009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1456
1457 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1458 that we have not yet built for this SCoP.
1459
14602009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1461
1462 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1463 for complex numbers.
1464
14652009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1466
1467 * graphite-ppl.c: Fix build if cloog is not available.
1468
14692009-05-04 Li Feng <nemokingdom@gmail.com>
1470
1471 * tree-parloops.c (loop_parallel_p): Remove construction of
1472 NITER and REDUCTION_LIST.
1473 (try_get_loop_niter): New.
1474 (try_create_reduction_list): New.
1475 (parallelize_loops): Bypass the failed checkings in autopar
1476 when can_be_parallel in loop structure is set to true.
1477
14782009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1479
1480 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1481 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1482
14832009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1484
1485 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1486 Enable EQ_EXPR and NE_EXPR again.
1487
14882009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1489
1490 * graphite-scop-detection.c (graphite_can_represent_scev):
1491 Add check if scev is affine multivariate.
1492 (harmful_stmt_in_bb): Check if we can represent the conditions.
1493 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1494 harmful_stmt_in_bb.
1495 * testsuite/gcc.dg/graphite/id-7.c: New.
1496
14972009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1498
1499 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1500 Check all bbs in region, not only the bbs that are represented in
1501 GRAPHITE.
1502 (build_poly_scop): Add newline.
1503 * testsuite/gcc.dg/graphite/id-8.c: New.
1504
15052009-04-30 Li Feng <nemokingdom@gmail.com>
1506
1507 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1508 when loop initialize.
1509 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1510 * common.opt: Declare flag_graphite_force_parallel.
1511 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1512 loop parallel.
1513 * graphite-poly.c (apply_poly_transforms): Introduce
1514 flag_graphite_force_parallel.
1515 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1516 * toplev.c (process_options): ditto and replace a not correctly
1517 encoded space.
1518
15192009-04-30 Li Feng <nemokingdom@gmail.com>
1520
1521 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1522 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1523 to the redefinition.
1524 (compute_cloog_iv_types_1): ditto.
1525 (build_iv_mapping): ditto.
1526 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1527 initialization.
1528 (free_gimple_bb): Removed GBB_LOOPS related free part.
1529 (build_bb_loops): Removed.
1530 * sese.h (struct gimple_bb): Removed loops.
1531 (GBB_LOOPS): Removed.
1532 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1533 (gbb_loop_index): ditto.
1534
15352009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1536
1537 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1538 allow non constant strides.
1539 * testsuite/gcc.dg/graphite/scop-20.c: New.
1540
15412009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1542
1543 * graphite-scop-detection.c (dot_all_scops): Fix system call
1544 return value warning.
1545 (dot_scop): Same.
1546
15472009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1548
1549 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1550 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1551
15522009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1553
1554 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1555 build_pairwise_constraint, dr_equality_constraints,
1556 build_pairwise_scheduling_equality,
1557 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1558 build_lexicographically_gt_constraint, dependence_polyhedron,
1559 graphite_legal_transform_dr, graphite_legal_transform_bb,
1560 graphite_legal_transform): New.
1561 * graphite-poly.h (graphite_legal_transform): Declared.
1562 * graphite-sese-to-poly.c (build_poly_scop): Call to
1563 graphite_legal_transform is disabled for the moment.
1564
15652009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1566
1567 * graphite-poly.h (pbb_nb_scattering_dims): New.
1568 (pbb_nb_scattering): Use it.
1569
15702009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1571
1572 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1573 Pointset_Powerset version of ppl_insert_dimensions.
1574 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1575
15762009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1577
1578 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1579
15802009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1581
1582 * graphite-poly.h: Fix comment.
1583
15842009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1585
1586 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1587
15882009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1589
1590 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1591 statements.
1592
15932009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1594
1595 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1596 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1597 conditions.
1598
15992009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1600
1601 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1602 handle EQ_EXPR and NE_EXPR.
1603
16042009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1605
1606 * graphite-poly.h (poly_dr): Fix comment.
1607
16082009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1609 Tobias Grosser <grosser@fim.uni-passau.de>
1610
1611 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1612 with a zero dimension polyhedron.
1613 (find_scop_parameters): Move the call to scop_set_nb_params here.
1614 (build_loop_iteration_domains): Store in loop->aux the iteration
1615 domain polyhedron.
1616 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1617 by any loop in scop.
1618 (build_poly_scop): Do not call scop_set_nb_params.
1619
16202009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1621 Tobias Grosser <grosser@fim.uni-passau.de>
1622
1623 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1624 add_condition_to_domain not GT_EXPR.
1625
16262009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1627
1628 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1629 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1630 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1631 upper_bound_assign to calculate unions.
1632 * testsuite/gcc.dg/graphite/id-6.c: New.
1633
16342009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1635
1636 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1637 handle abnormal edges.
1638
16392009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1640
1641 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1642 (free_poly_bb): Also free poly_drs.
1643 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1644 (poly_dr): Polyhedron to Pointset_Powerset.
1645 (pdr_accessp_nb_subscripts): Same.
1646 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1647 poly_drs.
1648
16492009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1650
1651 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1652 names into more meaningful names.
1653
16542009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1655
1656 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1657 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1658
16592009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1660
1661 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1662 the reduction_list.
1663 * tree-parloops.c (rewrite_phi_with_iv): New.
1664 (rewrite_all_phi_nodes_with_iv): New.
1665 (canonicalize_loop_ivs): Call them.
1666
16672009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1668
1669 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1670 graphite_find_data_references_in_stmt.
1671 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1672 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1673
16742009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1675
1676 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1677
16782009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1679
1680 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1681 instead of bb_in_region.
1682 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1683 (build_sese_conditions): Use flag_bb_in_sese.
1684 * sese.c (register_bb_in_sese): Removed.
1685 (new_sese): Remove initialization of SESE_REGION_BBS.
1686 (free_sese): Do not free SESE_REGION_BBS.
1687 * sese.h (struct sese): Remove field region_basic_blocks.
1688 (SESE_REGION_BBS): Removed.
1689 (bb_in_sese_p): Implement in function of bb_in_region.
1690
16912009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1692
1693 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1694 loops.
1695
16962009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1697
1698 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1699 and EQ_EXPR.
1700 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1701 (add_condition_to_domain): New.
1702 (add_condition_to_pbb): New.
1703 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1704 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1705
17062009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1707
1708 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1709 ppl_Pointset_Powerset.
1710 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1711 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1712 (pbb_nb_loops): Same.
1713 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1714 add_conditions_to_domain): Same.
1715 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1716 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1717 ppl_const_Polyhedron_t.
1718 (ppl_print_powerset_matrix): New.
1719 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1720 ppl_print_powerset_matrix): New.
1721 (ppl_print_polyhedron_matrix): Updated.
1722
17232009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1724
1725 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1726
17272009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1728
1729 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1730 (print_iteration_domains, debug_iteration_domain,
1731 debug_iteration_domains): New.
1732 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1733 debug_iteration_domains): Declared.
1734 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1735 indenting.
1736
17372009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1738 Sebastian Pop <sebastian.pop@amd.com>
1739
1740 * graphite-poly.h (print_iteration_domain): New.
1741 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1742 (build_sese_conditions_1, build_sese_conditions_after,
1743 build_sese_conditions_before): New.
1744 (build_sese_conditions): Rewritten.
1745
17462009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1747 Tobias Grosser <grosser@fim.uni-passau.de>
1748
1749 Cleanup of code generation liveouts.
1750 * graphite-clast-to-gimple.c (translate_clast): Use a single
1751 rename_map instead of one per translated statement.
1752 Do not use SESE_LIVEOUT_RENAMES.
1753 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1754 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1755 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1756 phi node of a reduction: when a loop contains a reduction used outside
1757 the loop, there should be a scalar close phi node on the exit block.
1758 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1759 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1760 (free_sese): Do not free them.
1761 (sese_build_liveouts_use): Do not use them.
1762 (sese_build_liveouts_bb): Same.
1763 (sese_build_liveouts): Same.
1764 (sese_insert_phis_for_liveouts): Same.
1765 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1766 (defined_in_loop_p): New.
1767 (alive_after_loop): New.
1768 (close_phi_not_yet_inserted_p): New.
1769 (struct alep, alep_p): New.
1770 (add_loop_exit_phis): Remove from the rename_map all the names defined
1771 in the code generated loop.
1772 (insert_loop_close_phis): Traverse the rename_map passed to it.
1773 Don't use SESE_LIVEOUT_RENAMES.
1774 (default_liveout_before_guard): Renamed default_before_guard.
1775 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1776 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1777 (register_sese_liveout_renames): Removed.
1778 (copy_bb_and_scalar_dependences): Do not call it.
1779 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1780 reduction_list.
1781 (SESE_LIVEOUT): Removed.
1782 (SESE_LIVEOUT_RENAMES): Removed.
1783 (SESE_REDUCTION_LIST): Removed.
1784 (sese_build_liveouts): Removed.
1785 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1786 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1787 (insert_guard_phis): Same.
1788 (rename_map_elt): Declare a VEC of them.
1789 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1790 trees not pointers to trees.
1791
1792 Rewrite in canonical close SSA form:
1793 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1794 (limit_scops): Close the scop after the block containing the close phi
1795 nodes.
1796 (canonicalize_loop_closed_ssa): New.
1797 (canonicalize_loop_closed_ssa_form): New.
1798 (build_scops): Call canonicalize_loop_closed_ssa_form.
1799
1800 * graphite-sese-to-poly.c: Fix typos.
1801
18022009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1803
1804 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1805 Extended.
1806 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1807 (print_pbb): Add conditions.
1808
18092009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1810 Sebastian Pop <sebastian.pop@amd.com>
1811
1812 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1813 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1814 (build_scop_bbs_1): New.
1815 (build_scop_bbs): Rewrite.
1816 * sese.h (bb_in_region): New.
1817
18182009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1819
1820 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1821 poly_drs vector.
1822 (print_scop): Style.
1823 * graphite-poly.h (poly_bb): Add drs vector.
1824 (PBB_DRS): Add accessor.
1825 * graphite-sese-to-poly.c (build_poly_dr): New.
1826 (build_pbb_drs, build_scop_drs): New.
1827 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1828
18292009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1830
1831 * tree-ssa-loop.c: Include forgotten toplev.h
1832
18332009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1834
1835 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1836 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1837 * testsuite/gcc.dg/graphite/pr37928.c: Same
1838 * testsuite/gcc.dg/graphite/pr38409.c: Same
1839 * testsuite/gcc.dg/graphite/pr38498.c: Same
1840 * testsuite/gcc.dg/graphite/pr38559.c: Same
1841 * testsuite/gcc.dg/graphite/pr39335.c: Same
1842 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1843 * testsuite/gfortran.dg/graphite/block-2.f: Same
1844 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1845 with -floop-*.
1846
18472009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1848
1849 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1850 build_access_matrix, build_scop_data_accesses): Remove access function
1851 building. (We get a new version soon).
1852 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1853 * sese.h (nb_loops_around_loop_in_sese): Remove.
1854 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1855
18562009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1857 Sebastian Pop <sebastian.pop@amd.com>
1858
1859 * graphite-scop-detection.c (struct scopdet_info): Rename last
1860 field to exit.
1861 (scopdet_basic_block_info, build_scops_1): Don't use
1862 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1863
18642009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1865 Sebastian Pop <sebastian.pop@amd.com>
1866
1867 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1868 * sese.c (sese_build_liveouts_use): Renamed from
1869 sese_build_livein_liveouts_use. Remove liveins.
1870 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1871 Call sese_build_liveouts_use.
1872 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1873 Call sese_build_liveouts_bb.
1874 (new_sese, free_sese): Remove liveins.
1875 (sese_add_exit_phis_var): Deleted.
1876 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1877 directly.
1878 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1879
1880 * sese.h (sese): Remove num_ver and livein.
1881 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1882
18832009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1884
1885 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1886
18872009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1888
1889 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1890 (build_scop_scattering): Do not use compare_prefix_loops any more.
1891 (nb_common_loops): New.
1892
18932009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1894
1895 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1896 (register_old_and_new_names): Renamed set_rename.
1897
18982009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1899
1900 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1901 of the decl from the previous commit.
1902
19032009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1904
1905 * graphite-scop-detection.c (dot_scop): New.
1906 * graphite-scop-detection.h (dot_scop): Declared.
1907
19082009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1909
1910 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1911
19122009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1913
1914 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1915 condition at the end of the loop.
1916 * graphite.c (graphite_initialize, graphite_finalize): Print to
1917 dump_file the compiled function.
1918 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1919 of create_empty_loop_on_edge.
1920 (translate_clast): Update the code generation of loops for the new
1921 shape of loops.
1922 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1923
19242009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1925
1926 Reverted the patch from 2009-03-19.
1927
19282009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1929
1930 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1931 poly_drs vector.
1932 (print_scop): Style.
1933 * graphite-poly.h (poly_bb): Add drs vector.
1934 (PBB_DRS): Add accessor.
1935 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1936 (build_access_matrix_with_af, build_access_matrix,
1937 build_scop_data_accesses): Delete.
1938 (build_poly_dr): New.
1939 (build_pbb_drs, build_scop_drs): New.
1940 (build_poly_scop): call build_scop_drs.
1941
19422009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1943
1944 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1945 once per basic block.
1946
19472009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1948
1949 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1950 (graphite_can_represent_expr): Renamed from loop_affine_expr
1951 and enhanced.
1952 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1953 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1954 (scopdet_basic_block_info): Actually define entry_block.
1955 (stmt_simple_memref_p): Moved here from ...
1956
1957 * tree-data-ref.c (stmt_simple_memref_p): here.
1958 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1959
19602009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1961
1962 * testsuite/gcc.dg/graphite/id-4.c: New.
1963
19642009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1965
1966 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1967 (register_old_and_new_names): Update the content of the map.
1968 When there was already a rename_map_elt in the map at that
1969 location, free it.
1970 (copy_bb_and_scalar_dependences): Do rename_variables after
1971 expand_scalar_variables.
1972 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1973 of the map. When there was already a rename_map_elt in the
1974 map at that location, free it.
1975 (translate_clast): Pass the rename_map. Do not initialize and free
1976 a rename_map per stmt_user.
1977 (gloog): Initialize and free one rename_map and pass it to
1978 translate_clast.
1979
19802009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1981
1982 * sese.c (expand_scalar_variables_stmt,
1983 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1984 parameter.
1985 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1986 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1987 the gimple_stmt_iterator of the statement to be expanded.
1988 * graphite-scop-detection.c (is_simple_operand): Do handle
1989 REALPART_EXPR.
1990
19912009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
1992
1993 * graphite-scop-detection.c (is_simple_operand): Do not handle
1994 REALPART_EXPR.
1995 * testsuite/gcc.dg/graphite/id-2.c: New.
1996
1997 * graphite-sese-to-poly.c (build_bb_loops,
1998 add_value_to_dim, scan_tree_for_params_right_scev,
1999 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2000 find_params_in_bb, build_loop_iteration_domains,
2001 add_conditions_to_domain): Remove subtract.
2002
20032009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2004
2005 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2006 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2007 pbb_loop_at_index -> gbb_loop_at_index.
2008 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2009 (debug_loop_vec): Delete.
2010 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2011 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2012 (PBB_LOOPS): Removed.
2013 (PBB_BLACK_BOX): Insert cast.
2014 (pbb_set_black_box): New setter.
2015 (pbb_loop_at_index, pbb_loop_index): Removed.
2016 (scop_set_region, scop_set_nb_params): New.
2017 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2018 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2019 (build_poly_scop): Use scop_set_nb_params.
2020 * sese.h (gimple_bb): Add LOOPS.
2021 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2022
20232009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2024
2025 Revert previous commit.
2026
20272009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2028
2029 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2030 (register_old_and_new_names): Update the content of the map.
2031 When there was already a rename_map_elt in the map at that
2032 location, free it.
2033 (copy_bb_and_scalar_dependences): Do rename_variables after
2034 expand_scalar_variables.
2035 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2036 of the map. When there was already a rename_map_elt in the
2037 map at that location, free it.
2038 (translate_clast): Pass the rename_map. Do not initialize and free
2039 a rename_map per stmt_user.
2040 (gloog): Initialize and free one rename_map and pass it to
2041 translate_clast.
2042
20432009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2044
2045 Remove forgotten line in revert.
2046
20472009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2048
2049 Revert previous commit.
2050
20512009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2052
2053 * sese.c (register_old_and_new_names): Update the content
2054 of the map. When there was already a rename_map_elt in the
2055 map at that location, free it.
2056 (copy_bb_and_scalar_dependences): Do rename_variables after
2057 expand_scalar_variables.
2058 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2059 of the map. When there was already a rename_map_elt in the
2060 map at that location, free it.
2061 (translate_clast): Pass the rename_map. Do not initialize and free
2062 a rename_map per stmt_user.
2063 (gloog): Initialize and free one rename_map and pass it to
2064 translate_clast.
2065
20662009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2067
2068 * graphite-clast-to-gimple.c (translate_clast): context_loop
2069 is never NULL.
2070
20712009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2072 Sebastian Pop <sebastian.pop@amd.com>
2073
2074 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2075 of the use of ppl_Polyhedron_map_space_dimensions.
2076
20772009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2078 Sebastian Pop <sebastian.pop@amd.com>
2079
2080 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2081 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2082 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2083 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2084 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2085 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2086 pbb_nb_params): New.
2087 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2088 nb_loops_around_pbb): Adapt return types.
2089
20902009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2091
2092 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2093 graphite-clast-to-gimple.o, graphite-data-ref.o,
2094 graphite-scop-detection.o, graphite-poly.o): Add
2095 more headers.
2096
20972009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2098
2099 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2100 graphite-clast-to-gimple.o, graphite-data-ref.o,
2101 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2102
21032009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2104
2105 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2106 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2107 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2108 * testsuite/gcc.dg/graphite/block-0.c: Same.
2109 * testsuite/gcc.dg/graphite/block-1.c: Same.
2110 * testsuite/gcc.dg/graphite/block-2.c: Same.
2111 * testsuite/gcc.dg/graphite/block-3.c: Same.
2112 * testsuite/gcc.dg/graphite/block-4.c: Same.
2113 * testsuite/gcc.dg/graphite/block-5.c: Same.
2114 * testsuite/gcc.dg/graphite/block-6.c: Same.
2115 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2116 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2117 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2118 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2119 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2120 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2121 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2122 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2123 * opts.c: Remove -floop-block from -O2.
2124 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2125 -floop-strip-mine are used.
2126
21272009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2128 Sebastian Pop <sebastian.pop@amd.com>
2129
2130 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2131 dimensions.
2132 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2133 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2134 strip_mine_profitable_p, is_interchange_valid,
2135 graphite_trans_bb_block, graphite_trans_loop_block,
2136 graphite_trans_scop_block): Temporary removed.
2137 (extend_scattering, unify_scattering_dimensions): New.
2138 (print_scattering_function, graphite_read_transforms):
2139 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2140 (graphite_generate_scattering_fns): Removed.
2141 (apply_poly_transforms): Cleanup.
2142 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2143 (schedule_to_scattering): Moved.
2144 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2145 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2146 (pbb_nb_scattering): New.
2147 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2148 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2149 Removed.
2150 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2151 shift_poly.
2152 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2153 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2154 -> PBB_TRANSFORMED_SCATTERING.
2155 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2156 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2157 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2158 (check_poly_representation): Do not return bool.
2159 (graphite_transform_loops): Reformat.
2160 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2161
21622009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2163
2164 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2165 debug_pbb_domain, debug_pbb, debug_scop): New.
2166 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2167 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2168
21692009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2170
2171 PR middle-end/39335
2172 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2173 when the type precision of the induction variable should be
2174 larger than the type precision of nit.
2175 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2176 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2177 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2178
2179 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2180 * testsuite/gcc.dg/graphite/pr39335.c: New.
2181
21822009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2183
2184 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2185 SSA_NAMES not struct reduction_info.
2186
21872009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2188
2189 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2190
21912009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2192 Tobias Grosser <grosser@fim.uni-passau.de>
2193
2194 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2195 (free_sese): Free SESE_REDUCTION_LIST.
2196 * sese.h (struct sese): Add field reduction_list.
2197 (SESE_REDUCTION_LIST): New.
2198 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2199 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2200
22012009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2202 Tobias Grosser <grosser@fim.uni-passau.de>
2203
2204 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2205 of loop_p.
2206
22072009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2208 Tobias Grosser <grosser@fim.uni-passau.de>
2209
2210 * tree-parloops.c (struct brli, build_reduction_list_info,
2211 analyze_reduction_list, gather_scalar_reductions): New.
2212 (loop_parallel_p): Build a reduction list containing only
2213 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2214 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2215 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2216 * tree-flow.h (gather_scalar_reductions): Declared.
2217
22182009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2219
2220 PR middle-end/39308
2221 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2222 number_of_iterations_exit from a gcc_assert.
2223
22242009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2225 Jan Sjodin <jan.sjodin@amd.com>
2226
2227 * output.h (graphite_out_file, graphite_in_file): Declared.
2228 * toplev.c (graphite_out_file, graphite_in_file): New.
2229 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2230 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2231 Don't call schedule_to_scattering.
2232 * common.opt (fgraphite-write, fgraphite-read): New.
2233 * graphite-poly.c: Include output.h.
2234 (print_scattering_function, print_scattering_functions,
2235 debug_scattering_function, debug_scattering_functions,
2236 graphite_write_transforms, graphite_read_transforms,
2237 graphite_generate_scattering_fns): New.
2238 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2239 Call graphite_generate_scattering_fns, graphite_write_transforms,
2240 graphite_read_transforms.
2241 (new_poly_bb): Initialize PBB_SCATTERING.
2242 (free_poly_bb): Free PBB_SCATTERING.
2243 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2244 * graphite-poly.h (struct poly_bb): Add field scattering.
2245 (PBB_SCATTERING): New.
2246 (print_scattering_function, print_scattering_functions,
2247 debug_scattering_function, debug_scattering_functions): Declared.
2248 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2249 GMP values, not integers!
2250 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2251 ppl_read_polyhedron_matrix): New.
2252 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2253 debug_ppl_polyhedron_matrix,
2254 ppl_read_polyhedron_matrix): Declared.
2255 * Makefile.in (graphite-poly.o): Depends on output.h.
2256
22572009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2258 Tobias Grosser <grosser@fim.uni-passau.de>
2259
2260 Revert this change:
2261 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2262 scalar evolutions in the scop_entry->loop_father.
2263
22642009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2265 Tobias Grosser <grosser@fim.uni-passau.de>
2266
2267 * graphite.h (ref_nb_loops): Remove declaration.
2268 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2269 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2270 debug_gbb): Moved to sese.h.
2271 * sese.h: As said.
2272
22732009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2274 Tobias Grosser <grosser@fim.uni-passau.de>
2275
2276 * graphite-data-ref.[ch]: Disable.
2277
22782009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2279 Tobias Grosser <grosser@fim.uni-passau.de>
2280
2281 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2282 scalar evolutions in the scop_entry->loop_father.
2283
22842009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2285
2286 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2287 (graphite_cannot_represent_loop_niter): Renamed
2288 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2289 (limit_scops): build_sese_loop_nests does not return a bool.
2290 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2291 * sese.c (nb_reductions_in_loop): ... from here.
2292 (graphite_loop_normal_form): ... from here.
2293 (sese_record_loop): Does not fail, so does not return a bool.
2294 (build_sese_loop_nests): Same.
2295 * sese.h (build_sese_loop_nests): Update declaration.
2296 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2297 (build_graphite_loop_normal_form): New.
2298 (gloog): Call build_graphite_loop_normal_form.
2299 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2300 build_sese_loop_nests.
2301
2302 * testsuite/gcc.dg/graphite/id-1.c: New.
2303
23042009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2305 Tobias Grosser <grosser@fim.uni-passau.de>
2306
2307 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2308 The SCoP detection fix is sufficient.
2309
23102009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2311
2312 PR tree-optimization/39260
2313 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2314 the basic block contains a condition with a real type.
2315 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2316
2317 * gcc.dg/graphite/pr39260.c: New.
2318
23192009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2320
2321 * graphite-poly.c: Inlcude params.h.
2322 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2323 the size of a tile.
2324 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2325 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2326
23272009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2328 Tobias Grosser <grosser@fim.uni-passau.de>
2329
2330 * graphite-scop-detection.c (dot_all_scops_1,
2331 dot_all_scops): Moved here.
2332 * graphite-scop-detection.h (dot_all_scops): Declared here.
2333 * graphite.c (graphite_initialize, graphite_finalize): New.
2334 (graphite_transform_loops): Cleaned up.
2335 * sese.c (debug_oldivs): Moved here.
2336 * graphite-poly.c (graphite_apply_transformations): Renamed
2337 apply_poly_transforms.
2338 (debug_loop_vec): Moved here.
2339 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2340 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2341 find_scop_parameters, build_scop_iteration_domain,
2342 add_conditions_to_constraints, build_scop_canonical_schedules,
2343 build_scop_data_accesses): Now static.
2344 (build_poly_scop, check_poly_representation): New.
2345
23462009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2347
2348 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2349 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2350 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2351 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2352 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2353 scan_tree_for_params, struct irp_data, dx_record_params,
2354 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2355 build_loop_iteration_domains, add_conditions_to_domain,
2356 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2357 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2358 build_sese_conditions, add_conditions_to_constraints,
2359 build_scop_iteration_domain, build_access_matrix_with_af,
2360 build_access_matrix,
2361 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2362
2363 * graphite-sese-to-poly.c: New.
2364 * graphite-sese-to-poly.h: New.
2365
2366 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2367
23682009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2369
2370 * graphite.c: Split graphite code generation to a new file.
2371 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2372 max_precision_type, clast_to_gcc_expression_red,
2373 clast_to_gcc_expression, gcc_type_for_clast_expr,
2374 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2375 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2376 graphite_create_new_guard, clast_get_body_of_loop,
2377 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2378 graphite_create_new_loop, build_iv_mapping, copy_renames,
2379 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2380 compute_cloog_iv_types, free_scattering, save_var_name,
2381 initialize_cloog_names, build_scop_context, build_cloog_prog,
2382 set_cloog_options, debug_clast_stmt, scop_to_clast,
2383 print_generated_program, debug_generated_program,
2384 gloog): Moved to graphite-clast-to-gimple.c.
2385
2386 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2387
2388 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2389 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2390 loop_iv_stack_pop, loop_iv_stack_get_iv,
2391 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2392 free_loop_iv_stack, loop_iv_stack_remove_constants,
2393 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2394 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2395 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2396 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2397 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2398 get_vdef_before_sese, sese_adjust_vphi,
2399 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2400 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2401 is_iv, expand_scalar_variables_ssa_name,
2402 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2403 expand_scalar_variables, rename_variables, remove_condition,
2404 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2405 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2406 default_liveout_before_guard, add_guard_exit_phis,
2407 insert_guard_phis, register_old_and_new_names,
2408 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2409 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2410 if_region_set_false_region, create_if_region_on_edge,
2411 move_sese_in_condition): Moved to sese.c.
2412
2413 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2414 if_region_exit, if_region_get_condition_block,
2415 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2416 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2417 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2418 ivtype_map_elt, new_ivtype_map_elt,
2419 recompute_all_dominators): Moved to sese.h.
2420
2421 * graphite-clast-to-gimple.c: New.
2422 * graphite-clast-to-gimple.h: New.
2423 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2424 * sese.c: Modified as said above.
2425 * sese.h: Same.
2426
24272009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2428
2429 * graphite.c: Split scop detection to a new file.
2430 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2431 move_sd_regions, loop_affine_expr, exclude_component_ref,
2432 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2433 graphite_cannot_represent_loop_niter, struct scopdet_info,
2434 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2435 find_single_entry_edge, find_single_exit_edge,
2436 create_single_entry_edge, sd_region_without_exit,
2437 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2438 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2439 Moved to graphite-scop-detection.c.
2440
2441 * graphite-scop-detection.c: New.
2442 * graphite-scop-detection.h: New.
2443 * Makefile.in: Add new rule for graphite-scop-detection.o.
2444
2445 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2446 tree-scalar-evolution.h.
2447 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2448 build_sese_loop_nests): Moved here from graphite.c.
2449 (param_index): Renamed parameter_index_in_region.
2450
24512009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2452 Sebastian Pop <sebastian.pop@amd.com>
2453
2454 * gcc.dg/graphite/block-0.c: Expected to fail now.
2455 * gcc.dg/graphite/block-1.c: Same.
2456 * gcc.dg/graphite/block-5.c: Same.
2457 * gcc.dg/graphite/block-6.c: Same.
2458
24592009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2460 Sebastian Pop <sebastian.pop@amd.com>
2461
2462 * graphite.h: Separate from graphite_bb_p the polyhedral
2463 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2464 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2465 graphite-data-ref.h.
2466 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2467 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2468 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2469 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2470 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2471 scop_nb_params): Moved to graphite-poly.h.
2472 * graphite-data-ref.c: Same.
2473 * graphite-data-ref.h: New.
2474 * graphite.c: Same.
2475 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2476 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2477 is_interchange_valid, graphite_trans_bb_block,
2478 graphite_trans_loop_block, scop_max_loop_depth,
2479 graphite_trans_scop_block, graphite_apply_transformations,
2480 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2481 graphite-poly.c.
2482 * graphite-poly.h: New.
2483 * graphite-poly.c: New.
2484 * Makefile.in (OBJS-common): Add graphite-poly.o.
2485 (graphite-poly.o): New rule.
2486 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2487 (DR_SCOP): Removed.
2488
24892009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2490 Tobias Grosser <grosser@fim.uni-passau.de>
2491
2492 * graphite.c: Replace gb -> gbb.
2493 * graphite.h: Same.
2494 * graphite-data-ref.c: Same.
2495
24962009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2497 Tobias Grosser <grosser@fim.uni-passau.de>
2498
2499 * Makefile.in (OBJS-commmon): Add sese.o.
2500 (sese.o): New.
2501 (graphite.o): Add sese.h.
2502 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2503 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2504 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2505 Move to sese.
2506 (block_before_scop): Add missing return.
2507 (new_scop, free_scop): Remove SESE data structures.
2508 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2509 find_scop_parameters, build_loop_iteration_domains,
2510 add_conditions_to_domain, register_scop_liveout_renames,
2511 copy_bb_and_scalar_dependences): Scop -> SESE.
2512
2513 (add_conditions_to_domain): SCoP -> SESE and remove check
2514 (scop_contains_non_iv_scalar_phi_nodes): New.
2515 (build_scop_conditions_1, build_scop_conditions): Remove check for
2516 non iv scalar phi nodes.
2517 (print_scop_statistics): New.
2518 (graphite_transform_loops): Cleanup.
2519
2520 * graphite.h: Move to sese & cleanup.
2521 * sese.c: New.
2522 * sese.h: New.
2523
25242009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2525 Tobias Grosser <grosser@fim.uni-passau.de>
2526
2527 * graphite.c (build_scop_conditions_1): Conditions are only
2528 at the end of a basic block.
2529
25302009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2531 Tobias Grosser <grosser@fim.uni-passau>
2532
2533 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2534 field.
2535 (GBB_ALPHA): Removed.
2536
25372009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2538 Tobias Grosser <grosser@fim.uni-passau.de>
2539
2540 * graphite-data-ref.c (graphite_test_dependence): Don't use
2541 GBB_DYNAMIC_SCHEDULE.
2542 * graphite.c (new_graphite_bb): Same.
2543 (free_graphite_bb): Same.
2544 (build_scop_dynamic_schedules): Removed.
2545 (graphite_transform_loops): Don't call it.
2546 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2547 (GBB_DYNAMIC_SCHEDULE): Removed.
2548
25492009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2550 Tobias Grosser <grosser@fim.uni-passau.de>
2551
2552 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2553 (print_graphite_bb): Same.
2554 (build_cloog_prog): Same.
2555
25562009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2557 Tobias Grosser <grosser@fim.uni-passau.de>
2558
2559 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2560
25612009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2562 Tobias Grosser <grosser@fim.uni-passau.de>
2563
2564 * graphite.c (build_scop_context): Don't use CloogMatrix.
2565 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2566 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2567
25682009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2569 Tobias Grosser <grosser@fim.uni-passau.de>
2570
2571 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2572 liveout_renames, add_params fields...
2573 (struct sese): ... here.
2574 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2575 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2576
25772009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2578 Tobias Grosser <grosser@fim.uni-passau.de>
2579
2580 * graphite.c (print_scop): Do not print the CLooG program.
2581 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2582 build_cloog_prog, gloog): Don't use SCOP_PROG.
2583 (find_transform): Renamed scop_to_clast.
2584 (print_generated_program, debug_generated_program): New.
2585 (graphite_transform_loops): Adapt to new interface.
2586 * graphite.h (struct scop): Remove program field.
2587 (SCOP_PROG): Removed.
2588 (print_generated_program, debug_generated_program): Declared.
2589
25902009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2591
2592 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2593 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2594 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2595 free_graphite_bb, build_scop_canonical_schedules,
2596 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2597 schedules are now represented using a ppl_Linear_Expression_t.
2598 * graphite.h (struct graphite_bb): Same.
2599 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2600 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2601
26022009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2603
2604 * graphite.c: Free local memory.
2605 * graphite-ppl.c: Same.
2606
26072009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2608
2609 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2610 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2611 swap_constraint_variables, scale_constraint_variable): Removed.
2612 (graphite_trans_bb_strip_mine): Remove pong.
2613 * graphite-ppl.c: Include missing header files.
2614 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2615 * graphite-ppl.h (ppl_strip_loop): Declared.
2616 * Makefile.in (graphite-ppl.o): Adjust dependences.
2617
26182009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2619
2620 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2621 (build_scop_iteration_domain): Same.
2622
26232009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2624
2625 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2626 ping pong.
2627 (add_value_to_dim, scan_tree_for_params_right_scev,
2628 scan_tree_for_params_int): New.
2629 * graphite-ppl.c (oppose_constraint): New.
2630 (insert_constraint_into_matrix): Implement missing cases.
2631 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2632
26332009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2634
2635 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2636 use ppl_move_dimension.
2637
26382009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2639
2640 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2641 * graphite.c: Same.
2642 * graphite.h: Same.
2643 * graphite-ppl.c: Same.
2644 * graphite-ppl.h: Same.
2645
26462009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2647
2648 Revert last 3 commits.
2649
26502009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2651
2652 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2653 ping pong.
2654 (add_value_to_dim, scan_tree_for_params_right_scev,
2655 scan_tree_for_params_int): New.
2656 * graphite-ppl.c (oppose_constraint): New.
2657 (insert_constraint_into_matrix): Implement missing cases.
2658 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2659
26602009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2661
2662 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2663
26642009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2665 Tobias Grosser <grosser@fim.uni-passau.de>
2666
2667 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2668 use ppl_move_dimension.
2669 * graphite-ppl.c (ppl_move_dimension): New.
2670 * graphite-ppl.h (ppl_move_dimension): Declared.
2671
26722009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2673
2674 * graphite.c: Do not include cloog/cloog.h.
2675 (print_graphite_bb): Remove ping pong, call PPL print function.
2676
26772009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2678
2679 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2680 (graphite.o): Add dependence on graphite-ppl.h.
2681 (graphite-ppl.o): New.
2682 (graphite-data-ref.c): Ping pong between PPL data structures
2683 and matrices.
2684 * graphite-ppl.c: New.
2685 * graphite-ppl.h: New.
2686 * graphite.c: Include graphite-ppl.h.
2687 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2688 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2689 Ping pong between PPL data structures and matrices.
2690 (new_graphite_bb): Create a PPL constraint system.
2691 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2692 (build_loop_iteration_domains): Use PPL functions.
2693 * graphite.h: Include graphite-ppl.h. Fix comments.
2694 (graphite_bb): Use a ppl_Constraint_System_t instead of
2695 CloogMatrix for representing the domain.
2696 (scop): Remove static_schedule.
2697 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2698
26992009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2700
2701 * graphite.c: Fix some comments.
2702
27032009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2704
2705 PR middle-end/38953
2706 * graphite.c (if_region_set_false_region): After moving a region
2707 in the false branch of a condition, remove the empty dummy
2708 basic block.
2709 (gloog): Remove wrong fix for PR38953.
2710
27112009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2712
2713 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2714 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2715 register_bb_in_sese, new_sese, free_sese): Moved.
2716 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2717 outermost_loop_in_scop, build_scop_iteration_domain,
2718 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2719 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2720 Use loop_in_sese_p instead of loop_in_scop_p.
2721 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2722 (free_scop): Do not free SCOP_BBS_B.
2723 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2724 ref_nb_loops): Moved here...
2725 * graphite.h (ref_nb_loops): ... from here.
2726 (struct scop): Remove bbs_b bitmap.
2727 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2728 * testsuite/gcc.dg/graphite/scop-19.c: New
2729
27302009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2731
2732 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2733 detection.
2734
27352009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2736
2737 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2738 eq_loop_to_cloog_loop): Remove.
2739 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2740 * graphite.h (struct scop): Remove loop2cloog_loop.
2741 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2742
27432009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2744
2745 * opts.c (decode_options): Only add graphite options to O2
2746 if we compile with graphite enabled.
2747
27482009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2749
2750 * Merge from mainline (r143163:143684).
2751
27522009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2753
2754 * graphite.c (debug_value): Removed.
2755 * graphite.h (debug_value): Removed.
2756
27572009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2758
2759 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2760 after graphite: pass_copy_prop does not maintain a proper loop closed
2761 SSA form. pass_copy_prop should be fixed.
2762
27632009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2764
2765 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2766
27672009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2768
2769 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2770 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2771 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2772 changed the CFG.
2773
27742009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2775
2776 * graphite.c (gloog): Return true when code gen succeeded.
2777 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2778 the code of the function did not changed. After cleanup_tree_cfg
2779 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2780 form.
2781
27822009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2783
2784 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2785 gimple_call_lhs is NULL.
2786
27872009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2788 Tobias Grosser <tobi.grosser@amd.com>
2789
2790 * graphite.c (graphite_trans_scop_block): Do not block single
2791 nested loops.
2792
27932009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2794 Tobias Grosser <tobi.grosser@amd.com>
2795
2796 * graphite.c (build_scop_canonical_schedules): Start schedules at
2797 zero.
2798
27992009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2800 Tobias Grosser <tobi.grosser@amd.com>
2801
2802 * graphite.c (compare_prefix_loops): New.
2803 (build_scop_canonical_schedules): Rewritten.
2804 (graphite_transform_loops): Move build_scop_canonical_schedules
2805 after build_scop_iteration_domain.
2806
28072009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2808 Tobias Grosser <tobi.grosser@amd.com>
2809
2810 * graphite.c (add_conditions_to_domain): Add the loops to
2811 the dimension of the iteration domain. Do copy the domain
2812 only when it exists.
2813 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2814 (add_conditions_to_constraints): New.
2815 (can_generate_code_stmt, can_generate_code): Removed.
2816 (gloog): Do not call can_generate_code.
2817 (graphite_transform_loops): Call add_conditions_to_constraints
2818 after building the iteration domain.
2819
28202009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2821 Tobias Grosser <tobi.grosser@amd.com>
2822 Jan Sjodin <jan.sjodin@amd.com>
2823
2824 * graphite.c (scan_tree_for_params): On substractions negate
2825 all the coefficients of the term.
2826 (clast_to_gcc_expression_red): New. Handle reduction expressions
2827 of more than two operands.
2828 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2829 (get_vdef_before_scop): Handle also the case of default definitions.
2830
28312009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2832
2833 PR middle-end/38431
2834 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2835 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2836 (gloog): Do not call cleanup_tree_cfg.
2837 (graphite_transform_loops): Call cleanup_tree_cfg after all
2838 scops have been code generated.
2839
28402009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2841
2842 * passes.c (init_optimization_passes): Schedule after
2843 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2844
28452009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2846
2847 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2848 Fix comment.
2849 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2850 Set the type of an expression to the type of its assign statement.
2851 (expand_scalar_variables_expr): Do not pass loop_p.
2852 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2853 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2854 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2855
28562009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2857
2858 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2859 an expression to the gimple_expr_type of its assign statement.
2860 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2861 or tcc_declaration.
2862
28632009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2864
2865 PR tree-optimization/38786
2866 * testsuite/gcc.dg/graphite/pr38786.c: New.
2867 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2868 the SSA_NAME case of expand_scalar_variables_expr.
2869 (expand_scalar_variables_expr): Also gather the scalar computation
2870 used to index the memory access.
2871 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2872 the gimple_stmt_iterator where it inserts new code.
2873
28742009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2875
2876 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2877
28782009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2879
2880 * opts.c (decode_options): Enable flag_graphite_identity and
2881 flag_loop_block in -O2 and above.
2882
28832009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2884
2885 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2886 Fix merge problem: replace with the file from trunk.
2887
28882009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2889
2890 * Merge from mainline (r141727:143163).
2891
28922009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2893 Jan Sjodin <jan.sjodin@amd.com>
2894
2895 PR tree-optimization/38559
2896 * testsuite/gcc.dg/graphite/pr38559.c: New.
2897
2898 * graphite.c (debug_value, copy_constraint,
2899 swap_constraint_variables, scale_constraint_variable, ): New.
2900 (get_lower_bound, get_upper_bound): Removed.
2901 (graphite_trans_bb_strip_mine): Clean up this code that works
2902 only for constant number of iterations. Fully copy upper and
2903 lower bound constraints, not only the constant part of them.
2904 * graphite.h (debug_value): Declared.
2905
29062009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2907
2908 PR tree-optimization/38492
2909 PR tree-optimization/38498
2910 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2911 * tree-chrec.h (scev_is_linear_expression): Declared.
2912 * graphite.c (graphite_cannot_represent_loop_niter): New.
2913 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2914 (graphite_loop_normal_form): Use gcc_assert.
2915 (scan_tree_for_params): Use CASE_CONVERT.
2916 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2917 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2918 Use gcc_assert. Discard scops that contain unhandled cases.
2919 (build_scop_conditions): Return a boolean status for unhandled cases.
2920 (strip_mine_profitable_p): Print the loop number, not its depth.
2921 (is_interchange_valid): Pass the depth of the loop nest, don't
2922 recompute it wrongly.
2923 (graphite_trans_bb_block): Same.
2924 (graphite_trans_bb_block): Print tentative of loop blocking.
2925 (graphite_trans_scop_block): Do not print that the loop has been
2926 blocked.
2927 (graphite_transform_loops): Do not handle scops that contain condition
2928 scalar phi nodes.
2929
2930 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2931 in trunk.
2932 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2933 * testsuite/gcc.dg/graphite/block-1.c: Same.
2934 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2935 blocking.
2936 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2937 * testsuite/gcc.dg/graphite/block-3.c: New.
2938 * testsuite/gcc.dg/graphite/pr38498.c: New.
2939
29402008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2941
2942 PR tree-optimization/38510
2943 * gcc.dg/graphite/pr38510.c: New.
2944 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2945 (translate_clast): Call recompute_all_dominators before
2946 graphite_verify.
2947 (gloog): Call recompute_all_dominators before graphite_verify.
2948
29492008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2950
2951 PR tree-optimization/38492
2952 * graphite.c (rename_map_elt, debug_rename_elt,
2953 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2954 rename_map_elt_info, eq_rename_map_elts,
2955 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2956 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2957 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2958 (sese_build_livein_liveouts): New.
2959 (new_sese, free_sese): New.
2960 (new_scop): Call new_sese.
2961 (free_scop): Call free_sese.
2962 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2963 (register_old_new_names): Renamed register_old_and_new_names.
2964 (register_scop_liveout_renames, add_loop_exit_phis,
2965 insert_loop_close_phis, struct igp,
2966 default_liveout_before_guard, add_guard_exit_phis,
2967 insert_guard_phis, copy_renames): New.
2968 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2969 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2970 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2971 (scop_adjust_phis_for_liveouts): New.
2972 (gloog): Call scop_adjust_phis_for_liveouts.
2973
2974 * graphite.h (struct sese): Documented. Added fields liveout,
2975 num_ver and livein.
2976 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2977 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2978 (struct scop): Added field liveout_renames.
2979 (SCOP_LIVEOUT_RENAMES): New.
2980
29812008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2982
2983 PR tree-optimization/38409
2984 * gcc.dg/graphite/pr38409.c: New.
2985 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2986
29872008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2988
2989 * graphite.c (gcc_type_for_cloog_iv): By default return
2990 integer_type_node.
2991 (graphite_create_new_loop): Don't fold_convert the already
2992 fold_convert-ed expression.
2993
29942008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
2995
2996 PR tree-optimization/38446
2997 * gcc.dg/graphite/pr38446.c: New.
2998 * graphite.c (register_bb_in_sese): New.
2999 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3000 looking at the bbs in the region.
3001 * graphite.h (sese): Add region_basic_blocks pointer set to
3002 structure and initialize at the time of defining new scop.
3003
30042008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3005
3006 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3007 (find_params_in_bb): Do not free data refs.
3008 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3009
30102008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3011
3012 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3013 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3014 * testsuite/gcc.dg/graphite/block-5.c: New.
3015 * testsuite/gcc.dg/graphite/block-6.c: New.
3016 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3017 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3018 * testsuite/gcc.dg/graphite/block-2.c: Same.
3019
3020 * graphite.c (struct ivtype_map_elt): New.
3021 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3022 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3023 gcc_type_for_cloog_iv): New.
3024 (loop_iv_stack_patch_for_consts): Use the type of the induction
3025 variable from the original loop, except for the automatically
3026 generated loops, i.e., in the case of a strip-mined loop, in
3027 which case there is no original loop: in that case just use
3028 integer_type_node.
3029 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3030 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3031 (clast_name_to_gcc): Accept params to be NULL.
3032 (clast_to_gcc_expression): Take an extra parameter for the type.
3033 Convert to that type all the expressions built by this function.
3034 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3035 (graphite_translate_clast_equation): Compute the type of the
3036 clast_equation before translating its LHS and RHS.
3037 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3038 (graphite_create_new_loop): Compute the type of the induction
3039 variable before translating the lower and upper bounds and before
3040 creating the induction variable.
3041 (rename_variables_from_edge, rename_phis_end_scop): New.
3042 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3043 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3044 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3045 compute_cloog_iv_types): New.
3046 (gloog): Call compute_cloog_iv_types before starting the
3047 translation of the clast.
3048
3049 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3050 (GBB_CLOOG_IV_TYPES): New.
3051 (debug_ivtype_map): Declared.
3052 (oldiv_for_loop): New.
3053
30542008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3055
3056 PR middle-end/38459
3057 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3058 (param_index): Assert if parameter is not know after parameter
3059 detection.
3060 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3061 (find_scop_parameters): Mark, that we have finished parameter
3062 detection.
3063 (graphite_transform_loops): Move condition detection before parameter
3064 detection.
3065 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3066 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3067
30682008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3069
3070 * graphite.c (graphite_transform_loops): Always call find_transform ()
3071 in ENABLE_CHECKING. So we test these code paths, even if we do not
3072 generate code.
3073
30742008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3075
3076 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3077 (print_scop): Ditto.
3078
30792008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3080
3081 PR middle-end/38084
3082 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3083 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3084 regions more than once.
3085
30862008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3087
3088 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3089 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3090 when not needed.
3091
30922008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3093
3094 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3095 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3096 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3097 (max_precision_type): New.
3098 (value_clast): Removed.
3099 (clast_to_gcc_expression): Be more careful to types of expressions.
3100 Use max_precision_type and update use of gmp_cst_to_tree.
3101 (graphite_translate_clast_equation): Use max_precision_type.
3102 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3103 use the type of the condition.
3104 (graphite_create_new_loop): Do not use integer_type_node, use the
3105 max_precision_type of lb and ub.
3106
31072008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3108
3109 * graphite.c (build_scops_1): Initialize open_scop.exit
3110 and sinfo.last.
3111
31122008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3113
3114 * testsuite/gcc.dg/graphite/pr38084.c: New.
3115 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3116 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3117 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3118 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3119 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3120
31212008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3122 Jan Sjodin <jan.sjodin@amd.com>
3123 Harsha Jagasia <harsha.jagasia@amd.com>
3124
3125 PR middle-end/37852
3126 PR middle-end/37883
3127 PR middle-end/37928
3128 PR middle-end/37980
3129 PR middle-end/38038
3130 PR middle-end/38039
3131 PR middle-end/38073
3132 PR middle-end/38083
3133 PR middle-end/38125
3134
3135 * testsuite/gcc.dg/graphite/pr38073.c: New.
3136 * testsuite/gcc.dg/graphite/pr37928.c: New.
3137 * testsuite/gcc.dg/graphite/pr37883.c: New.
3138 * testsuite/gcc.dg/graphite/pr38125.c: New.
3139 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3140 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3141 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3142
3143 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3144 the number of detected scops. Copy exact same test for loop
3145 blocking...
3146 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3147 loops to be blocked as reductions are not handled.
3148 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3149
3150 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3151 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3152 ...here.
3153 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3154 * Makefile.in (graphite.o): Depend on value-prof.h.
3155 (graphite.o-warn): Removed -Wno-error.
3156 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3157 to be a NULL pointer. Call update_stmt. Return the newly created
3158 cannonical induction variable.
3159
3160 * graphite.h (debug_rename_map): Declared. Fix some comments.
3161
3162 * graphite.c: Reimplement the code generation from graphite to gimple.
3163 Include value-prof.h.
3164 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3165 (get_old_iv_from_ssa_name): Removed.
3166 (graphite_stmt_p): New.
3167 (new_graphite_bb): Test for useful statements before building a
3168 graphite statement for the basic block.
3169 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3170 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3171 reason.
3172 (recompute_all_dominators, graphite_verify,
3173 nb_reductions_in_loop, graphite_loop_normal_form): New.
3174 (scop_record_loop): Call graphite_loop_normal_form.
3175 (build_scop_loop_nests): Iterate over all the blocks of the
3176 function instead of relying on the incomplete information from
3177 SCOP_BBS. Return the success of the operation.
3178 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3179 (add_bb_domains): Removed.
3180 (build_loop_iteration_domains): Don't call add_bb_domains.
3181 Add the iteration domain only to the basic blocks that have been
3182 translated to graphite.
3183 (build_scop_conditions_1): Add constraints only if the basic
3184 block have been translated to graphite.
3185 (build_scop_data_accesses): Completely disabled until data
3186 dependence is correctly implemented.
3187 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3188 (remove_all_edges_1, remove_all_edges): Removed.
3189 (get_new_name_from_old_name): New.
3190 (graphite_rename_variables_in_stmt): Renamed
3191 rename_variables_in_stmt. Call get_new_name_from_old_name.
3192 Use replace_exp and update_stmt.
3193 (is_old_iv): Renamed is_iv.
3194 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3195 Use replace_exp and update_stmt.
3196 (expand_scalar_variables_expr): Same. Use the map to get the
3197 new names for the renaming of induction variables and for the
3198 renaming of variables after a basic block has been copied.
3199 (expand_scalar_variables): Same.
3200 (graphite_rename_variables): Renamed rename_variables.
3201 (move_phi_nodes): Removed.
3202 (get_false_edge_from_guard_bb): New.
3203 (build_iv_mapping): Do not insert the induction variable of a
3204 loop in the renaming iv map if the basic block does not belong
3205 to that loop.
3206 (register_old_new_names, graphite_copy_stmts_from_block,
3207 copy_bb_and_scalar_dependences): New.
3208 (translate_clast): Heavily reimplemented: copy basic blocks,
3209 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3210 At each translation step call graphite_verify ensuring the
3211 consistency of the SSA, loops and dominators information.
3212 (collect_virtual_phis, find_vdef_for_var_in_bb,
3213 find_vdef_for_var_1, find_vdef_for_var,
3214 patch_phis_for_virtual_defs): Removed huge hack.
3215 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3216 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3217 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3218 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3219 if_region_get_condition_block, if_region_set_false_region,
3220 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3221 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3222 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3223 rewrite_into_sese_closed_ssa): New.
3224 (gloog): Remove dead code. Early return if code cannot be
3225 generated. Call cleanup_tree_cfg once the scop has been code
3226 generated.
3227 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3228 block loops with less than two loops.
3229 (graphite_apply_transformations): Remove the call to
3230 scop_remove_ignoreable_gbbs.
3231 (limit_scops): When build_scop_loop_nests fails, continue on
3232 the next scop. Fix open_scop.entry.
3233 (graphite_transform_loops): Call recompute_all_dominators: force the
3234 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3235 Call initialize_original_copy_tables and free_original_copy_tables
3236 to be able to copy basic blocks during code generation.
3237 When build_scop_loop_nests fails, continue on next scop.
3238 (value_clast): New union.
3239 (clast_to_gcc_expression): Fix type cast warning.
3240
32412008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3242
3243 * Merge from mainline (r140838:141727).
3244
32452008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3246
3247 PR middle-end/37833
3248
3249 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3250
32512008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3252
3253 PR middle-end/37943
3254
3255 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3256 exits and conditions.
3257 * testsuite/gcc.dg/graphite/pr37943.c: New.
3258
32592008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3260
3261 PR middle-end/37886
3262 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3263
32642008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3265
3266 * doc/invoke.texi: Fix spaces.
3267
32682008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3269
3270 PR tree-optimization/37891
3271 Reverted last commit.
3272 * graphite.c (create_single_entry_edge): Set
3273 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3274
32752008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3276 Mitul Thakkar <mitul.thakkar@amd.com>
3277
3278 * graphite.c (create_single_entry_edge): Set
3279 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3280
32812008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3282
3283 * doc/invoke.texi: Add -fgraphite-identity.
3284 * graphite.c (graphite_apply_transformations): Check for
3285 -fgraphite-identity.
3286 * toplev.c (process_options): Add flag_graphite_identity.
3287 * tree-ssa-loop.c: Add flag_graphite_identity.
3288
32892008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3290
3291 Undo changes from 2008-10-02:
3292 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3293 operand type when copying the operand to a variable of different type.
3294 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3295 with the IV name after increment.
3296
32972008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3298 Harsha Jagasia <harsha.jagasia@amd.com>
3299
3300 PR tree-optimization/37828
3301 * testsuite/gcc.dg/graphite/pr37828.c: New.
3302 * graphite.c (graphite_trans_loop_block): Do not loop block
3303 single nested loops.
3304
33052008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3306 Sebastian Pop <sebastian.pop@amd.com>
3307
3308 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3309 rename_map_elt_info, eq_rename_map_elts): New.
3310 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3311 (expand_scalar_variables_expr): Change parameters.
3312 (expand_scalar_variables_stmt): Same.
3313 (expand_scalar_variables): Same.
3314 (graphite_rename_ivs): Rename graphite_rename_variables.
3315 (build_iv_mapping): New.
3316 (translate_clast): Call build_iv_mapping.
3317 * graphite.h (gbb_p): New name.
3318
33192008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3320
3321 PR tree-optimization/37684
3322 * gcc.dg/graphite/pr37684.c: New.
3323 * graphite.c (exclude_component_ref): New.
3324 (is_simple_operand): Call exclude_component_ref.
3325
33262008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3327 Harsha Jagasia <harsha.jagasia@amd.com>
3328
3329 PR tree-optimization/37485
3330 * gcc.dg/graphite/block-2.c: New
3331 * graphite.c (gmp_cst_to_tree): Moved.
3332 (iv_stack_entry_is_constant): New.
3333 (iv_stack_entry_is_iv): New.
3334 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3335 (loop_iv_stack_insert_constant): New.
3336 (loop_iv_stack_pop): Use new datatpype.
3337 (loop_iv_stack_get_iv): Same.
3338 (loop_iv_stack_get_iv_from_name): Same.
3339 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3340 (loop_iv_stack_patch_for_consts): New.
3341 (loop_iv_stack_remove_constants): New.
3342 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3343 (translate_clast): Call loop_iv_stack_patch_for_consts and
3344 loop_iv_stack_remove_constants.
3345 (gloog): Use new datatype. Redirect construction edge to end
3346 block to avoid accidental deletion.
3347 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3348 iv stack entry.
3349 (union iv_stack_entry_data): New. Data in iv stack entry.
3350 (struct iv_stack_entry): New. Datatype for iv stack entries.
3351
33522008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3353
3354 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3355 operand type when copying the operand to a variable of different type.
3356
33572008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3358
3359 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3360 with the IV name after increment.
3361
33622008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3363
3364 * Merge from mainline (r140164:140838).
3365
33662008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3367
3368 * graphite-data-ref.c: New.
3369 * graphite.c (print_scop): Also dump the dependence graph.
3370 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3371 (new_scop): Initialize SCOP_DEP_GRAPH.
3372 (build_scop_dynamic_schedules): New.
3373 (build_access_matrix_with_af): Fixed column numbering.
3374 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3375 * graphite.h: Add ifndef/define guards against multiple inclusion.
3376 (struct scop): Add dep_graph field.
3377 (SCOP_DEP_GRAPH): Defined.
3378 (ref_nb_loops): Fixed and moved to other position.
3379 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3380 (nb_loops_around_loop_in_scop): New.
3381 (graphite_dump_dependence_graph): Declared.
3382 (graphite_build_rdg_all_levels): Declared.
3383 (graphite_test_dependence): Declared.
3384 * Makefile.in (graphite-data-ref.o): New target.
3385
33862008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3387
3388 * Merge from mainline (139870:140164).
3389
33902008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3391
3392 * Merge from mainline (138275:139870).
3393 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3394 the commits from trunk broke the niter detection.
3395
33962008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3397
3398 * graphite.c: Add more documentation. Fix formatting.
3399 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3400 loop_iv_stack_debug): Moved...
3401 (schedule_to_scattering): Move before use.
3402 (dot_all_scops): Include in "#if 0" the code for system
3403 call dotty.
3404
3405 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3406 loop_iv_stack_debug): ...here.
3407
34082008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3409
3410 * tree-phinodes.c (make_phi_node): Extern.
3411 (add_phi_node_to_bb): New.
3412 (create_phi_node): Call add_phi_node_to_bb.
3413 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3414 (remove_statement): Handle case where stored phi was updated
3415 and is no longer the same.
3416 * graphite.c (is_parameter): New.
3417 (is_old_iv): New.
3418 (expand_scalar_variables_expr): New.
3419 (expand_scalar_variables_stmt): New.
3420 (expand_scalar_variables): New.
3421 (move_phi_nodes): Create new phi instead of moving old one.
3422 (translate_clast): Call expand_scalar_variables.
3423 (find_vdef_for_var_in_bb): Also scan regular definitions.
3424 (skip_phi_defs): New.
3425 (collect_scop_exit_phi_args): New.
3426 (patch_scop_exit_phi_args): New.
3427 (gloog): Patch phis after scop.
3428 * tree-flow.h: (add_phi_node_to_bb): Declared.
3429 (make_phi_node): Declared.
3430
34312008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3432
3433 * graphite.c (end_scop): Split the entry of the scop when it
3434 is the header of the loop in which the scop is ending.
3435 (build_scops_1, limit_scops): Update uses of end_scop.
3436
34372008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3438
3439 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3440 SCOP_ENTRY or SCOP_EXIT.
3441
34422008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3443
3444 * graphite.c (get_construction_edge): Removed.
3445 (gloog): Construction edge is the scop entry edge.
3446
34472008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3448
3449 * graphite.c (can_generate_for_scop): Removed.
3450 (gloog): Do not call it.
3451
34522008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3453
3454 * graphite.c (new_scop): Entry of a scop is an edge.
3455 Initialize SESE region.
3456 (free_scop): Free SESE region.
3457 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3458 (split_difficult_bb): New, split from end_scop.
3459 (end_scop): Exit of a scop is an edge.
3460 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3461 not automatically updated and thus is always wrong.
3462 * graphite.h (struct sese): New.
3463 (SESE_ENTRY): New.
3464 (SESE_EXIT): New.
3465 (struct scop): New field for a SESE region. Remove entry, exit.
3466 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3467 semantics as before. Moved comment around.
3468
34692008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3470 Sebastian Pop <sebastian.pop@amd.com>
3471
3472 * graphite.c (graphite_transform_loops): Always enable gloog
3473 and find_transform when ENABLE_CHECKING.
3474
34752008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3476
3477 * graphite.c (graphite_transform_loops): Move pretty printer
3478 of SCOPs before doing any transform. Remove call to print_scops
3479 and dot_all_scops_1.
3480
34812008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3482
3483 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3484 (print_graphite_bb): Same.
3485
34862008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3487
3488 * graphite.c (dot_all_scops_1): Cleanup.
3489 (move_scops): Fix comment.
3490
34912008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3492
3493 * graphite.c (build_scop_bbs): Revert commit 139355:
3494
3495 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3496 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3497
3498 * graphite.c (build_scop_bbs): Factor up code.
3499
35002008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3501
3502 * graphite.c (gloog): Update dominator info.
3503
35042008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3505
3506 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3507
35082008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3509
3510 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3511 initialization.
3512 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3513 (translate_clast): Correct formatting.
3514 * graphite.h (struct num_map): Removed.
3515 (struct graphite_bb): Remove num_map field.
3516 (GBB_INDEX_TO_NUM_MAP): Removed.
3517
35182008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3519
3520 * graphite.c (build_access_matrix_with_af): Fix comments.
3521 (build_scop_data_accesses): Same.
3522
35232008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3524
3525 * graphite.c (build_scop_data_accesses): Don't construct
3526 access matrices. Add a FIXME and an assert condition that
3527 should pass when the access matrices will be needed.
3528
35292008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3530
3531 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3532 really_constant_p.
3533 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3534 Moved close by free_graphite_bb.
3535 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3536 (new_scop): Move close by free_scop.
3537 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3538
35392008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3540
3541 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3542 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3543 instead of recursive call.
3544 (graphite_translate_clast_equation): New.
3545 (graphite_create_guard_cond_expr): New.
3546 (graphite_create_new_guard): New.
3547 (get_stack_index_from_iv): Removed.
3548 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3549 (get_true_edge_from_guard_bb): New.
3550 (translate_clast): Handle stmt_guard in clast.
3551 (get_construction_edge): Allow construction edge detection for
3552 a scope entry with multiple predecessors if one predecessor is
3553 the immediate dominator of scope entry.
3554 (can_generate_code_stmt): Enable code generation for clast_guard.
3555 (gloog): Use correct context loop. Removed check for post dominators.
3556 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3557
35582008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3559
3560 * graphite.c (remove_dead_loops): Document better which
3561 loops are removed.
3562
35632008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3564
3565 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3566 and PPLINC.
3567 (graphite.o): Also depends on pointer-set.h.
3568
35692008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3570
3571 * graphite.c (scop_record_loop): Fix compile warning.
3572
35732008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3574 Sebastian Pop <sebastian.pop@amd.com>
3575
3576 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3577
35782008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3579
3580 * graphite.c (build_graphite_bb): Initialize bb->aux to
3581 point to the graphite_bb_p.
3582 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3583 content of bb->aux.
3584 (add_bb_domains): Does not use the scop parameter.
3585 (graphite_transform_loops): Clean bb->aux at the end.
3586
35872008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3588 Sebastian Pop <sebastian.pop@amd.com>
3589
3590 * testsuite/lib/target-supports.exp
3591 (check_effective_target_fgraphite): New.
3592
3593 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3594 check_effective_target_fgraphite returns false.
3595 Set dg-do-what-default to compile.
3596 (scan-graphite-dump-times): Removed.
3597 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3598
3599 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3600 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3601 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3602 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3603 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3604 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3605 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3606 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3607 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3608 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3609 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3610 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3611 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3612 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3613 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3614 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3615 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3616 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3617 * testsuite/gcc.dg/graphite/block-0.c: Same.
3618 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3619 * testsuite/gcc.dg/graphite/block-1.c: Same.
3620 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3621 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3622 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3623 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3624 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3625
36262008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3627
3628 * graphite.c: Fix some XXX comments.
3629 (build_scop_dynamic_schedules): Removed.
3630
36312008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3632
3633 * graphite.h (scop_max_loop_depth): Moved...
3634 * graphite.c (scop_max_loop_depth): ...here.
3635 (remove_all_edges_1): New.
3636 (remove_all_edges): Factored code.
3637 (remove_cond_exprs): Check only the last statement for
3638 a GIMPLE_COND expression.
3639
36402008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3641
3642 * graphite.c (scan_tree_for_params): Early return when the
3643 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3644 (find_scop_parameters): Factor out code.
3645 (graphite_trans_bb_strip_mine): Remove dead code.
3646
36472008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3648
3649 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3650 graphite_trans_bb_move_loop): Factor asserts.
3651 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3652 Do not call calculate_dominance_info and estimate_bb_frequencies.
3653
36542008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3655
3656 * graphite.c (create_loops_mapping, free_loops_mapping,
3657 create_loops_mapping_num, debug_loop_mapping_1,
3658 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3659 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3660 graphite_loops_mapping_add_child_num,
3661 graphite_loops_mapping_insert_child,
3662 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3663 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3664 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3665 create_num_from_index, get_num_from_index,
3666 swap_loop_mapped_depth): Removed.
3667 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3668 (free_scop): Do not call free_loops_mapping.
3669 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3670 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3671 get_loop_mapped_depth.
3672 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3673 (graphite_trans_bb_strip_mine): Same.
3674 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3675 (struct scop): Remove field loops_mapping.
3676
36772008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3678 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3679
3680 * graphite.c (scop_record_loop): Factor out one level of the
3681 condition by early return.
3682 (build_scop_loop_nests): Format following FSF coding style.
3683 (build_scop_dynamic_schedules): Factor out code.
3684 (scopdet_bb_info): Reindent. Default case should not be reachable.
3685
36862008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3687 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3688
3689 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3690 assignments that are not handled as simple operands for now.
3691
36922008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3693 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3694
3695 * graphite.c (build_scop_bbs): Factor up code.
3696
36972008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3698 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3699
3700 * graphite.c (stmt_simple_for_scop_p): Factor code out
3701 of the loop.
3702 (enum gbb_type): New. Group all the GBB_* types under it.
3703 (is_loop_exit): Moved...
3704 (end_scop): Enable BB spliting.
3705 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3706 * cfgloop.h (is_loop_exit): Declared.
3707
37082008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3709
3710 * doc/invoke.texi: Remove strides from examples containing
3711 DO loops when the strides are equal to 1.
3712
37132008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3714 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3715
3716 * graphite.c (graphite_trans_scop_block): Or the result with
3717 the result from graphite_trans_loop_block.
3718 * testsuite/gcc.dg/graphite/block-1.c: New.
3719 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3720 * testsuite/gfortran.dg/graphite/block-2.f: New.
3721
37222008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3723
3724 * graphite.c (graphite_transform_loops): Call cloog_initialize
3725 and cloog_finalize.
3726
37272008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3728
3729 * tree-data-ref.c) (stmt_simple_memref_p): New.
3730 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3731 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3732 (is_simple_operand): Call stmt_simple_memref_p.
3733
3734 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3735 using pointer arithmetic, as this is optimized by PRE and
3736 makes the code too difficult to analyze.
3737
3738 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3739
37402008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3741
3742 * gdbinit.in (pgg): New.
3743
37442008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3745
3746 * graphite.c (graphite_trans_loop_block): Fix warning.
3747
37482008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3749
3750 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3751
37522008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3753
3754 * graphite.c (graphite_trans_bb_block): Remove check for
3755 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3756 Check if loop blocking is profitable for every loop, before applying
3757 the changes.
3758 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3759 if flag_loop_block is set.
3760
37612008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3762
3763 * graphite.c: Add some more documentation for the loop
3764 mapping.
3765
37662008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3767
3768 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3769 * graphite.c: Format on less than 80 columns.
3770 * graphite.h: Same.
3771
37722008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3773
3774 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3775
37762008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3777
3778 * doc/invoke.texi (floop-block, floop-strip-mine,
3779 floop-interchange): Update documentation with examples.
3780
37812008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3782
3783 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3784 add_referenced_var.
3785 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3786
37872008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3788
3789 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3790 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3791 * tree-scalar-evolution.c: Revert useless changes.
3792 * tree-phinodes.c: Same.
3793 * cfghooks.c: Same.
3794 * vec.h: Same.
3795 * tree-vectorizer.h: Same.
3796 * tree-flow.h: Same.
3797 * tree-cfg.c: Same.
3798 * common.opt (fgraphite): Update documentation.
3799
38002008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3801
3802 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3803 -floop-interchange): Add more text for explaining what each of these
3804 flags is doing.
3805 * tree-into-ssa.c (gimple_vec): Moved to...
3806 * graphite.c: Include gimple.h.
3807 (gimple_vec): Moved to...
3808 (del_loop_to_cloog_loop): Removed.
3809 (loop_affine_expr): Do not call create_data_ref when the
3810 operand is a constant.
3811 (new_scop): Use free instead of del_loop_to_cloog_loop.
3812 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3813 * gimple.h (gimple_vec): ... here.
3814
38152008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3816
3817 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3818 latch executions.
3819 (build_loop_iteration_domains): Fail, if latch executions unknown.
3820
38212008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3822
3823 * graphite.c (add_conditions_to_domain): New.
3824 (build_scop_conditions_1): Call add_conditions_to_domain.
3825 (set_cloog_options): Allow to disable optimizations.
3826
38272008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3828
3829 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3830 Do not use walk_dominator_tree.
3831 (find_scop_parameters): Do not use walk_dominator_tree.
3832
38332008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3834
3835 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3836 (idx_record_params): Adapt.
3837 * graphite.h (scop_gimple_loop_depth): New.
3838
38392008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3840
3841 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3842 (scan_tree_for_params): Remove value_init.
3843 (build_scop_context): Remove value_init.
3844 (build_loop_iteration_domains): Remove value_init.
3845 (schedule_to_scattering): Remove value_init.
3846 (graphite_trans_bb_strip_mine): Remove value_init.
3847
38482008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3849
3850 * gcc/graphite.c (limit_scops): New.
3851 (graphite_transform_loops): Add limit SCoPs.
3852 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3853 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3854 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3855 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3856 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3857 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3858 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3859 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3860 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3861 Change loop numbers.
3862 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3863 Change loop numbers.
3864 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3865 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3866 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3867 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3868 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3869 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3870 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3871 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3872 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3873 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3874
38752008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3876
3877 * graphite.c (graphite_transform_loops): Call always find_transform.
3878
38792008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3880
3881 * graphite.c (free_loops_mapping): New.
3882 (stmt_simple_for_scop_p): Fix typo.
3883 (stmt_simple_for_scop_p): Fix tuples functions, that
3884 broke polyhedron.
3885 (free_graphite_bb): Fix some memleaks.
3886 (free_scop): Fix some memleaks.
3887 (scopdet_bb_info): Do not forget some tmp SCoPs.
3888 (find_params_in_bb): Fix some memleaks.
3889 (clast_to_gcc_expression): Fix warning.
3890
38912008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
3892
3893 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3894 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3895
38962008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3897
3898 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3899 Move code ifdef-ed HAVE_cloog...
3900 * graphite.c: Include toplev.h.
3901 ... here.
3902 * Makefile.in (OBJS-common): Always build graphite.o.
3903 (BACKEND): Remove @GRAPHITE@.
3904 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3905 (graphite.o): Depend on TOPLEV_H.
3906
39072008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3908
3909 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3910 Remove typo left from polylib to ppl conversion.
3911 * graphite.c (graphite_transforms): Use sorry instead of fatal.
3912
39132008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3914
3915 * toplev.c (process_options): Move the graphite loop optimization
3916 flags...
3917 * tree-ssa-loop.c (graphite_transforms): ... here.
3918 When not configured with CLooG, print to dump_file that
3919 Graphite transforms were not performed.
3920 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3921 New.
3922 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3923 scan-graphite-dump-times.
3924
39252008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3926
3927 * graphite.c (dot_scop, dot_all_scops): Do not call system.
3928 Do not open /tmp/scop.dot and /tmp/allscops.dot.
3929
39302008-08-02 Sebastian Pop <sebastian.pop@amd.com>
3931 Jan Sjodin <jan.sjodin@amd.com>
3932
3933 * configure: Regenerated.
3934 * omp-low.c (expand_omp_sections): Remove now unused code.
3935 * config.in (HAVE_polylib): Removed.
3936 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3937 (PPLLIBS, PPLINC): Added.
3938 * graphite.c: Replace unsigned with int wherever possible.
3939 Don't access Cloog's data structures, but use accessor functions.
3940 Clast's stmt->type is now implemented as a vtable: change the
3941 switches of stmt->type into ifs.
3942 (polylib/polylibgmp.h): Don't include.
3943 (initialize_dependence_polyhedron,
3944 initialize_data_dependence_polyhedron, is_empty_polyhedron,
3945 statement_precedes_p, test_dependence, build_rdg_all_levels,
3946 dump_dependence_graph): Removed until this code is cleaned up
3947 or ported to Cloog.
3948 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3949 (POLYLIBINC): Renamed PPLINC.
3950
39512008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
3952 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3953 Jan Sjodin <jan.sjodin@amd.com>
3954
3955 Finish the merge and tuplification of graphite.
3956
39572008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3958 Jan Sjodin <jan.sjodin@amd.com>
3959
3960 Partial merge from mainline (138072:138275).
3961 * graphite.c still has to be tuplified.
3962
39632008-07-29 Jan Sjodin <jan.sjodin@amd.com>
3964
3965 * graphite.c (graphite_loops_mapping_max_loop_num): New.
3966 (create_num_from_index): New.
3967 (get_num_from_index): Also pass in the graphite BB.
3968 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3969 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3970 (graphite_trans_bb_strip_mine): Call create_num_from_index.
3971 (is_interchange_valid): Return false when failing.
3972 * graphite.h (struct num_map): New.
3973 (struct graphite_bb): New field num_map.
3974 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3975
39762008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
3977
3978 * graphite.c (dump_gbb_conditions): Print also conditions like
3979 "if (a)". Remove dublicated code and use print_generic_expr ().
3980 (stmt_simple_for_scop_p): Only allow conditions we can handle
3981 {<, <=, >, >=}.
3982
39832008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3984
3985 * graphite.h (struct scop): Removed new_ivs field.
3986 (SCOP_NEWIVS): Deleted.
3987 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3988 clast_to_gcc_expression, graphite_create_new_loop):
3989 Removed use of new_ivs.
3990
39912008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3992
3993 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
3994 create_loops_mapping_num, debug_loop_mapping_1): New.
3995 (debug_loop_mapping): Call debug_loop_mapping_1.
3996 (get_loop_mapping_for_num,
3997 graphite_loops_mapping_add_child,
3998 graphite_loops_mapping_add_child_num,
3999 graphite_loops_mapping_insert_child,
4000 graphite_loops_mapping_parent,
4001 split_loop_mapped_depth_for_num,
4002 loop_mapped_depth_split_loop): New.
4003 (increment_loop_mapped_depths): Removed.
4004 (swap_loop_mapped_depth_for_num): Reimplemented.
4005 (new_scop): Call create_loops_mapping.
4006 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4007 (translate_clast): Pass the old loop father in parameter, and pass
4008 it to get_old_iv_from_ssa_name.
4009 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4010 can_generate_code, can_generate_for_scop): New.
4011 (graphite_trans_bb_block): Returns false when it fails to transform.
4012 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4013
40142008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4015
4016 Reverted all the changes related to the streamization and
4017 loop fusion.
4018 These changes are now tracked in the streamization branch.
4019
40202008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4021 Jan Sjodin <jan.sjodin@amd.com>
4022
4023 * graphite.c (gbb_compare): Correctly constify.
4024 (gbb_can_be_ignored): Indent.
4025 (graphite_trans_scop_swap_1and2): Add legality check.
4026 Remove dead FIXMEs.
4027
40282008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4029
4030 Remove fallouts from "Reverted the Condate changes".
4031 * tree.h: Remove unused decl.
4032 * testsuite/gcc.dg/tree-checker: Same.
4033 * timevar.def: Remove counter.
4034
40352008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4036
4037 * Merge from mainline (135673:138072).
4038
4039 Reverted the MIRO changes (from 2008-04-05) that are now
4040 tracked in the miro branch.
4041 * tree-bounds.c: Removed.
4042 * tree-bounds.h: Removed.
4043
4044 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4045 are now tracked in the condate branch.
4046 * tree-check.c: Removed.
4047 * tree-match.c: Removed.
4048 * condate.y: Removed.
4049
40502008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4051
4052 * common.opt: New user flag -floop-block, -floop-strip-mine
4053 and -floop-interchange.
4054 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4055 graphite loop optimization flags is turned on.
4056 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4057 flag_loop_strip_mine and flag_loop_interchange checks before
4058 optimizations.
4059 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4060 -floop-strip-mine and -floop-interchange.
4061 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4062 -fgraphite.
4063 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4064 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4065 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4066
40672008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4068 Sebastian Pop <sebastian.pop@amd.com>
4069
4070 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4071 (create_empty_loop_on_edge): More fixes.
4072 * tree-phinodes.c (resize_phi_node): Extern.
4073 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4074 * cfghooks.c (update_dominator_information): New split from
4075 split_edge.
4076 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4077 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4078 successor of the function entry block.
4079
4080 * graphite.c: Include pointer-set.h.
4081 (debug_loop_mapping, increment_loop_mapped_depths,
4082 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4083 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4084 swap_loop_mapped_depth_for_num, get_num_from_index,
4085 swap_loop_mapped_depth, loop_iv_stack_debug,
4086 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4087 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4088 get_old_iv_from_ssa_name): New.
4089 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4090 (free_scop): Free SCOP_LOOPS_MAPPING.
4091 (scop_record_loop): Record old ivs.
4092 (create_var_name): Removed.
4093 (initialize_cloog_names): Allocate double space in case strip mine
4094 applies to all loops once.
4095 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4096 (clast_to_gcc_expression): Same. Implement more clast to gimple
4097 translation.
4098 (graphite_create_new_loop): Pass in ivstack.
4099 (remove_all_edges): Pass in the construction_edge.
4100 (graphite_remove_iv): Removed.
4101 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4102 remove_cond_exprs): Rewritten.
4103 (move_phi_nodes): New.
4104 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4105 (translate_clast): Pass in ivstack. Rewrite some cases.
4106 (set_cloog_options, debug_clast_stmt): New.
4107 (find_transform): Use set_cloog_options.
4108 (outermost_loop_layer): Removed.
4109 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4110 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4111 mark_old_loops, remove_dead_loops): New.
4112 (gloog): Rewritten.
4113 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4114 (const_column_index, get_first_matching_sign_row_index,
4115 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4116 get_upper_bound): New.
4117 (graphite_trans_bb_strip_mine): Also update the iv map.
4118
4119 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4120 (struct name_tree): Add a loop field.
4121 (struct scop): Add a graphite_loops_mapping field.
4122 (SCOP_LOOPS_MAPPING): New.
4123 (debug_clast_stmt): Declare.
4124 * lambda.h (find_induction_var_from_exit_cond): Declare.
4125 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4126 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4127 (create_empty_loop_on_edge): Updated.
4128 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4129 rename_variables_in_bb): Declare.
4130 * tree-cfg.c (remove_bb): Extern.
4131
4132 * testsuite/gcc.dg/graphite/block-0.c: New.
4133
41342008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4135 Sebastian Pop <sebastian.pop@amd.com>
4136
4137 * graphite.c (strip_mine_profitable_p): New.
4138 (graphite_trans_bb_block): Disable strip mining if not profitable.
4139
4140 * testsuite/gcc.dg/graphite/scop-18.c: New.
4141 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4142 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4143
41442008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4145 Jan Sjodin <jan.sjodin@amd.com>
4146 Sebastian Pop <sebastian.pop@amd.com>
4147
4148 * graphite.c (is_interchange_valid): New.
4149 (graphite_trans_bb_block): Check loop nest of basic block for legality
4150 of interchange.
4151
4152 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4153 outer_most_loop, gbb_outer_most_loop_index): New.
4154
4155 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4156 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4157 * testsuite/gcc.dg/graphite/scop-16.c: New.
4158 * testsuite/gcc.dg/graphite/scop-17.c: New.
4159
41602008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4161
4162 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4163 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4164
41652008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4166
4167 * graphite.c (new_scop): Initialize SCOP_EXIT.
4168 (scopdet_info): Add.
4169 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4170 (build_scops_1): Cleanup, bugfixes.
4171 (build_scops): Cleanup.
4172
4173 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4174 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4175
41762008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4177
4178 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4179
4180 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4181 DEFAULT_GRAPHITE_FLAGS.
4182
4183 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4184
41852008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4186
4187 * graphite.c (scan_tree_for_params): Do not assert any more if
4188 MULT_EXPR parameter is negative.
4189
4190 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4191
4192 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4193
4194 * testsuite/gcc.dg/graphite/scop-15.c: New.
4195
41962008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4197
4198 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4199
42002008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4201
4202 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4203 graphite_swap_loops.
4204 (graphite_trans_bb_move_loop): New.
4205 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4206 (graphite_trans_bb_block): New.
4207 (graphite_trans_loop_block): New.
4208 (graphite_trans_scop_swap_1and2): Rename from
4209 graphite_trans_swap_1and2.
4210 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4211 (graphite_trans_scop_block): New.
4212 (graphite_apply_transformations): Rename from
4213 graphite_transformations.
4214
4215 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4216
42172008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4218
4219 * graphite.c (gbb_compare): New.
4220 (graphite_sort_gbbs): New.
4221 (gbb_can_be_ignored): New.
4222 (scop_remove_ignoreable_gbbs): New.
4223 (graphite_transformations): Cleanup and add
4224 scop_remove_ignoreable_gbbs.
4225 * lambda.h (lambda_vector_compare): New.
4226
42272008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4228
4229 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4230 (graphite_swap_loops): int -> unsigned
4231 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4232 (graphite_transformations): New.
4233 (graphite_transform_loops): Move to graphite_transformations.
4234 * graphite.h (gbb_nb_loops): Return unsigned.
4235
42362008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4237
4238 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4239 the domain matrix. This makes scop-0.c work again.
4240
42412008-06-20 Richard Guenther <rguenther@suse.de>
4242
4243 * graphite.h: Adjust copyright to GPLv3.
4244 * graphite.c: Likewise.
4245 (stmt_simple_memref_for_scop_p): Split out from ...
4246 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4247 and simplify.
4248 (get_bb_type): Optimize.
4249 (is_pred): Remove.
4250 (is_bb_addable): Fix memleak, replace is_pred call with
4251 single_pred.
4252 (build_scops): Use current_loops.
4253 (param_index): Fix memleak.
4254
42552008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4256
4257 * graphite.c: Fix formatting.
4258
42592008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4260
4261 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4262 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4263 (create_var_name, save_var_name): Newly defined functions.
4264 (initialize_cloog_names): Part of the code factored out to
4265 save_var_name.
4266 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4267 in clast_reduction statement.
4268 (graphite_create_new_loop): Now takes a new parameter
4269 for outer_loop.
4270 (translate_clast): Now also takes the context_loop and bb_exit
4271 parameters. Rewritten the code so that it creates a gimple code
4272 inside the given context.
4273 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4274 remove_cond_expr, disconnect_cond_expr,
4275 disconnect_virtual_phi_nodes): Newly defined functions.
4276 * graphite.h (struct scop): added old_ivs vector.
4277 SCOP_OLDIVS: New macro.
4278
42792008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4280
4281 * cfgloopmanip.c: Add missing function comments, fix formatting.
4282
42832008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4284
4285 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4286 (create_empty_loop_on_edge): Defined.
4287 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4288 instead of void.
4289 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4290 (update_dominators_in_loop): Declared as extern
4291 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4292
42932008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4294
4295 * graphite.c (print_graphite_bb): Allow changing number of loops
4296 in SCoP domain.
4297 (initialize_cloog_names): Allow changing number of loops.
4298 (build_cloog_prog): Simplify.
4299 (find_transform): Enable cloog option --strides.
4300 (graphite_swap_loops): New.
4301 (graphite_strip_mine_loop): New.
4302 (graphite_trans_swap_1and2): New.
4303 (graphite_trans_strip): New.
4304 (graphite_transform_loops): Add graphite_trans_strip.
4305 * graphite.h (scop_max_loop_depth): New.
4306
43072008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4308
4309 * graphite.c (build_scop_iteration_domain): Remove forgotten
4310 line. (Fixes compile)
4311
43122008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4313
4314 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4315 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4316 (build_bb_loops): New.
4317 (graphite_transform_loops): Add build_bb_loops.
4318 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4319 numbers.
4320 * graphite.h (graphite_bb): Add loops.
4321 (gbb_nb_loops): New.
4322 (gbb_loop_at_index): New.
4323 (gbb_loop_index): New.
4324 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4325 using nb_params_in_scop.
4326
43272008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4328
4329 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4330 (build_scop_canonical_schedules): Build minimized schedule.
4331 (schedule_to_scattering): Adapt to minimized schedule.
4332 * graphite.h (graphite_bb): Add/Update descriptions.
4333
43342008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4335 Tobias Grosser <grosser@fim.uni-passau.de>
4336
4337 * graphite.c (print_graphite_bb): Add condition printing.
4338 (dump_value): New.
4339 (dump_gbb_conditions): New.
4340 (build_scop_conditions_1): New.
4341 (build_scop_conditions): New.
4342 * graphite.h (graphite_bb): Add conditions.
4343
43442008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4345
4346 * graphite.c (print_graphite_bb):
4347 (free_graphite_bb): New.
4348 (free_scop): Free bbs.
4349 (get_bb_type): Free doms.
4350 (build_scop_context): Free context matrix.
4351 (build_loop_iteration_domains): Remove unused code.
4352 (build_cloog_prog): Free scattering function and blocklist.
4353 (find_transform): Free options.
4354
43552008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4356
4357 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4358 Remove unnecessery cloog data structures. Make a copy of the domain
4359 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4360 unnecessary cloog data structures. Fix memory leaks. Remove insert
4361 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4362 used.
4363 (build_scop_iteration_domain): Remove unnecessary cloog
4364 data structures. Fix memory leaks.
4365 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4366 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4367
43682008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4369
4370 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4371
43722008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4373
4374 * graphite.c (end_scop): Style fix.
4375 (schedule_to_scattering): Style and comment fix.
4376
43772008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4378 * graphite.c (print_graphite_bb): Fix definiton of
4379 schedule_to_scattering.
4380 (initialize_cloog_names): Change nb_scattdims to max loop
4381 depth in SCoP.
4382 (schedule_to_scattering): Take parameter for number of scattering
4383 dimensions.
4384 (build_cloog_prog): Only build as much scattering dimensions as
4385 necessary.
4386
43872008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4388
4389 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4390 in polyhedron/aermod.f90.
4391
43922008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4393 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4394 Harsha Jagasia <harsha.jagasia@amd.com>
4395
4396 * graphite.c (is_bb_addable): Fix segfault.
4397
43982008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4399
4400 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4401 with multiple exits and conditional handling in edge cases.
4402 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4403
4404 * testsuite/gcc.dg/graphite/scop-14.c: New.
4405
44062008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4407 Adrien Eliche <aeliche@isty.uvsq.fr>
4408
4409 * graphite.c (is_bb_addable): Add more comments and enhance
4410 readablity of the source code. Fix memory leak.
4411 (is_loop_exit): Fix memory leak.
4412
44132008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4414
4415 * graphite.c (first_loop_in_scop): Deleted.
4416 (setup_cloog_loop): Only walk the loop chain for inner loops.
4417 (build_scop_iteration_domain): Execute setup_cloog_loop for
4418 all loops in the first layer.
4419
44202008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4421
4422 * graphite.c (scan_tree_for_params): Change the way params are
4423 added to be indepenent of the number of loops.
4424 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4425 handling.
4426 (build_cloog_prog): Revert to short matrix format.
4427
44282008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4429 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4430
4431 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4432 warning.
4433
44342008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4435
4436 * graphite.c (nb_data_refs_in_scop): New.
4437 (graphite_transform_loops): Print more stats: number of
4438 loops, basic blocks and data references per scop.
4439
44402008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4441 Jan Sjodin <jan.sjodin@amd.com>
4442
4443 * graphite.c (loop_affine_expr, idx_record_params,
4444 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4445 instead of instantiate_parameters.
4446
44472008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4448
4449 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4450 add support for parameters, add STATIC_SCHEDULE at the right places,
4451 cleanup.
4452
44532008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4454
4455 * graphite.c (build_scop_loop_nests): Only add the loops, that
4456 are contained completely in the SCoP.
4457 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4458 and the domains are fixed.
4459 (build_scop_canonical_schedules): Add support for bbs not contained
4460 in any SCoP.
4461
44622008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4463
4464 * graphite.h (scop_contains_loop): Update comments to match
4465 the actual behavior.
4466 (scop_contains_loop): New.
4467 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4468
44692008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4470
4471 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4472 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4473 as GBB_COND_HEADER.
4474
44752008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4476 Tobias Grosser <grosser@fim.uni-passau.de>
4477
4478 * graphite.c (graphite_transform_loops): Early return when
4479 there are no loops in the function.
4480
44812008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4482 Jan Sjodin <jan.sjodin@amd.com>
4483
4484 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4485 offset of the last loop.
4486 (setup_cloog_loop): Copy the entire outer constraint matrix.
4487
44882008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4489 Jan Sjodin <jan.sjodin@amd.com>
4490
4491 * graphite.c (stmt_in_scop_p, function_parameter_p,
4492 invariant_in_scop_p): Removed.
4493 (scan_tree_for_params): Can be used with no constraint
4494 matrix for gathering parameters.
4495 (idx_record_params): Don't use idx_record_param, instead use
4496 scan_tree_for_params.
4497 (find_scop_parameters): Same.
4498 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4499 Fix the size of loop domains.
4500 (schedule_to_scattering): Exit when the outer loop is not in scop.
4501 (find_transform): Enable build_cloog_prog.
4502
45032008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4504 Jan Sjodin <jan.sjodin@amd.com>
4505
4506 * graphite.c (schedule_to_scattering): Make scattering domains
4507 uniformly of the same size, as required by CLooG 0.14.0 and before.
4508
45092008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4510 Jan Sjodin <jan.sjodin@amd.com>
4511
4512 * graphite.c (schedule_to_scattering): Rewrite, correct the
4513 translation of the scheduling function to scattering.
4514 (build_cloog_prog): Call schedule_to_scattering only once.
4515 * graphite.h (scop_loop_index): Do not fail for loops not
4516 in the scop: return -1.
4517
45182008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4519
4520 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4521 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4522 (setup_cloog_loop): Export GBB_DOMAIN.
4523 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4524 able to rebuild the original control flow.
4525 * graphite.h (graphite_bb): Add domain field and access macro.
4526 (GBB_DOMAIN): New.
4527
45282008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4529
4530 * graphite.c (debug_gbb): New.
4531 (print_scop, build_graphite_bb): Use SCOP_BBS.
4532 (build_scop_bbs): Reimplemented.
4533 (dfs_bb_in_scop_p): Removed.
4534 (build_scop_loop_nests): Reorder loops inserted in
4535 SCOP_LOOP_NEST: outer loops should come first.
4536 (build_scop_canonical_schedules): Reinitialize at zero
4537 the components of the SCOP_STATIC_SCHEDULE for the loops
4538 that have already been parsed.
4539
4540 * graphite.h (debug_gbb): Declared.
4541
45422008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4543 Jan Sjodin <jan.sjodin@amd.com>
4544
4545 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4546 (graphite_loop_to_gcc_loop): Removed.
4547 (remove_all_edges): New.
4548 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4549 (gloog): Remove useless code.
4550
45512008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4552
4553 * graphite.c (get_bb_type): Reworked. We distinguish between
4554 loops with one or multiple exits.
4555 (is_loop_exit): New.
4556 (is_pred): New.
4557 (is_bb_addable): Rework condition handling, now support for case
4558 case statements and loops with multiple exits.
4559
4560 * testsuite/gcc.dg/graphite/scop-11.c: New.
4561 * testsuite/gcc.dg/graphite/scop-12.c: New.
4562 * testsuite/gcc.dg/graphite/scop-13.c: New.
4563
45642008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4565
4566 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4567 we have too many colors.
4568
45692008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4570
4571 * doc/invoke.texi (-ftree-loop-fusion): Document.
4572 * tree-pass.h (pass_loop_fusion): Declared.
4573 * tree-loop-fusion.c: New.
4574 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4575 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4576 * tree-data-ref.h (find_data_references_in_loop): Declared.
4577 * common.opt (ftree-loop-fusion): Declared.
4578 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4579
45802008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4581
4582 * graphite.c (build_access_matrix): Fix typo from the merge.
4583
45842008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4585
4586 * Merge from mainline (130800:135673).
4587
45882008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4589
4590 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4591 Update dominators after splitting.
4592
45932008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4594
4595 * graphite.c (is_bb_addable): Return the harmful statement.
4596 Factor up some code.
4597 (end_scop): New. Splits end of scope bbs on a harmful statement.
4598 (build_scops_1): Call end_scop.
4599
46002008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4601
4602 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4603 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4604 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4605 build_scops_1): Removed.
4606 (build_scops_2): Renamed build_scops_1.
4607
46082008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4609
4610 * graphite.c: Fix formatting.
4611
46122008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4613
4614 * graphite.c (get_bb_type): New.
4615 (move_scops): New.
4616 (build_scops_2): New.
4617 (is_bb_addable): New.
4618 (build_scops): Switch the scop detection.
4619 (build_scop_bbs): Add entry bb to scop.
4620 * graphite.h (struct scop): Update comment.
4621
46222008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4623
4624 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4625 more colors.
4626
46272008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4628
4629 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4630 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4631 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4632 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4633 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4634
46352008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4636
4637 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4638 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4639 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4640 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4641 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4642
46432008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4644
4645 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4646 Check affine expressions depending on the outermost loop
4647 instead of a scop.
4648 (stmt_simple_for_scop_p): Same.
4649 (harmfule_stmt_in_scop): Same.
4650
46512008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4652
4653 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4654 mark entry and exit, that are not part of the SCoP and update HTML
4655 formatting.
4656
46572008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4658
4659 * graphite.c (basic_block_simple_for_scop_p): Renamed
4660 harmful_stmt_in_bb.
4661 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4662 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4663 (all_preds_visited_p, all_succs_visited_p,
4664 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4665 scop_end_loop): New.
4666 (build_scops): Do not use dfs_enumerate_from.
4667
4668 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4669
46702008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4671
4672 * graphite.c: Add comments to functions that are missing a
4673 description.
4674 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4675
46762008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4677
4678 * graphite.c (nb_params_in_scop): Moved...
4679 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4680 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4681 (clast_to_gcc_expression): Reduce column size to less than 80.
4682 (graphite_create_iv): Return the new name of the IV.
4683 (find_transform): Set options->esp and options->cpp.
4684 (gloog): Comment out the invalidation of the old loop code.
4685 (initialize_dependence_polyhedron): Replace scop_nb_params with
4686 nb_params_in_scop.
4687
4688 * graphite.h (nb_params_in_scop): ... here.
4689 (scop_nb_params): Removed.
4690 (loop_domain_dim): Return something even when the loop was not
4691 found in the hash table: avoid ICEing on all the graphite.exp
4692 testcases.
4693
46942008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4695
4696 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4697
4698 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4699 according to nesting level.
4700 (find_scop_parameters): Call instantiate_parameters.
4701 (scan_tree_for_params): Extend it to handle general affine bounds.
4702 Inner loop bound can depend on outer loop induction variable.
4703 (setup_cloog_loop): tmp variable is allocated on stack. Call
4704 instantiate_parameters with respect to outermost_loop_in_scop.
4705 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4706 graphite.h.
4707 (create_empty_loop): Function loopify should be given edge
4708 probability, instead of edge frequency. Dominance relation from
4709 switch_bb to loop_header.
4710 (clast_to_gcc_expression): Added handling of clast_reduction node.
4711 (gloog): New functionality for removing old loop.
4712 (test_dependence): Factored out from build_rdg_all_levels.
4713 (build_rdg_all_levels): Dependence testing factored out to
4714 test_dependence function.
4715
4716 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4717 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4718 from graphite.c
4719
47202008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4721
4722 * graphite.c (free_scop, param_index, initialize_cloog_names,
4723 nb_params_in_scop): Use name_tree map instead of just a tree
4724 for keeping track of the variable name associated to that tree.
4725 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4726 clast_to_gcc_expression, graphite_create_iv,
4727 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4728 graphite_stmt_to_gcc_stmt): New.
4729 (gloog): Call these.
4730 * graphite.h (struct name_tree): New.
4731 (struct scop): Use name_tree instead of tree for params.
4732 Store a vector of name_tree for new_ivs.
4733 (SCOP_NEWIVS): New.
4734 (scop_nb_params): Use name_tree instead of tree.
4735
47362008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4737 Sebastian Pop <sebastian.pop@amd.com>
4738
4739 * tree-bounds.c: New.
4740 * tree-bounds.h: New.
4741 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4742 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4743 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4744 flag_mudflap.
4745 * gcc.c: Same.
4746 * toplev.c: Same.
4747 * c-cppbuiltin.c: Same.
4748 * c-pragma.c: Same.
4749 * common.opt: Same.
4750 * varasm.c: Same.
4751 * tree-outof-ssa.c: Same.
4752 * c-common.c: Same.
4753 * Makefile.in: Same.
4754
47552008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4756 Sebastian Pop <sebastian.pop@amd.com>
4757
4758 * tree-loop-distribution.c (remaining_stmts,
4759 upstream_mem_writes): Removed static variables.
4760 (copy_loop_before, create_bb_after_loop,
4761 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4762 rdg_build_components, rdg_build_partitions,
4763 dump_rdg_partitions): Extern.
4764 (generate_loops_for_partition, generate_code_for_partition): Do not
4765 return a bool.
4766 (already_processed_vertex_p, predecessor_has_mem_write,
4767 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4768 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4769 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4770 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4771 Pass remaining_stmts and upstream_mem_writes as parameters.
4772 (rdg_component): Moved...
4773 (build_rdg_partition_for_component): Do not aggregate components when
4774 flag_streamize_loops is set.
4775 (gen_sequential_loops): New.
4776 (ldist_gen): Call gen_sequential_loops.
4777
4778 * tree-pass.h (pass_loop_streamization): Declared.
4779
4780 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4781 basic blocks when loops structures exist.
4782
4783 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4784
4785 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4786
4787 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4788 eliminate_local_variables_stmt, eliminate_local_variables,
4789 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4790 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4791 of code delimited by two edges in the CFG.
4792 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4793 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4794 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4795 the case of parallelisation of reductions.
4796 (create_loop_fn): Extern.
4797 (create_omp_parallel_region): New.
4798
4799 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4800 dump_data_reference for printing dra and drb.
4801 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4802 RDGE_RELATION.
4803 (build_rdg): Don't call free_dependence_relations for the moment, as
4804 we attach dependence relations on each edge of the RDG.
4805 To be fixed later.
4806
4807 * tree-data-ref.h (rdg_component): ...here.
4808 (struct rdg_edge): New field ddr_p relation.
4809 (RDGE_RELATION): New.
4810 (create_bb_after_loop, copy_loop_before,
4811 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4812 rdg_build_partitions, dump_rdg_partitions,
4813 free_rdg_components): Declared.
4814
4815 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4816 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4817
4818 * tree-loop-streamization.c: New.
4819
4820 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4821 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4822
4823 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4824
4825 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4826
4827 * passes.c: Schedule pass_loop_streamization.
4828
48292008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4830
4831 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4832 update comment.
4833
48342008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4835
4836 * graphite.c (dot_all_scops): Update formatting.
4837 Bbs can now be part of more than one SCoP.
4838
48392008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4840
4841 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4842 malloc problems.
4843 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4844 * graphite.h (loop_to_cloog_loop): New.
4845
48462008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4847
4848 * graphite.c (loop_domain_dim, ref_nb_loops,
4849 loop_iteration_vector_dim): New.
4850 (build_access_matrix_with_af, build_access_matrix,
4851 initialize_dependence_polyhedron): Fixed for new matrix layout.
4852 No longer assume that all iteration domains are of the same
4853 dimensionality.
4854
48552008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4856
4857 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4858 defined in a loop at depth 0 is invariant.
4859 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4860 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4861 be called at loop depth 0.
4862
4863 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4864 a parameter.
4865 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4866 (down_open_scop): Removed.
4867 (loop_in_scop_p): Redefined.
4868 (scop_affine_expr): New argument: scop.
4869 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4870 a harmful statement ending a scop.
4871 (basic_block_simple_for_scop_p): New argument: scop.
4872 (get_loop_start): Removed.
4873 (new_scop): Initialize SCOP_LOOPS.
4874 (free_scop): Free SCOP_LOOPS.
4875 (succs_at_same_depth, preds_at_same_depth): New.
4876 (end_scop): Test the validity of a scop.
4877 (add_dominators_to_open_scops): New.
4878 (test_for_scop_bound): Call add_dominators_to_open_scops.
4879 Add cases for opening and closing multiple scops.
4880 (build_scops, build_scop_bbs): Iterate over basic blocks in
4881 depth first order.
4882 (build_graphite_bb): Pass scop directly.
4883 (dfs_bb_in_scop_p): New.
4884 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4885 several times.
4886 (nb_loops_around_gb): Use loop_in_scop_p.
4887 (schedule_to_scattering): Disabled for the moment the code computing
4888 the "textual order for outer loop".
4889
4890 * graphite.h (struct scop): New field loops.
4891 (SCOP_LOOPS): New.
4892 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4893
4894 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4895
48962008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
4897 Sebastian Pop <sebastian.pop@amd.com>
4898
4899 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4900 * common.opt (fstreamize-loops): New.
4901 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4902 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4903 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4904 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4905
49062008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4907
4908 * tree-data-ref.c (build_empty_rdg): New.
4909 (build_rdg): Use it.
4910 * tree-data-ref.h (build_empty_rdg): Declared.
4911 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4912 (find_vertex_for_stmt): Removed.
4913 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4914
49152008-02-21 Sebastian Pop <sebastian.pop@amd.com>
4916
4917 * tree-loop-distribution.c (generate_builtin): After cancelling the
4918 loop tree, also delete basic blocks.
4919 (rdg_flag_uses): Stop recursion when a vertex has already been
4920 processed.
4921
49222008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4923
4924 * graphite.c (build_scop_alpha): Removed.
4925 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4926 and dump_dependence_graph to avoid compiler warnings.
4927
49282008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4929
4930 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4931 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4932 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4933 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4934 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4935 (initialize_dependence_polyhedron, find_vertex_for_stmt,
4936 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4937 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4938 dump_dependence_graph): New.
4939 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4940 (GBB_ALPHA): New.
4941 (struct scop): New field loop2cloog_loop.
4942 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4943 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4944
49452008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4946
4947 * graphite.c (build_graphite_bb): Fix initialization
4948 of the graphite basic block.
4949
49502008-02-05 Sebastian Pop <sebastian.pop@amd.com>
4951
4952 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4953 loop domain matrix. Pass in the number of loops contained in the
4954 constraint matrix.
4955 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4956 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4957 loops that are not surrounding the current loop are not represented
4958 in the domain constraint matrix.
4959 (build_scop_iteration_domain): Initial domain constraint matrix
4960 contains only the eq/ineq, cst, and scop parameters columns.
4961
49622008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4963
4964 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4965 (print_graphite_bb): Print scattering.
4966
49672008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4968
4969 * graphite.c (initialize_cloog_names): Initialize names of
4970 scattering variables.
4971
49722009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4973
4974 * graphite.c (dot_all_scops_1): Disable debug output while
4975 printing graph.
4976
49772008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4978
4979 * graphite.c (find_transform): Change cloog output language to C.
4980
49812008-01-27 Sebastian Pop <sebastian.pop@amd.com>
4982
4983 * tree-loop-distribution.c (generate_memset_zero,
4984 generate_builtin, generate_code_for_partition,
4985 rdg_flag_all_uses): New.
4986 (rdg_flag_uses): Gather in the same partition the statements defining
4987 the VUSES of the current statement.
4988 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4989 Gather in the same partition not only the stores to the same memory
4990 access, but also the reads.
4991 (ldist_generate_loops): Renamed ldist_gen.
4992
49932008-01-24 Sebastian Pop <sebastian.pop@amd.com>
4994 Tobias Grosser <grosser@fmi.uni-passau.de>
4995
4996 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
4997 next pointer, don't use the inner pointer.
4998
49992008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5000
5001 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5002 (find_transform): Call dot_all_1.
5003 * graphite.h (dot_all_scops): Declared.
5004
50052007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5006
5007 * tree-loop-distribution.c: Fix apsi.f ICE.
5008 (create_bb_after_loop): New.
5009 (generate_loops_for_partition): Use it.
5010 * testsuite/gfortran.dg/ldist-1.f90: New.
5011
5012 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5013 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5014
50152007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5016
5017 * graphite.c (find_transform): Dump cloog program sent to cloog.
5018
50192007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5020
5021 * graphite.c (initialize_cloog_names): Initialize cloog
5022 iterator names.
5023
50242007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5025
5026 * graphite.c (build_scop_context): Fix typo, for the matrix
5027 format: insert '0 >= 0' instead of '-1 >= 0'.
5028
50292007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5030
5031 * Fix merge problems.
5032
50332007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5034
5035 * graphite.c (setup_cloog_loop): Fix typo.
5036
50372007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5038
5039 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5040 * tree-loop-distribution.c: Reimplemented.
5041 * tree-pass.h (pass_loop_distribution): New.
5042 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5043 print_loops.
5044 * graphds.h (struct graph): New field indexes.
5045 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5046
5047 * tree-vect-analyze.c: Remove declaration of static functions when not
5048 needed.
5049 * tree-vectorizer.c: Same.
5050 (rename_variables_in_loop): Now extern.
5051 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5052 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5053 calling redirect_edge_and_branch_force.
5054
5055 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5056
5057 * tree-data-ref.c: Don't include tree-chrec.h.
5058 (debug_data_dependence_relations): New.
5059 (dump_data_dependence_relation): Call dump_data_reference on data refs
5060 in the relation.
5061 (same_access_functions): Moved...
5062 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5063 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5064 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5065 struct rdg_vertex_info, ): New.
5066 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5067 at DDR_REVERSED_P.
5068 (create_rdg_vertices): Initialize the htab of graph->indexes.
5069 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5070 (stmts_from_loop): Don't save LABEL_EXPR.
5071 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5072 hash_stmt_vertex_del): New.
5073 (build_rdg): Initialize rdg->indexes.
5074 (free_rdg, stores_from_loop, ref_base_address,
5075 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5076 have_similar_memory_accesses_1, ref_base_address_1,
5077 remove_similar_memory_refs): New.
5078
5079 * tree-data-ref.h: Include tree-chrec.h.
5080 (debug_data_dependence_relations): Declared.
5081 (same_access_functions): ...here. Now static inline.
5082 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5083 ddr_dependence_level): New.
5084 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5085 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5086 RDG_MEM_READS_STMT): New.
5087 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5088 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5089 rdg_vertex_for_stmt): Declared.
5090 (struct rdg_edge): New field level.
5091 (RDGE_LEVEL, free_rdg): New.
5092 (stores_from_loop, remove_similar_memory_refs,
5093 rdg_defs_used_in_other_loops_p,
5094 have_similar_memory_accesses): Declared.
5095 (rdg_has_similar_memory_accesses): New.
5096
5097 * lambda.h (dependence_level): New.
5098 * common.opt (ftree-loop-distribution): New.
5099 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5100 (print_loop_ir): Renamed print_loops.
5101 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5102 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5103 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5104 (tree-loop-distribution.o): Added.
5105 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5106 (mark_virtual_ops_in_bb): New.
5107 (print_loops_bb, debug_loop_num, debug_loop): New.
5108 * passes.c: Scheduled pass_loop_distribution.
5109
51102007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5111
5112 * graphite.c (scan_tree_for_params): Correct the number of columns
5113 for polylib format.
5114 (nb_flat_iterator): New.
5115 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5116 (build_scop_iteration_domain): Correct the number of columns for
5117 polylib format.
5118
51192007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5120
5121 * Merge from mainline (129697:130800).
5122
51232007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5124
5125 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5126 dominated by SCoP's exit.
5127 (graphite_transform_loops): Compute post dominators.
5128
51292007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5130
5131 * Merge from mainline (127169:129697).
5132
51332007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5134
5135 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5136 parameter for the basic block that contains the expression. Use
5137 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5138 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5139 the expression.
5140 * graphite.h (gbb_loop): New.
5141 (GBB_LOOP): Removed.
5142
51432007-08-03 Sebastian Pop <sebpop@gmail.com>
5144
5145 * Makefile.in: Fix merge problem.
5146
51472007-08-03 Sebastian Pop <sebpop@gmail.com>
5148
5149 * Merge from mainline (125309:127169).
5150 * tree-loop-distribution.c: Disabled.
5151
51522007-06-05 Sebastian Pop <sebpop@gmail.com>
5153
5154 * Merge from mainline (r123693:125309).
5155
51562007-05-30 Sebastian Pop <sebpop@gmail.com>
5157
5158 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5159 correct_modify_p
5160 (correct_modify_p, check_statements, number_of_lvalue_uses,
5161 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5162 instead of MODIFY_EXPR.
5163 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5164 and push new edges.
5165
51662007-05-24 Sebastian Pop <sebpop@gmail.com>
5167
5168 * tree-loop-distribution.c (struct rdg): Replace arrays by
5169 VECs for edges and vertices.
5170 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5171 (RDGV_NB_PARTITIONS): New.
5172 (PRDG_NBV, PRDG_NBE): Removed.
5173 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5174 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5175 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5176
51772007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5178 Sebastian Pop <sebpop@gmail.com>
5179
5180 * doc/invoke.texi (-ftree-loop-distribution): Document.
5181 * tree-loop-distribution.c: New file.
5182 * tree-pass.h (pass_loop_distribution): Declared.
5183 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5184 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5185 and set reversed_p.
5186 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5187 (DDR_REVERSED_P): New.
5188 * common.opt (-ftree-loop-distribution): New.
5189 * tree-flow.h (distribute_loops): Declared.
5190 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5191 * passes.c (init_optimization_passes): Schedule loop distribution.
5192
51932007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5194
5195 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5196 (print_scop): Don't print when scop is NULL.
5197 (build_scop_context, find_transform): Don't output to stderr.
5198
51992007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5200
5201 * tree-data-ref.c: Don't include graphite.h.
5202 Comment out the code for printing data reference's scop.
5203 (build_access_matrix_with_af): Moved...
5204 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5205 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5206 (print_graphite_bb): Print basic block's schedule.
5207 (print_scop): Don't print the schedule, call cloog's pretty printer.
5208 (bb_in_scop_p): A basic block is in a scop only if it is both
5209 dominated and postdominated by the scop's entry and exit basic blocks.
5210 (function_parameter_p): New.
5211 (invariant_in_scop_p): Use function_parameter_p.
5212 (new_scop, save_scop): New.
5213 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5214 save_scop.
5215 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5216 (loop_in_scop_p): New.
5217 (scop_record_loop): Use loop_in_scop_p.
5218 (build_scop_domain): Renamed build_scop_iteration_domain.
5219 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5220 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5221 setup_cloog_loop, dot_scop_1, dot_scop): New.
5222 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5223 (struct scop): Add a pointer to cloog's representation of a program.
5224
52252007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5226
5227 * doc/invoke.texi (-ftree-check-verbose): Renamed
5228 -ftree-checks-verbose.
5229 * common.opt (flag_tree_check_verbose): Renamed
5230 flag_tree_checks_verbose.
5231 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5232
52332007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5234
5235 * configure: Regenerated.
5236 * config.in: Regenerated.
5237 * tree-ssa-loop.c (graphite_transforms): Execute
5238 graphite_transform_loops only when HAVE_cloog.
5239 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5240 * graphite.c: Include polylibgmp.h and cloog.h.
5241 (graphite_transform_loops): Removed loops parameter.
5242 * tree-flow.h (graphite_transform_loops): Update declaration.
5243 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5244 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5245 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5246 (OBJS-common): Remove dependence on graphite.o.
5247 (BACKEND): Depend on @GRAPHITE@.
5248
52492007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5250
5251 * doc/invoke.texi (-ftree-check-verbose): Documented.
5252 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5253 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5254 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5255 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5256 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5257 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5258 * common.opt (ftree-checks-verbose): New.
5259 * tree-check.c (tree_check_warning): Move extra stderr output
5260 under control of flag_tree_check_verbose.
5261
52622007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5263
5264 * tree-match.c: Fix comments formatting.
5265 * tree-match.h: Fix comments formatting.
5266 * tree-check.c: Fix comments formatting.
5267 (tree_check_init): Restructure.
5268
52692007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5270
5271 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5272
52732007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5274
5275 * Merge from mainline (r120733:123693).
5276
52772007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5278
5279 * condate.y: New file.
5280 * tree-match.h (struct patt_info_s): New field sign.
5281 (struct condate_s): New field msg.
5282 (normalize_condate, name_condate, add_condate): New.
5283 (conds[], condate_parse): Made extern.
5284 * tree-check.c (tree_check_warning): First arg changed to cond;
5285 warning reformatted.
5286 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5287 (tree_scan): New.
5288 (tree_check): Process trivial condates.
5289 (read_delimited_string): Removed.
5290 (print_cond): Print name and msg.
5291 (conds[]): Made extern.
5292 (parse_tree_check_file_once): Rewritten to use the parser in
5293 condate.y.
5294 Processing of option --tree_check_string moved to tree_scan().
5295 * Makefile.in: Added condate.y
5296
52972007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5298
5299 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5300 Use VECs instead of varrays.
5301 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5302 * Makefile.in (pretty-print.o): Depend on vec.h.
5303 * pretty-print.c: Include tree.h and vec.h.
5304 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5305 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5306 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5307 pp_free_list): Use VECs instead of varrays.
5308 * pretty-print.h: Do not include varray.h.
5309 (struct tree_chunk_s): Declaration moved before its use.
5310 (output_buffer): Rename varray field to chunks.
5311 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5312 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5313 save_global_holes): Use VECs instead of varrays.
5314 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5315 * tree-check.c (scan_cfg_stmts, push_node,
5316 print_matching_stmt): Removed.
5317 (tree_check_instance, push_global_holes_if_new, tree_check,
5318 execute_tree_check): Use VECs instead of varrays.
5319 (gate_tree_check): Don't execute the CFG check when basic_block_info
5320 is not available.
5321
53222007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5323
5324 * Merge from mainline (r115016:120733).
5325
53262007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5327
5328 * Merge from mainline (r117632:117661).
5329
53302007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5331
5332 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5333 * tree-pass.h (TDF_DEBUG, debug_p): New.
5334 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5335 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5336 get_loop_exit_condition, analyze_evolution_in_loop,
5337 analyze_initial_condition, analyze_scalar_evolution,
5338 instantiate_parameters, number_of_latch_executions): Use debug_p.
5339 * tree-chrec.c (chrec_apply): Use debug_p.
5340 * tree-data-ref.c: Include graphite.h.
5341 (dump_data_reference): Print also the access matrix.
5342 (analyze_array, analyze_indirect_ref, init_data_ref,
5343 analyze_offset_expr, address_analysis, object_analysis,
5344 create_data_ref, finalize_ddr_dependent,
5345 non_affine_dependence_relation, analyze_ziv_subscript,
5346 analyze_siv_subscript_cst_affine,
5347 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5348 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5349 analyze_miv_subscript, analyze_overlapping_iterations,
5350 build_classic_dist_vector, subscript_dependence_tester,
5351 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5352 (build_access_matrix_with_af): No longer static.
5353 * tree-data-ref.h (scop_p): ... declaration here.
5354 (data_reference.scop): New field.
5355 (DR_SCOP, DR_ACCESS_MATRIX): New.
5356 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5357 * graphite.c (print_graphite_bb): Call dump_data_references.
5358 (print_scop): Use scop_nb_loops and scop_dim_domain.
5359 (test_for_scop_bound): Use debug_p.
5360 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5361 scop_nb_params.
5362 (scop_loop_index): Moved...
5363 (scop_record_loop): New.
5364 (build_scop_loop_nests): Use scop_record_loop.
5365 (build_scop_domain): Use scop_dim_domain.
5366 (build_access_matrix): Implemented.
5367 (build_scop_canonical_schedules): Use scop_nb_loops.
5368 (build_graphite_bb): Initialize GBB_SCOP.
5369 * graphite.h (scop_p): Moved...
5370 (graphite_bb.scop): New field.
5371 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5372 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5373 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5374 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5375 scop_loop_index): New.
5376 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5377
53782007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5379
5380 * Merge from mainline (r117661:120450).
5381
53822006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5383
5384 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5385 at the first declaration outside the varying loop, instantiate as
5386 far as possible.
5387 * tree-chrec.c (for_each_scev_op): New.
5388 * tree-chrec.h (for_each_scev_op): Declared.
5389 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5390 * tree-data-ref.c (get_references_in_stmt,
5391 find_data_references_in_stmt): New, from trunk.
5392 (find_data_references_in_loop): Use get_references_in_stmt
5393 and find_data_references_in_loop, modified as in trunk.
5394 (build_access_matrix_with_af): New.
5395 * tree-data-ref.h (data_reference): Add a field access_matrix.
5396 (data_ref_loc): New, as in trunk.
5397 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5398 invariant_in_scop_p, param_index, scan_tree_for_params,
5399 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5400 idx_record_param, idx_record_params, build_access_matrix,
5401 build_scop_data_accesses, build_scop_canonical_schedules,
5402 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5403 build_scop_params): New.
5404 * graphite.h (graphite_bb): New.
5405 (scop): Add fields static_schedule, params, loop_nest,
5406 iteration_domain.
5407 * lambda.h: Declare vecs of lambda_matrix.
5408 * tree-flow.h (print_loop_ir_bb): Declared.
5409 * tree-cfg.c (print_loop_ir_bb): New.
5410 (print_loop): Use print_loop_ir_bb.
5411
54122006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5413
5414 * Merge from mainline (r115016:117632).
5415
54162006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5417
5418 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5419 break due to a warning.
5420
54212006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5422
5423 * graphite.c (print_scops, debug_scops): New.
5424 (graphite_transform): Renamed graphite_find_transform.
5425 * graphite.h (debug_scops): Declared.
5426
54272006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5428
5429 * tree-match.c: Reformat following the GNU style.
5430 * tree-match.h: Reformat following the GNU style.
5431 * tree-pattern.h: Removed empty file.
5432 * Makefile.in: Remove references to tree-pattern.h.
5433 * tree-check.c: Reformat following the GNU style.
5434 (execute_tree_check): Move gate condition code to...
5435 (gate_tree_check): ...here. New function.
5436 (pass_check): Use the gate function.
5437
54382006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5439
5440 * tree-pattern.h: New. Tree pattern matching and checking using
5441 concrete syntax.
5442 * tree-check.c: New. Tree/CFG checking pass.
5443 * tree-match.c: New. Library for tree pattern matching.
5444 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5445 * toplev.c, flags.h: Add globals for tree-check pass.
5446 * Makefile.in: Integrate the files in tree-check pass.
5447 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5448 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5449 Introduce a "lazy" pretty-print mode.
5450 * tree.c, tree.h: Add tree_name.
5451
54522006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5453
5454 * doc/invoke.texi (-fgraphite): Correct typo.
5455 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5456 use of print_loop_ir.
5457 * testsuite/gcc.dg/graphite/scop-1.c: New.
5458 * testsuite/gcc.dg/graphite/scop-2.c: New.
5459 * testsuite/gcc.dg/graphite/graphite.exp: New.
5460 * graphite.c: Include domwalk.h.
5461 (print_scop): Print only the entry and exit blocks.
5462 (debug_scop): No longer static.
5463 (affine_expr): Fix formating. Return also true when the expression is
5464 constant.
5465 (stmt_simple_for_scop_p): Fix formating.
5466 (build_scops): Use domwalk.
5467 (get_loop_start, end_scop, test_for_scop_bound): New.
5468 (graphite_transform_loops): Avoid printing on stderr.
5469 * graphite.h (debug_scop): Declared.
5470 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5471 * Makefile.in (graphite.o): Depend on domwalk.h.
5472 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5473 declarations for static functions.
5474 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5475 controlling output verbosity.
5476
54772006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5478 Plesco Alexandru <shurikx@gmail.com>
5479
5480 * doc/invoke.texi (-fgraphite): Document.
5481 * tree-pass.h (pass_graphite_transforms): Declared.
5482 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5483 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5484 (pass_graphite_transforms): Defined.
5485 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5486 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5487 * graphite.c, graphite.h: New.
5488 * common.opt (fgraphite): Declared.
5489 * tree-flow.h (graphite_transform_loops): Declared.
5490 * Makefile.in (OBJS-common): Add graphite.o.
5491 (graphite.o): New rule.
5492 * passes.c (pass_graphite_transforms): Scheduled.
5493