]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/ChangeLog.graphite
2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
[thirdparty/gcc.git] / gcc / ChangeLog.graphite
CommitLineData
39251a91 12009-09-01 Sebastian Pop <sebastian.pop@amd.com>
2
3 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
4 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
5
7723692a 62009-09-01 Sebastian Pop <sebastian.pop@amd.com>
7
8 * tree-scalar-evolution.c (instantiate_scev_convert): New.
9 (instantiate_scev_1): Move code in instantiate_scev_convert.
10
5a10dfba 112009-09-01 Sebastian Pop <sebastian.pop@amd.com>
12
13 * tree-scalar-evolution.c (instantiate_scev_binary): New.
14 (instantiate_scev_1): Move code in instantiate_scev_binary.
15
0731d869 162009-09-01 Sebastian Pop <sebastian.pop@amd.com>
17
18 * tree-scalar-evolution.c (instantiate_scev_name): New.
19 (instantiate_scev_1): Move code in instantiate_scev_name.
20
212009-08-28 Sebastian Pop <sebastian.pop@amd.com>
22
23 * Merge from mainline (150992:151171).
24
9e3531b5 252009-08-25 Sebastian Pop <sebastian.pop@amd.com>
26
27 * graphite-dependences.c (graphite_legal_transform_bb): Call
28 pbb_remove_duplicate_pdrs.
29 * graphite-poly.c (can_collapse_pdr): Removed.
30 (pdr_find_duplicate): Removed.
31 (can_collapse_pdrs): New.
32 (pbb_remove_duplicate_pdrs): New.
33 (new_poly_dr): Do not look for duplicates.
34 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
35 (PBB_PDR_DUPLICATES_REMOVED): New.
36 (pbb_remove_duplicate_pdrs): Declared.
37
11b2102e 382009-08-25 Sebastian Pop <sebastian.pop@amd.com>
39
40 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
41 the strides by multiplying by PDR_NB_REFS.
42 * graphite-poly.c (can_collapse_pdr): New.
43 (pdr_find_duplicate): New.
44 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
45 Initialize PDR_NB_REFS.
46 * graphite-poly.h (struct poly_dr): Add field nb_refs.
47 (PDR_NB_REFS): New.
48 (new_poly_dr): Number of subscripts is a graphite_dim_t.
49
502009-08-25 Sebastian Pop <sebastian.pop@amd.com>
51
52 Revert one of the previous commits:
53 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
54 the computation of symmetric data dependence relations.
55 (dependency_between_pbbs_p): Same.
56
d0aaf399 572009-08-25 Sebastian Pop <sebastian.pop@amd.com>
58
59 PR middle-end/40965
60 * graphite-poly.c (apply_poly_transforms): Remove legality test before
61 any transform.
62
79698ff3 632009-08-25 Sebastian Pop <sebastian.pop@amd.com>
64
65 * graphite-dependences.c (pddr_original_scattering): Return NULL
66 for read-read dependence relations.
67 * graphite-poly.h (enum poly_dr_type): Fix comment.
68 (pdr_read_p): New.
69 (pdr_write_p): New.
70 (pdr_may_write_p): New.
71
c04f2da7 722009-08-25 Sebastian Pop <sebastian.pop@amd.com>
73
74 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
75 (struct poly_dr): Same.
76 (new_poly_dr): Same.
77 * graphite-poly.c (new_poly_dr): Same.
78
ee0d08ad 792009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
80 Sebastian Pop <sebastian.pop@amd.com>
81
82 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
83 pbb_strip_mine_time_depth. Changed the implementation so that
84 transformation is expressed as a transformation on
85 time (scatttering) dimensions. Also, ensures that the 2d+1
86 scheduling format is preserved.
87 (pbb_strip_mine_profitable_p): Profitability is based on the
88 iteration number of a given time (scattering) dimension,
89 and not on a original loop depth dimension.
90 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
91 (pbb_do_strip_mine): Call psct_dynamic_dim.
92 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
93 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
94 (pbb_nb_dynamic_scattering_transform): New.
95 (psct_dynamic_dim): New.
96
55c54afb 972009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
98
99 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
100 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
101 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
102 * graphite-interchange.c (build_linearized_memory_access): Same.
103 (memory_stride_in_loop): Same.
104
96b6d5d7 1052009-08-25 Sebastian Pop <sebastian.pop@amd.com>
106
107 * graphite-dependences.c (pddr_original_scattering): New.
108 (graphite_legal_transform_dr): Call pddr_original_scattering.
109 (dot_deps_1): New.
110 (dot_deps): New.
111 * graphite-dependences.h (dot_deps): Declared.
112 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
113 (print_pdr): Print PDR_ID.
114 * graphite-poly.h (struct poly_dr): Add field id.
115 (PDR_ID): New.
116 (pbb_index): New.
117 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
118
2b3a572c 1192009-08-22 Sebastian Pop <sebastian.pop@amd.com>
120
121 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
122 not delete the original dependence relation.
123
1242009-08-21 Sebastian Pop <sebastian.pop@amd.com>
125
126 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
127 the computation of symmetric data dependence relations.
128 (dependency_between_pbbs_p): Same.
129
0d6b5db2 1302009-08-21 Sebastian Pop <sebastian.pop@amd.com>
131
132 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
133 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
134 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
135 (free_poly_ddr): New.
136 (pddr_is_empty): New.
137 (dependence_polyhedron_1): Now returns a poly_ddr_p.
138 (dependence_polyhedron): Same. Remove useless gcc_assert.
139 Remove fprintfs.
140 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
141 (graphite_carried_dependence_level_k): Call pddr_is_empty.
142 * graphite-dependences.h (enum poly_dependence_kind): New.
143 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
144 (PDRP_SOURCE): Renamed PDDR_SOURCE.
145 (PDRP_SINK): Renamed PDDR_SINK.
146 (PDRP_DDP): Renamed PDDR_DDP.
147 (PDDR_KIND): New.
148 (free_poly_ddr): Declared.
149 * graphite-poly.c (new_scop): Use the new hash function names.
150 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
151 into original_pddrs.
152 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
153
1542009-08-21 Sebastian Pop <sebastian.pop@amd.com>
155
156 * Merge from mainline (150764:150992).
157
02df46c6 1582009-08-18 Sebastian Pop <sebastian.pop@amd.com>
159
160 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
161 bounds with LT_EXPR to make niter analysis more precise on code
162 generated by Graphite.
163
70a1a7a2 1642009-08-18 Sebastian Pop <sebastian.pop@amd.com>
165
166 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
167 (graphite_legal_transform_bb): Same.
168 (poly_drs_may_alias_p): Same.
169
19eec579 1702009-08-15 Sebastian Pop <sebastian.pop@amd.com>
171
172 PR middle-end/40981
173 * graphite-ppl.c (ppl_max_for_le): Correct the use of
174 ppl_Pointset_Powerset_C_Polyhedron_maximize.
175
1762009-08-13 Sebastian Pop <sebastian.pop@amd.com>
177
178 * graphite-poly.c (print_pbb): Print PBB index.
179
1802009-08-13 Sebastian Pop <sebastian.pop@amd.com>
181
182 * Merge from mainline (r150672:150764).
183
1842009-08-13 Sebastian Pop <sebastian.pop@amd.com>
185
186 * graphite-interchange.c (ppl_max_for_le): Moved...
187 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
188 * graphite-ppl.c (ppl_max_for_le): ... here.
189 * graphite-ppl.h (ppl_max_for_le): Declared.
190
1912009-08-12 Sebastian Pop <sebastian.pop@amd.com>
192
193 * Merge from mainline (r150372:150672).
194
43f8b6ab 1952009-08-11 Sebastian Pop <sebastian.pop@amd.com>
196
197 PR middle-end/40980
198 * sese.c (convert_for_phi_arg): New.
199 (add_guard_exit_phis): Use convert_for_phi_arg.
200
201 * testsuite/gfortran.dg/graphite/id-17.f: New.
202
96da1999 2032009-08-11 Sebastian Pop <sebastian.pop@amd.com>
204
205 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
206 unknown subscript upper bounds.
207
208 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
209
80020e9d 2102009-08-11 Sebastian Pop <sebastian.pop@amd.com>
211 Pranav Garg <pranav.garg2107@gmail.com>
212
213 * graphite-interchange.c (gather_access_strides): Removed.
214 (ppl_max_for_le): New.
215 (build_linearized_memory_access): New.
216 (memory_stride_in_loop): New.
217 (pbb_interchange_profitable_p): Reimplemented.
218 * graphite-ppl.h (ppl_new_id_map): New.
219 (ppl_interchange): New.
220
221 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
222
c9fce634 2232009-08-11 Sebastian Pop <sebastian.pop@amd.com>
224
225 * graphite-interchange.c (compute_subscript): Removed.
226 (compute_array_size_cstr): Removed.
227 (compute_array_size_poly): Removed.
228 (compute_array_size): Removed.
229 (gather_access_strides_poly): Removed.
230 (gather_access_strides): Empty.
231
85f74b79 2322009-08-11 Sebastian Pop <sebastian.pop@amd.com>
233
234 * graphite-dependences.c (dependence_polyhedron_1): Replace
235 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
236 (graphite_legal_transform_dr): Same.
237 (graphite_carried_dependence_level_k): Same.
238 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
239 Initialize PDR_NB_SUBSCRIPTS.
240 (print_pdr_access_layout): Replace pdr_nb_subscripts with
241 PDR_NB_SUBSCRIPTS.
242 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
243 (PDR_NB_SUBSCRIPTS): New.
244 (pdr_nb_subscripts): Removed.
245 (pdr_dim): Simplified.
246 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
247 with PDR_NB_SUBSCRIPTS.
248
19b42529 2492009-08-11 Sebastian Pop <sebastian.pop@amd.com>
250
251 * graphite-interchange.c (compute_array_size): Remove use of
252 PDR_DATA_CONTAINER.
253 * graphite-poly.c (new_poly_dr): Remove argument data_container.
254 Do not initialize PDR_DATA_CONTAINER.
255 (print_pdr): Do not print PDR_DATA_CONTAINER.
256 * graphite-poly.h (struct poly_dr): Remove data_container field.
257 (PDR_DATA_CONTAINER): Removed.
258 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
259 PDR_DATA_CONTAINER.
260 (build_poly_dr): Same.
261
9daa8810 2622009-08-11 Sebastian Pop <sebastian.pop@amd.com>
263
264 * testsuite/gcc.dg/graphite/interchange-9.c: New.
265
0835eab6 2662009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
267 Sebastian Pop <sebastian.pop@amd.com>
268
269 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
270 copy of the dependence polyhedron. Free the temporary objects.
271 (graphite_carried_dependence_level_k): Free unused objects before
272 returning.
273
274 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
275 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
276 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
277 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
278 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
279
a741358d 2802009-08-05 Sebastian Pop <sebastian.pop@amd.com>
281
282 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
283 Early return without analyzing the data dependences if no
284 transform has been done. Call restore_scattering if the transform
285 is not legal.
286 (graphite-interchange.c): Same.
287 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
288 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
289 (apply_poly_transforms): Do not gcc_assert that
290 the transform is legal.
291 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
292 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
293 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
294 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
295 * graphite-poly.h (struct poly_scattering): New.
296 (struct poly_bb): Add original, transformed, and saved fields.
297 Remove transformed_scattering, original_scattering, nb_local_variables,
298 and nb_scattering_transform fields.
299 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
300 (poly_scattering_new): New.
301 (poly_scattering_free): New.
302 (poly_scattering_copy): New.
303 (store_scattering_pbb): New.
304 (store_scattering): New.
305 (restore_scattering_pbb): New.
306 (restore_scattering): New.
307 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
308 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
9daa8810 309
95b2e0d3 3102009-08-05 Sebastian Pop <sebastian.pop@amd.com>
311
312 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
313 (print_scop): Same.
314
675d86b2 3152009-08-05 Sebastian Pop <sebastian.pop@amd.com>
316
317 * Makefile.in (graphite.o): Depends on PREDICT_H.
318 * graphite.c: Include predict.h.
319 (graphite_finalize): Call tree_estimate_probability.
320 * predict.c (predict_loops): Do not call scev_initialize and
321 scev_finalize.
322 (tree_estimate_probability_bb): New.
323 (tree_estimate_probability): Do not initialize loops: move that
324 code to the driver. Call tree_estimate_probability_bb.
325 (tree_estimate_probability_driver): New.
326 (pass_profile): Use tree_estimate_probability_driver.
327 * predict.h (tree_estimate_probability): Declared.
328
525c22c4 3292009-08-05 Sebastian Pop <sebastian.pop@amd.com>
330
331 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
332 * graphite-dependences.c (graphite_legal_transform): Add time to
333 TV_GRAPHITE_DATA_DEPS.
334 (dependency_between_pbbs_p): Same.
335 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
336
3372009-08-03 Sebastian Pop <sebastian.pop@amd.com>
338
339 * Merge from mainline (r149952:150372).
340
c6bb733d 3412009-07-28 Sebastian Pop <sebastian.pop@amd.com>
342
343 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
344 * graphite-blocking.c: Same.
345 * graphite-clast-to-gimple.c: Same.
346 * graphite-dependences.c: Same.
347 * graphite-poly.c: Same.
348 * graphite-poly.h: Same.
349 * graphite-ppl.c: Same.
350 * graphite-scop-detection.c: Same.
351 * graphite-sese-to-poly.c: Same.
352 * graphite.c: Same.
353
3542009-07-28 Sebastian Pop <sebastian.pop@amd.com>
355
356 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
357 (remove_simple_copy_phi): New.
358 (remove_invariant_phi): New.
359 (simple_copy_phi_p): New.
360 (reduction_phi_p): New.
361 (gsi_for_ssa_name_def): New.
362 (insert_out_of_ssa_copy): New.
363 (insert_out_of_ssa_copy_on_edge): New.
364 (create_zero_dim_array): New.
365 (scalar_close_phi_node_p): New.
366 (rewrite_close_phi_out_of_ssa): New.
367 (rewrite_phi_out_of_ssa): New.
368 (rewrite_reductions_out_of_ssa): New.
369 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
370
371 * testsuite/gcc.dg/graphite/id-11.c: New.
372 * testsuite/gcc.dg/graphite/id-15.c: New.
373 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
374 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
375 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
376 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
377 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
378 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
379 * testsuite/gfortran.dg/graphite/id-13.f: New.
380 * testsuite/gfortran.dg/graphite/id-5.f: New.
381
3822009-07-28 Sebastian Pop <sebastian.pop@amd.com>
383
384 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
385 check that nb_reductions_in_loop is zero.
386 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
387 reduction phi nodes.
388 (nb_reductions_in_loop): Removed.
389 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
390 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
391 (bb_contains_non_iv_scalar_phi_nodes): Removed.
392 (scop_contains_non_iv_scalar_phi_nodes): Removed.
393 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
394
3952009-07-28 Sebastian Pop <sebastian.pop@amd.com>
396
397 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
398 statements that have an empty iteration domain.
399 * testsuite/gfortran.dg/graphite/id-16.f: New.
400
4012009-07-28 Sebastian Pop <sebastian.pop@amd.com>
402
403 * tree-scalar-evolution.c (instantiate_scev_1): Return
404 chrec_dont_know when the result is not above instantiate_below.
405 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
406 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
407 the tree has a known scalar evolution.
408 * testsuite/gfortran.dg/graphite/id-14.f: New.
409 * testsuite/gfortran.dg/graphite/id-15.f: New.
410
4112009-07-28 Sebastian Pop <sebastian.pop@amd.com>
412
413 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
414 insert_gsi.
415 (rename_variables): Keep inserting renames after the ones already
416 inserted.
417
4182009-07-28 Sebastian Pop <sebastian.pop@amd.com>
419
420 * graphite-sese-to-poly.c (compare_bb_depths): New.
421 (graphite_sort_dominated_info): New.
422 (build_scop_bbs_1): Call graphite_sort_dominated_info.
423 (build_scop_scattering): Fix comment.
424
4252009-07-28 Sebastian Pop <sebastian.pop@amd.com>
426
427 * graphite.c (graphite_finalize): Call print_loops instead of
428 dump_function_to_file.
429 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
430 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
431 loops generated in the graphite output file.
432 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
433 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
434 * testsuite/gfortran.dg/graphite/id-12.f: New.
435
4362009-07-24 Li Feng <nemokingdom@gmail.com>
437
438 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
439 Remove 2 XFAIL.
440
4412009-07-24 Li Feng <nemokingdom@gmail.com>
442 Tobias Grosser <grosser@fim.uni-passau.de>
443
444 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
445 alias set number build alias in ACCESSES polyhedron.
446 (build_alias_set_for_drs): New.
447 (build_pbb_drs): Added build_alias_set_for_drs.
448 * graphite-dependences.c (poly_drs_may_alias_p): New.
449 (graphite_carried_dependence_level_k): Check alias information
450 before building polyhedron.
451
4522009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
453
454 * Makefile.in (lambda-code.o): Fix formatting.
455
4562009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
457
458 * Merge from mainline (r149350-149952)
459
4602009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
461
462 * graphite-poly.c (apply_poly_transforms): Move strip_mine
463 before interchange to prepare for loop blocking.
464
4652009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
466
467 * graphite-poly.c (apply_poly_transforms): Add checks after every
468 transformation.
469 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
470 done in apply_poly_transforms.
471
4722009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
473
474 * graphite-dependences.c (build_lexicographically_gt_constraint):
475 Replace RES parameter with *RES.
476 (dependence_polyhedron_1): Pass an address of the parameter RES
477 instead of value of RES.
478
4792009-07-16 Sebastian Pop <sebastian.pop@amd.com>
480
481 * graphite.c (graphite_finalize): Fix comment.
482 (graphite_transform_loops): Reset scev info after code generation
483 of each scop.
484
4852009-07-16 Sebastian Pop <sebastian.pop@amd.com>
486
487 * graphite.c (graphite_finalize): Call scev_reset.
488
4892009-07-16 Sebastian Pop <sebastian.pop@amd.com>
490
491 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
492 GBB_CLOOG_IV_TYPES hash table twice.
493 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
494 (add_condition_to_domain): Clear GMP values.
495
4962009-07-16 Sebastian Pop <sebastian.pop@amd.com>
497
498 * graphite-dependences.c: Fix formatting.
499 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
500 (pbb_number_of_iterations): Free ppl_Linear_Expression.
501 * graphite-sese-to-poly.c: Fix formatting.
502 * graphite.c (graphite_transform_loops): Create the hash table
503 after the early return.
504
5052009-07-16 Sebastian Pop <sebastian.pop@amd.com>
506
507 * testsuite/gcc.dg/graphite/id-14.c: New.
508 * testsuite/gcc.dg/graphite/pr40157.c: New.
509 * testsuite/gfortran.dg/graphite/id-11.f: New.
510
5112009-07-16 Sebastian Pop <sebastian.pop@amd.com>
512
513 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
514 (build_poly_scop): Return false when there are no pbbs within
515 loops to avoid to pass to cloog scops with no loops.
516
5172009-07-16 Sebastian Pop <sebastian.pop@amd.com>
518
519 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
520 useless test "i % 2".
521 (build_pbb_scattering_polyhedrons): Fix formatting.
522 (build_poly_dr): Same.
523 * graphite.c (graphite_transform_loops): Restructure.
524
5252009-07-14 Razya Ladelsky <razya@il.ibm.com>
526
527 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
528 reduction_list parameter.
529 (rewrite_all_phi_nodes_with_iv): Same.
530 (canonicalize_loop_ivs): Same.
531 * tree-parloops.c (struct brli): Removed.
532 (build_reduction_list_info): Removed.
533 (build_new_reduction): New.
534 (analyze_reduction_list): Removed.
535 (gather_scalar_reductions): Find reductions instead of phi
536 nodes that can't be canonicalized.
537 (try_create_reduction_list): Remove reduction_list parameter.
538 (gen_parallel_loop): Same.
539 (parallelize_loops): Remove analyze_reductions variable,
540 initialization and free.
541 Change reduction_list htab initialization to reduction_info
542 elements instead of ssa names.
543 Call try_create_reduction_list and gen_parallel_loop without
544 analyzed_reduction argument.
545 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
546 canonicalize_loop_ivs with one less argument.
547 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
548
5492009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
550
551 * graphite-dependences.c (new_poly_dr_pair): New.
552 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
553 (new_poly_dr_pair): New.
554 (eq_poly_dr_pair_p): New.
555 (hash_poly_dr_pair_p): New.
556 * graphite-dependences.h (struct poly_dr_pair): New.
557 (eq_poly_dr_pair_p): Declared.
558 (hash_poly_dr_pair_p): Declared.
559 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
560 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
561 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
562 * Makefile.in (graphite-poly.o): Add dependence on
563 graphite-dependences.h.
564
5652009-07-14 Sebastian Pop <sebastian.pop@amd.com>
566
567 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
568 polynomials of degree > 1 pass to Graphite.
569 * tree-chrec.c (scev_is_linear_expression): Call
570 evolution_function_is_affine_multivariate_p.
571 * testsuite/gfortran.dg/graphite/id-10.f90: New.
572
5732009-07-14 Sebastian Pop <sebastian.pop@amd.com>
574
575 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
576 Instantiate scevs varying in outer loops.
577 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
578
5792009-07-14 Sebastian Pop <sebastian.pop@amd.com>
580
581 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
582 redundant constraint.
583
5842009-07-14 Sebastian Pop <sebastian.pop@amd.com>
585
586 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
587 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
588 based on the file names as in the C testsuite.
589 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
590 * testsuite/gfortran.dg/graphite/block-2.f: Same.
591 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
592 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
593 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
594 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
595 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
596 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
597 * testsuite/gfortran.dg/graphite/id-6.f: Same.
598 * testsuite/gfortran.dg/graphite/id-9.f: Same.
599 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
600 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
601 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
602
6032009-07-14 Sebastian Pop <sebastian.pop@amd.com>
604
605 * sese.c (expand_scalar_variables_call): New.
606 (expand_scalar_variables_ssa_name): Handle calls in expander.
607
6082009-07-13 Sebastian Pop <sebastian.pop@amd.com>
609
610 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
611 Expect to see the pattern twice.
612 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
613 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
614 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
615
6162009-07-13 Sebastian Pop <sebastian.pop@amd.com>
617
618 * testsuite/gcc.dg/graphite/id-10.c: New.
619 * testsuite/gcc.dg/graphite/id-12.c: New.
620 * testsuite/gfortran.dg/graphite/id-7.f: New.
621 * testsuite/gfortran.dg/graphite/id-8.f: New.
622
6232009-07-13 Sebastian Pop <sebastian.pop@amd.com>
624
625 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
626 zero.
627
6282009-07-13 Sebastian Pop <sebastian.pop@amd.com>
629
630 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
631
6322009-07-13 Sebastian Pop <sebastian.pop@amd.com>
633
634 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
635
6362009-07-10 Sebastian Pop <sebastian.pop@amd.com>
637
638 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
639 building PDR subscripts.
640
6412009-07-10 Sebastian Pop <sebastian.pop@amd.com>
642
643 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
644 computation of array sizes.
645
6462009-07-10 Sebastian Pop <sebastian.pop@amd.com>
647
648 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
649
6502009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
651
652 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
653 build_pairwise_constraint, dr_equality_constraints,
654 build_pairwise_scheduling_equality,
655 build_pairwise_scheduling_inequality, lexicographically_gt_p,
656 build_lexicographically_gt_constraint, dependence_polyhedron,
657 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
658 Move from NNC_Polyhedron to C_Polyhedron.
659 * graphite-interchange.c (compute_array_size_poly,
660 gather_access_strides): Dito.
661 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
662 free_scop, pbb_number_of_iterations): Dito.
663 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
664 pbb_dim_iter_domain, struct scop): Dito.
665 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
666 new_Cloog_Domain_from_ppl_Polyhedron,
667 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
668 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
669 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
670 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
671 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
672 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
673 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
674 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
675 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
676 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
677 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
678 build_scop_iteration_domain, build_poly_dr): Dito
679
6802009-07-09 Sebastian Pop <sebastian.pop@amd.com>
681
682 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
683 run-id-*.c files.
684 * testsuite/gcc.dg/graphite/run-id-1.c: New.
685
6862009-07-09 Sebastian Pop <sebastian.pop@amd.com>
687
688 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
689 positivity constraint on the symbolic number of iterations.
690
6912009-07-09 Sebastian Pop <sebastian.pop@amd.com>
692
693 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
694
6952009-07-09 Sebastian Pop <sebastian.pop@amd.com>
696 Tobias Grosser <grosser@fim.uni-passau.de>
697
698 * graphite-clast-to-gimple.c (build_scop_context): Removed.
699 (build_cloog_prog): Directly use SCOP_CONTEXT.
700 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
701 (free_scop): Free SCOP_CONTEXT.
702 (print_scop_context): New.
703 (print_scop): Call print_scop_context.
704 (debug_scop_context): New.
705 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
706 (struct scop): Added field context.
707 (SCOP_CONTEXT): New.
708 * graphite-sese-to-poly.c (add_param_constraints): New.
709 (build_scop_context): New.
710 (build_poly_scop): Call build_scop_context.
711
7122009-07-09 Sebastian Pop <sebastian.pop@amd.com>
713
714 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
715 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
716 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
717 * graphite-ppl.h: Include double-int.h and tree.h.
718 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
719 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
720 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
721 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
722
7232009-07-09 Sebastian Pop <sebastian.pop@amd.com>
724
725 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
726 POINTER_PLUS_EXPR for pointer types.
727 (clast_to_gcc_expression): Same.
728
7292009-07-09 Sebastian Pop <sebastian.pop@amd.com>
730
731 * graphite-poly.c (print_scattering_function): Early return when
732 PBB_TRANSFORMED_SCATTERING is not initialized.
733 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
734
7352009-07-08 Sebastian Pop <sebastian.pop@amd.com>
736
737 * tree-parloops.c (analyze_reduction_list): Remove unused variable
738 to fix bootstrap.
739
7402009-07-08 Razya Ladelsky <razya@il.ibm.com>
741
742 * tree-parloops.c (analyze_reduction_list): Change return
743 value to void.
744 (try_create_reduction_list): Move the call to
745 analyze_reduction_list to the beginining.
746 Call reduction_phi with analyzed_reductions as argument
747 instead of reduction_list.
748
7492009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
750
751 * Merge from mainline (r148296:149346)
752
7532009-07-07 Sebastian Pop <sebastian.pop@amd.com>
754
755 * graphite-scop-detection.c (graphite_can_represent_init): New.
756 (graphite_can_represent_scev): Call graphite_can_represent_init:
757 check that the initial value does not contain multiplications of
758 parameters.
759 (stmt_has_simple_data_refs_p): New.
760 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
761 (is_simple_operand): Fix formatting.
762 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
763
7642009-07-07 Sebastian Pop <sebastian.pop@amd.com>
765
766 * testsuite/gcc.dg/graphite/id-13.c: New.
767 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
768 analyze_scalar_evolution, use scalar_evolution_in_region.
769 (scan_tree_for_params_right_scev): Add extra assert.
770 (parameter_index_in_region_1): Split from parameter_index_in_region.
771 (idx_record_params): Use scalar_evolution_in_region.
772 (find_params_in_bb): Same.
773 (find_scop_parameters): Same.
774 (build_loop_iteration_domains): Same.
775 (create_linear_expr_from_tree): Same.
776 * sese.c (scalar_evolution_in_region): New.
777 * sese.h (scalar_evolution_in_region): Declared.
778 (defined_in_sese_p): New.
779 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
780 static anymore.
781 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
782 Declared.
783
7842009-07-07 Sebastian Pop <sebastian.pop@amd.com>
785
786 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
787 TREE_DATA_REF_H also implies SCEV_H.
788
7892009-07-07 Sebastian Pop <sebastian.pop@amd.com>
790
791 * graphite-poly.c (print_scop_params): New.
792 (print_scop): Call print_scop_params.
793 (debug_scop_params): New.
794 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
795
7962009-07-07 Li Feng <nemokingdom@gmail.com>
797
798 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
799 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
800 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
801 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
802 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
803 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
804
8052009-07-07 Li Feng <nemokingdom@gmail.com>
806
807 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
808 for dependency checking part.
809 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
810 tests for dependency checking.
811 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
812 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
813 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
814 flag -fdump-tree-graphite-all for autopar testsuites.
815
8162009-07-06 Sebastian Pop <sebastian.pop@amd.com>
817
818 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
819 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
820 canonicalize_loop_ivs): Moved...
821 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
822
8232009-07-06 Sebastian Pop <sebastian.pop@amd.com>
824
825 * tree-parloops.c (try_create_reduction_list): Pass an extra
826 argument analyzed_reductions. Call analyze_reduction_list.
827 (gen_parallel_loop): Do not call analyze_reduction_list.
828 (parallelize_loops): Init and finalize analyzed_reductions.
829
8302009-07-06 Li Feng <nemokingdom@gmail.com>
831
832 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
833 Added flag -fno-loop-strip-mine for autopar testcase.
834
8352009-07-04 Li Feng <nemokingdom@gmail.com>
836
837 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
838 transformed scattering dimension instead of unmatch orignal when
839 calling dependence_polyhedron.
840
8412009-06-30 Sebastian Pop <sebastian.pop@amd.com>
842
843 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
844
8452009-06-30 Sebastian Pop <sebastian.pop@amd.com>
846
847 * graphite-poly.c (pbb_number_of_iterations): Check for returned
848 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
849
8502009-06-30 Sebastian Pop <sebastian.pop@amd.com>
851
852 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
853 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
854 * graphite-poly.c (pbb_number_of_iterations): New.
855 * graphite-poly.h (pbb_number_of_iterations): Declared.
856 (pbb_iterator_dim, pbb_parameter_dim): New.
857
8582009-06-29 Sebastian Pop <sebastian.pop@amd.com>
859
860 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
861 last commit on type of lower and upper bound of loops.
862
8632009-06-29 Li Feng <nemokingdom@gmail.com>
864
865 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
866 graphite-dependences.h.
867 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
868 (mark_bb_with_pbb): New.
869 (get_stmtfor_depth): New.
870 (find_pbb_via_hash): New.
871 (dependency_in_loop_p): New.
872 (mark_loops_parallel): New.
873 (free_aux_in_new_loops): New.
874 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
875 bb with it's relevant pbb. Mark newly created loops. Remove mark
876 innermost loop parallel without checking.
877 (gloog): Add parameter BB_PBB_MAPPING.
878 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
879 (gloog): Change declaration.
880 (mark_loop_parallel): Make extern.
881 (free_aux_in_new_loops): Declare.
882 (bb_pbb_map_hash): New.
883 (eq_bb_pbb_map): New.
884 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
885 auto parallelization when flag_graphite_force_parallel is set.
886 (graphite_finalize): Added free_aux_in_new_loops.
887 * tree-parloops.c (parallelize_loops): Only generate parallel code for
888 the innermost loop that marked parallel. Use
889 flag_graphite_force_parallel instead of loop->can_be_parallel.
890 (loop_parallel_p): Move inner most checking out of function.
891
8922009-06-26 Sebastian Pop <sebastian.pop@amd.com>
893
894 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
895 type of lower and upper bound of loops signed long int.
896
8972009-06-26 Sebastian Pop <sebastian.pop@amd.com>
898
899 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
900 expression outside the loop.
901
9022009-06-26 Sebastian Pop <sebastian.pop@amd.com>
903
904 * gcc.dg/graphite/interchange-8.c: New.
905
9062009-06-26 Sebastian Pop <sebastian.pop@amd.com>
907
908 * gcc.dg/graphite/interchange-0.c: XFailed.
909 * gcc.dg/graphite/interchange-5.c: XFailed.
910 * gcc.dg/graphite/interchange-6.c: XFailed.
911
9122009-06-26 Sebastian Pop <sebastian.pop@amd.com>
913
914 * graphite-interchange.c (compute_array_size_poly): The end of the
915 recursion should return 1.
916
9172009-06-26 Sebastian Pop <sebastian.pop@amd.com>
918
919 * graphite-interchange.c (compute_array_size_cstr): Allow the
920 subscript multiplier to be -1.
921 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
922 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
923 data_container. Initializes PDR_DATA_CONTAINER.
924 (print_pdr_access_layout): New.
925 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
926 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
927 data_container.
928 (PDR_DATA_CONTAINER): New.
929 (new_poly_dr): Update declaration.
930 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
931 (build_poly_dr): Call pdr_add_data_dimensions.
932
9332009-06-26 Sebastian Pop <sebastian.pop@amd.com>
934
935 * graphite-poly.h (struct poly_dr): Fix comment.
936 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
937 (pdr_add_memory_accesses): New.
938 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
939
9402009-06-26 Sebastian Pop <sebastian.pop@amd.com>
941
942 * graphite-poly.c (print_pdrs, debug_pdrs): New.
943 (print_pbb): Add call to print_pdrs.
944 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
945
9462009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
947 Li Feng <nemokingdom@gmail.com>
948
949 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
950 (dependency_between_pbbs_p): New.
951 (lexicographically_gt_p): Assure !empty_p before polyhedron
952 intersection assign.
953 (build_lexicographically_gt_constraint): Correct lexicographically
954 judging.
955 * graphite-dependences.h: New.
956 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
957
9582009-06-24 Sebastian Pop <sebastian.pop@amd.com>
959
960 * graphite-clast-to-gimple.c (print_clast_stmt): New.
961 (gloog): Print to dump_file the generated clast.
962 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
963 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
964
9652009-06-24 Sebastian Pop <sebastian.pop@amd.com>
966
967 * graphite-poly.c (extend_scattering): Increment
968 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
969
9702009-06-24 Sebastian Pop <sebastian.pop@amd.com>
971
972 * graphite-interchange.c (compute_array_size_poly): Added exit of
973 recursion condition. Continue iterating even after the first equality.
974 (compute_array_size): Same.
975
9762009-06-24 Li Feng <nemokingdom@gmail.com>
977
978 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
979 -fdump-tree-final_cleanup to -fdump-tree-optimized.
980 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
981 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
982 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
983
9842009-06-23 Sebastian Pop <sebastian.pop@amd.com>
985
986 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
987 only when the use verifies is_gimple_reg.
988
9892009-06-23 Sebastian Pop <sebastian.pop@amd.com>
990
991 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
992 Allocate scaldims after call to unify_scattering_dimensions.
993
9942009-06-23 Sebastian Pop <sebastian.pop@amd.com>
995
996 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
997
9982009-06-23 Sebastian Pop <sebastian.pop@amd.com>
999 Albert Cohen <albert.cohen@inria.fr>
1000
1001 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1002 variables for the strip mining.
1003
10042009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1005 Pranav Garg <pranav.garg2107@gmail.com>
1006
1007 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1008 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1009 (graphite-blocking.o): New rule.
1010 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1011 * graphite-blocking.c: New.
1012 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1013 flag_loop_strip_mine.
1014 (psct_scattering_dim_for_loop_depth): New.
1015 * graphite-poly.h (scop_do_strip_mine): Declared.
1016 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1017 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1018 flag_loop_strip_mine.
1019
10202009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1021
1022 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1023 a GMP value and a PPL coefficient at each iteration of a loop.
1024
10252009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1026
1027 * graphite-dependences.c (dependence_polyhedron): Do not use
1028 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1029 pbb_nb_scattering_transform.
1030 (graphite_legal_transform_dr): Same.
1031 * graphite-poly.c (extend_scattering): Same.
1032 (unify_scattering_dimensions): Same.
1033 (print_scattering_function): Same.
1034 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1035 PBB_NB_LOCAL_VARIABLES.
1036 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1037 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1038 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1039 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1040 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1041 (pbb_nb_scattering_transform): New.
1042 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1043 (psco_scattering_dim): Add assert on parameters.
1044 (psct_scattering_dim): Same.
1045 (psct_scattering_dim_for_loop_depth): Declared.
1046 (psct_local_var_dim): New.
1047 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1048 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1049 correct layout, call pbb_nb_local_vars.
1050 (psct_add_local_variable, psct_add_scattering_dimension): New.
1051 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1052 Initialize PBB_NB_SCATTERING_TRANSFORM.
1053
10542009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1055
1056 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1057 (set_coef): Renamed ppl_set_coef.
1058 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1059
10602009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1061
1062 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1063 test a boolean against 1.
1064 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1065 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1066 (pbb_do_interchange): Returns true when a transform has been performed.
1067 (scop_do_interchange): Same.
1068 * graphite-poly.c (apply_poly_transforms): Use the return value of
1069 scop_do_interchange.
1070 * graphite-poly.h (scop_do_interchange): Update declaration.
1071
10722009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1073
1074 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1075 after last use.
1076 * sese.c (sese_reset_aux_in_loops): New.
1077 * sese.h (sese_reset_aux_in_loops): New.
1078
10792009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1080
1081 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1082 multiplier and multiply the constant by the multiplier.
1083 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1084 (build_poly_dr): Do not use the multiplier to define the subscript.
1085
10862009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1087
1088 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1089 compiler's data reference. Initialize PDR_CDR.
1090 (print_pdr): Call dump_data_reference.
1091 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1092 Add compiler_dr field.
1093 (PDR_BB): Renamed PDR_PBB.
1094 (PDR_CDR): New.
1095 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1096 GCC's data reference representation.
1097 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1098 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1099
11002009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1101
1102 * graphite-poly.c (print_scattering_function): Also print the layout.
1103 * graphite-poly.h (pbb_nb_local_vars): New.
1104
11052009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1106
1107 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1108
11092009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1110
1111 * graphite-poly.c (print_pdr, debug_pdr): New.
1112 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1113 (PDR_BASE): Removed.
1114
11152009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1116
1117 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1118 ltrans-{1..6,8}.c.
1119
11202009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1121
1122 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1123 subscript identification column.
1124 (pbb_do_interchange): Print to dump_file that some loops "will be
1125 interchanged". Rely on that chain of characters in the testcases.
1126 * gcc.dg/graphite/interchange-0.c: New.
1127 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1128 interchange-*.c files and compile them with -floop-interchange.
1129
11302009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1131
1132 * graphite-interchange.c (interchange_profitable_p): Renamed
1133 pbb_interchange_profitable_p.
1134
11352009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1136 Harsha Jagasia <harsha.jagasia@amd.com>
1137 Pranav Garg <pranav.garg2107@gmail.com>
1138
1139 * graphite-interchange.c (interchange_profitable_p): Make static.
1140 (pbb_interchange_loop_depths, pbb_do_interchange,
1141 scop_do_interchange): New.
1142 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1143 for flag_loop_interchange.
1144 * graphite-poly.h (scop_do_interchange): Declared.
1145 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1146 flag_loop_interchange is used.
1147
11482009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1149
1150 * graphite-dependences.c (dependence_polyhedron): Update use of
1151 pbb_nb_scattering_dims.
1152 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1153 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1154 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1155 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1156
11572009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1158
1159 * graphite.c: Cleanup foo.
1160
11612009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1162
1163 * Merge from mainline (r143684:148293).
1164 * Disabled libpcp until it gets fixed.
1165
11662009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1167 Harsha Jagasia <harsha.jagasia@amd.com>
1168
1169 * graphite-interchange.c: New.
1170 * Makefile.in (graphite-interchange.o): New.
1171 * graphite-poly.h (interchange_profitable_p): Declared.
1172 * graphite-ppl.h (value_max): New.
1173
11742009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1175
1176 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1177 * graphite-poly.h: Fix some comments.
1178 (pdr_dim): New.
1179 (pdr_scop): New.
1180
11812009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1182
1183 * graphite-poly.h
1184 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1185 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1186 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1187 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1188 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1189 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1190 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1191 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1192 * graphite-clast-to-gimple.c: Same.
1193 * graphite-dependences.c: Same.
1194 * graphite-poly.c: Same.
1195 * graphite-sese-to-poly.c: Same.
1196
11972009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1198
1199 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1200 expressions for an IV rename, as returned by clast_to_gcc_expression.
1201 (copy_renames): Rename new_name to expr.
1202 * sese.c (debug_rename_elt): Same.
1203 (get_rename): Same.
1204 (set_rename): Same.
1205 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1206 the information from the rename map.
1207 (rename_variables_in_stmt): Same.
1208 (add_loop_exit_phis): Rename new_name to expr.
1209 (insert_loop_close_phis): Same.
1210 (add_guard_exit_phis): Same. Call force_gimple_operand.
1211 * sese.h (struct rename_map_elt): Rename new_name to expr.
1212 (new_rename_map_elt): Same.
1213
12142009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1215
1216 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1217 * sese.c (set_rename): Make it extern.
1218 * sese.h (set_rename): Declared.
1219
12202009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1221
1222 * graphite-poly.c (extend_scattering): Free values.
1223 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1224 Free iterators.
1225 (ppl_print_powerset_matrix): Same.
1226 * graphite-scop-detection.c (free_scops_1): New.
1227 (limit_scops): Call free_scops_1.
1228 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1229 (build_poly_dr): Free PPL coefficients.
1230 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1231
12322009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1233
1234 * graphite-dependences.c: New.
1235 * graphite-data-ref.c: Removed.
1236 * graphite-data-ref.h: Removed.
1237 * Makefile.in (graphite-data-ref.o): Removed.
1238 (graphite-dependences.o): Added.
1239 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1240 * graphite-poly.c: Same.
1241 Move the data dependence testing to graphite-dependences.c.
1242
12432009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1244
1245 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1246 from graphite_cannot_represent_loop. Code refactored.
1247 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1248
12492009-05-17 Li Feng <nemokingdom@gmail.com>
1250
1251 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1252 Cover all the testcases (not only the filtered ones).
1253
12542009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1255
1256 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1257 unnecessary check. Update comments. Move check for REAL_TYPE here.
1258 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1259 done in (stmt_simple_for_scop_p).
1260
12612009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1262
1263 * graphite.c (print_global_statistics): New.
1264 (print_graphite_scop_statistic): New.
1265 (print_graphite_statistics): New.
1266 (graphite_initialize, graphite_transform_loops): Print statistics.
1267 * graphite-scop-detection (build_scops): Print statistics.
1268 (print_graphite_scop_statistics): New.
1269 (print_graphite_statistics): New.
1270
12712009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1272
1273 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1274 (debug_clast_name_index): Removed.
1275 (debug_clast_name_indexes_1): Removed.
1276 (debug_clast_name_indexes): Removed.
1277 (clast_name_index_elt_info): Removed.
1278 (eq_clast_name_indexes): Removed.
1279 (clast_name_to_index): Removed.
1280 (new_clast_name_index): Removed.
1281 (save_clast_name_index): Removed.
1282 (save_var_name): Moved...
1283 (init_sese_params_index): Removed.
1284 (clast_name_to_gcc): Remove use of name_tree.
1285 (initialize_cloog_names): Same.
1286 (gloog): Do not call init_sese_params_index.
1287 * graphite-sese-to-poly.c (save_var_name): ...here.
1288 (parameter_index_in_region): New.
1289 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1290 (parameter_index_in_region): Removed.
1291 (is_parameter): Remove use of name_tree.
1292 * sese.h (struct name_tree): Removed.
1293 (struct sese): Remove use of name_tree. New field params_names.
1294 (SESE_PARAMS_NAMES): New.
1295 (SESE_PARAMS): Remove duplicate.
1296 (parameter_index_in_region): Removed.
1297 (sese_nb_params): Remove use of name_tree.
1298 (struct clast_name_index): New.
1299 (new_clast_name_index): New.
1300 (clast_name_to_index): New.
1301 (save_clast_name_index): New.
1302 (debug_clast_name_index): New.
1303 (debug_clast_name_indexes_1): New.
1304 (debug_clast_name_indexes): New.
1305 (clast_name_index_elt_info): New.
1306 (eq_clast_name_indexes): New.
1307
13082009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1309
1310 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1311 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1312 (graphite_loop_normal_form): Do not pass region. Do not
1313 initialize SESE_OLDIVS.
1314 (build_graphite_loop_normal_form): Update call to
1315 graphite_loop_normal_form.
1316 * sese.c (debug_oldivs): Removed.
1317 (new_sese): Do not initialize SESE_OLDIVS.
1318 (free_sese): Do not free SESE_OLDIVS.
1319 (oldiv_for_loop): Removed.
1320 * sese.h (struct sese): Remove old_ivs.
1321 (SESE_OLDIVS): Removed.
1322 (oldiv_for_loop): Removed.
1323
13242009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1325
1326 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1327 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1328 replaced by a call to newivs_to_depth_to_newiv.
1329 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1330 (clast_to_gcc_expression_red): Same.
1331 (gcc_type_for_clast_expr): Same.
1332 (gcc_type_for_clast_eq): Same.
1333 (graphite_translate_clast_equation): Same.
1334 (graphite_create_guard_cond_expr): Same.
1335 (graphite_create_new_guard): Same.
1336 (graphite_create_new_loop): Same.
1337 (build_iv_mapping): Same.
1338 (translate_clast): Same.
1339 (gloog): Same.
1340 (loop_iv_stack_patch_for_consts): Removed. *
1341 sese.c (iv_stack_entry_is_constant): Removed.
1342 (iv_stack_entry_is_iv): Removed.
1343 (loop_iv_stack_push_iv): Removed.
1344 (loop_iv_stack_insert_constant): Removed.
1345 (loop_iv_stack_pop): Removed.
1346 (loop_iv_stack_get_iv): Removed.
1347 (loop_iv_stack_get_iv_from_name): Removed.
1348 (debug_loop_iv_stack): Removed.
1349 (free_loop_iv_stack): Removed.
1350 (loop_iv_stack_remove_constants): Removed. *
1351 sese.h (iv_stack_entry_kind): Removed.
1352 (iv_stack_entry_data_union): Removed.
1353 (iv_stack_entry_struct): Removed.
1354 (iv_stack_entry_p): Removed.
1355 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1356 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1357 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1358 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1359 (gbb_loop_at_index): Fix indenting.
1360 (gbb_loop_index): Removed.
1361
13622009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1363
1364 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1365 Call clast_name_to_index.
1366
13672009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1368
1369 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1370 do not pass params. Get params from SESE_PARAMS.
1371 (clast_to_gcc_expression): Same.
1372 (clast_to_gcc_expression_red): Same.
1373 (gcc_type_for_clast_eq): Same.
1374 (graphite_translate_clast_equation): Same.
1375 (graphite_create_new_loop): Same.
1376 * sese.c (rename_variables_in_stmt): Fix comment.
1377
13782009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1379
1380 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1381 newivs_index.
1382 Call save_clast_name_index.
1383 (translate_clast): Pass newivs_index.
1384 (gloog): Create and free newivs_index.
1385
13862009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1387
1388 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1389 (clast_name_index_p): New type.
1390 (debug_clast_name_index): New.
1391 (debug_clast_name_indexes_1): New.
1392 (debug_clast_name_indexes): New.
1393 (clast_name_index_elt_info): New.
1394 (eq_clast_name_indexes): New.
1395 (clast_name_to_index): New.
1396 (new_clast_name_index): New.
1397 (save_clast_name_index): New.
1398 (init_sese_params_index): New.
1399 (gloog): Call init_sese_params_index.
1400 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1401 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1402 (free_sese): Free SESE_PARAMS_INDEX.
1403 * sese.h (struct sese): Add params_index.
1404 (SESE_PARAMS_INDEX): New.
1405
14062009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1407
1408 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1409 (graphite_create_new_loop): Pass the newivs vector. Push the
1410 newly created IV to newivs.
1411 (translate_clast): Pass the newivs vector.
1412 (gloog): Create and destroy the newivs vector.
1413
14142009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1415
1416 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1417 (graphite_loop_normal_form): Initialize loop->aux with the unique
1418 IV that has been created.
1419
14202009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1421
1422 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1423 scev with parameters in the base part. They where forbidden
1424 exidently.
1425
14262009-05-11 Li Feng <nemokingdom@gmail.com>
1427
1428 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1429 compile options by file names.
1430 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1431 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1432 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1433 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1434
14352009-05-08 Li Feng <nemokingdom@gmail.com>
1436
1437 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1438 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1439 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1440 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1441
14422009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1443
1444 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1445 by final cleanup.
1446
14472009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1448
1449 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1450 allow integer constant strides.
1451 (graphite_can_represent_expr): Depend on outermost_loop.
1452 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1453 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1454 build_scops_1): Same.
1455 (scopdet_basic_block_info): Same and insert layered SCoP
1456 detection.
1457 (try_generate_gimple_bb): Cleanup.
1458 (build_scops): Enable data references.
1459
1460 * testsuite/gcc.dg/graphite/id-5.c: New.
1461 * testsuite/gcc.dg/graphite/id-9.c: New.
1462 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1463 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1464
14652009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1466
1467 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1468 that we have not yet built for this SCoP.
1469
14702009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1471
1472 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1473 for complex numbers.
1474
14752009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1476
1477 * graphite-ppl.c: Fix build if cloog is not available.
1478
14792009-05-04 Li Feng <nemokingdom@gmail.com>
1480
1481 * tree-parloops.c (loop_parallel_p): Remove construction of
1482 NITER and REDUCTION_LIST.
1483 (try_get_loop_niter): New.
1484 (try_create_reduction_list): New.
1485 (parallelize_loops): Bypass the failed checkings in autopar
1486 when can_be_parallel in loop structure is set to true.
1487
14882009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1489
1490 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1491 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1492
14932009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1494
1495 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1496 Enable EQ_EXPR and NE_EXPR again.
1497
14982009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1499
1500 * graphite-scop-detection.c (graphite_can_represent_scev):
1501 Add check if scev is affine multivariate.
1502 (harmful_stmt_in_bb): Check if we can represent the conditions.
1503 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1504 harmful_stmt_in_bb.
1505 * testsuite/gcc.dg/graphite/id-7.c: New.
1506
15072009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1508
1509 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1510 Check all bbs in region, not only the bbs that are represented in
1511 GRAPHITE.
1512 (build_poly_scop): Add newline.
1513 * testsuite/gcc.dg/graphite/id-8.c: New.
1514
15152009-04-30 Li Feng <nemokingdom@gmail.com>
1516
1517 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1518 when loop initialize.
1519 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1520 * common.opt: Declare flag_graphite_force_parallel.
1521 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1522 loop parallel.
1523 * graphite-poly.c (apply_poly_transforms): Introduce
1524 flag_graphite_force_parallel.
1525 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1526 * toplev.c (process_options): ditto and replace a not correctly
1527 encoded space.
1528
15292009-04-30 Li Feng <nemokingdom@gmail.com>
1530
1531 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1532 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1533 to the redefinition.
1534 (compute_cloog_iv_types_1): ditto.
1535 (build_iv_mapping): ditto.
1536 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1537 initialization.
1538 (free_gimple_bb): Removed GBB_LOOPS related free part.
1539 (build_bb_loops): Removed.
1540 * sese.h (struct gimple_bb): Removed loops.
1541 (GBB_LOOPS): Removed.
1542 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1543 (gbb_loop_index): ditto.
1544
15452009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1546
1547 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1548 allow non constant strides.
1549 * testsuite/gcc.dg/graphite/scop-20.c: New.
1550
15512009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1552
1553 * graphite-scop-detection.c (dot_all_scops): Fix system call
1554 return value warning.
1555 (dot_scop): Same.
1556
15572009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1558
1559 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1560 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1561
15622009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1563
1564 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1565 build_pairwise_constraint, dr_equality_constraints,
1566 build_pairwise_scheduling_equality,
1567 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1568 build_lexicographically_gt_constraint, dependence_polyhedron,
1569 graphite_legal_transform_dr, graphite_legal_transform_bb,
1570 graphite_legal_transform): New.
1571 * graphite-poly.h (graphite_legal_transform): Declared.
1572 * graphite-sese-to-poly.c (build_poly_scop): Call to
1573 graphite_legal_transform is disabled for the moment.
1574
15752009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1576
1577 * graphite-poly.h (pbb_nb_scattering_dims): New.
1578 (pbb_nb_scattering): Use it.
1579
15802009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1581
1582 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1583 Pointset_Powerset version of ppl_insert_dimensions.
1584 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1585
15862009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1587
1588 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1589
15902009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1591
1592 * graphite-poly.h: Fix comment.
1593
15942009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1595
1596 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1597
15982009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1599
1600 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1601 statements.
1602
16032009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1604
1605 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1606 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1607 conditions.
1608
16092009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1610
1611 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1612 handle EQ_EXPR and NE_EXPR.
1613
16142009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1615
1616 * graphite-poly.h (poly_dr): Fix comment.
1617
16182009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1619 Tobias Grosser <grosser@fim.uni-passau.de>
1620
1621 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1622 with a zero dimension polyhedron.
1623 (find_scop_parameters): Move the call to scop_set_nb_params here.
1624 (build_loop_iteration_domains): Store in loop->aux the iteration
1625 domain polyhedron.
1626 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1627 by any loop in scop.
1628 (build_poly_scop): Do not call scop_set_nb_params.
1629
16302009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1631 Tobias Grosser <grosser@fim.uni-passau.de>
1632
1633 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1634 add_condition_to_domain not GT_EXPR.
1635
16362009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1637
1638 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1639 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1640 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1641 upper_bound_assign to calculate unions.
1642 * testsuite/gcc.dg/graphite/id-6.c: New.
1643
16442009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1645
1646 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1647 handle abnormal edges.
1648
16492009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1650
1651 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1652 (free_poly_bb): Also free poly_drs.
1653 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1654 (poly_dr): Polyhedron to Pointset_Powerset.
1655 (pdr_accessp_nb_subscripts): Same.
1656 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1657 poly_drs.
1658
16592009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1660
1661 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1662 names into more meaningful names.
1663
16642009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1665
1666 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1667 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1668
16692009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1670
1671 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1672 the reduction_list.
1673 * tree-parloops.c (rewrite_phi_with_iv): New.
1674 (rewrite_all_phi_nodes_with_iv): New.
1675 (canonicalize_loop_ivs): Call them.
1676
16772009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1678
1679 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1680 graphite_find_data_references_in_stmt.
1681 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1682 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1683
16842009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1685
1686 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1687
16882009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1689
1690 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1691 instead of bb_in_region.
1692 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1693 (build_sese_conditions): Use flag_bb_in_sese.
1694 * sese.c (register_bb_in_sese): Removed.
1695 (new_sese): Remove initialization of SESE_REGION_BBS.
1696 (free_sese): Do not free SESE_REGION_BBS.
1697 * sese.h (struct sese): Remove field region_basic_blocks.
1698 (SESE_REGION_BBS): Removed.
1699 (bb_in_sese_p): Implement in function of bb_in_region.
1700
17012009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1702
1703 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1704 loops.
1705
17062009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1707
1708 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1709 and EQ_EXPR.
1710 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1711 (add_condition_to_domain): New.
1712 (add_condition_to_pbb): New.
1713 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1714 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1715
17162009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1717
1718 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1719 ppl_Pointset_Powerset.
1720 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1721 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1722 (pbb_nb_loops): Same.
1723 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1724 add_conditions_to_domain): Same.
1725 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1726 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1727 ppl_const_Polyhedron_t.
1728 (ppl_print_powerset_matrix): New.
1729 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1730 ppl_print_powerset_matrix): New.
1731 (ppl_print_polyhedron_matrix): Updated.
1732
17332009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1734
1735 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1736
17372009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1738
1739 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1740 (print_iteration_domains, debug_iteration_domain,
1741 debug_iteration_domains): New.
1742 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1743 debug_iteration_domains): Declared.
1744 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1745 indenting.
1746
17472009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1748 Sebastian Pop <sebastian.pop@amd.com>
1749
1750 * graphite-poly.h (print_iteration_domain): New.
1751 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1752 (build_sese_conditions_1, build_sese_conditions_after,
1753 build_sese_conditions_before): New.
1754 (build_sese_conditions): Rewritten.
1755
17562009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1757 Tobias Grosser <grosser@fim.uni-passau.de>
1758
1759 Cleanup of code generation liveouts.
1760 * graphite-clast-to-gimple.c (translate_clast): Use a single
1761 rename_map instead of one per translated statement.
1762 Do not use SESE_LIVEOUT_RENAMES.
1763 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1764 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1765 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1766 phi node of a reduction: when a loop contains a reduction used outside
1767 the loop, there should be a scalar close phi node on the exit block.
1768 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1769 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1770 (free_sese): Do not free them.
1771 (sese_build_liveouts_use): Do not use them.
1772 (sese_build_liveouts_bb): Same.
1773 (sese_build_liveouts): Same.
1774 (sese_insert_phis_for_liveouts): Same.
1775 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1776 (defined_in_loop_p): New.
1777 (alive_after_loop): New.
1778 (close_phi_not_yet_inserted_p): New.
1779 (struct alep, alep_p): New.
1780 (add_loop_exit_phis): Remove from the rename_map all the names defined
1781 in the code generated loop.
1782 (insert_loop_close_phis): Traverse the rename_map passed to it.
1783 Don't use SESE_LIVEOUT_RENAMES.
1784 (default_liveout_before_guard): Renamed default_before_guard.
1785 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1786 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1787 (register_sese_liveout_renames): Removed.
1788 (copy_bb_and_scalar_dependences): Do not call it.
1789 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1790 reduction_list.
1791 (SESE_LIVEOUT): Removed.
1792 (SESE_LIVEOUT_RENAMES): Removed.
1793 (SESE_REDUCTION_LIST): Removed.
1794 (sese_build_liveouts): Removed.
1795 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1796 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1797 (insert_guard_phis): Same.
1798 (rename_map_elt): Declare a VEC of them.
1799 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1800 trees not pointers to trees.
1801
1802 Rewrite in canonical close SSA form:
1803 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1804 (limit_scops): Close the scop after the block containing the close phi
1805 nodes.
1806 (canonicalize_loop_closed_ssa): New.
1807 (canonicalize_loop_closed_ssa_form): New.
1808 (build_scops): Call canonicalize_loop_closed_ssa_form.
1809
1810 * graphite-sese-to-poly.c: Fix typos.
1811
18122009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1813
1814 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1815 Extended.
1816 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1817 (print_pbb): Add conditions.
1818
18192009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1820 Sebastian Pop <sebastian.pop@amd.com>
1821
1822 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1823 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1824 (build_scop_bbs_1): New.
1825 (build_scop_bbs): Rewrite.
1826 * sese.h (bb_in_region): New.
1827
18282009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1829
1830 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1831 poly_drs vector.
1832 (print_scop): Style.
1833 * graphite-poly.h (poly_bb): Add drs vector.
1834 (PBB_DRS): Add accessor.
1835 * graphite-sese-to-poly.c (build_poly_dr): New.
1836 (build_pbb_drs, build_scop_drs): New.
1837 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1838
18392009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1840
1841 * tree-ssa-loop.c: Include forgotten toplev.h
1842
18432009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1844
1845 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1846 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1847 * testsuite/gcc.dg/graphite/pr37928.c: Same
1848 * testsuite/gcc.dg/graphite/pr38409.c: Same
1849 * testsuite/gcc.dg/graphite/pr38498.c: Same
1850 * testsuite/gcc.dg/graphite/pr38559.c: Same
1851 * testsuite/gcc.dg/graphite/pr39335.c: Same
1852 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1853 * testsuite/gfortran.dg/graphite/block-2.f: Same
1854 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1855 with -floop-*.
1856
18572009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1858
1859 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1860 build_access_matrix, build_scop_data_accesses): Remove access function
1861 building. (We get a new version soon).
1862 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1863 * sese.h (nb_loops_around_loop_in_sese): Remove.
1864 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1865
18662009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1867 Sebastian Pop <sebastian.pop@amd.com>
1868
1869 * graphite-scop-detection.c (struct scopdet_info): Rename last
1870 field to exit.
1871 (scopdet_basic_block_info, build_scops_1): Don't use
1872 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1873
18742009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1875 Sebastian Pop <sebastian.pop@amd.com>
1876
1877 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1878 * sese.c (sese_build_liveouts_use): Renamed from
1879 sese_build_livein_liveouts_use. Remove liveins.
1880 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1881 Call sese_build_liveouts_use.
1882 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1883 Call sese_build_liveouts_bb.
1884 (new_sese, free_sese): Remove liveins.
1885 (sese_add_exit_phis_var): Deleted.
1886 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1887 directly.
1888 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1889
1890 * sese.h (sese): Remove num_ver and livein.
1891 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1892
18932009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1894
1895 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1896
18972009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1898
1899 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1900 (build_scop_scattering): Do not use compare_prefix_loops any more.
1901 (nb_common_loops): New.
1902
19032009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1904
1905 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1906 (register_old_and_new_names): Renamed set_rename.
1907
19082009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1909
1910 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1911 of the decl from the previous commit.
1912
19132009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1914
1915 * graphite-scop-detection.c (dot_scop): New.
1916 * graphite-scop-detection.h (dot_scop): Declared.
1917
19182009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1919
1920 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1921
19222009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1923
1924 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1925 condition at the end of the loop.
1926 * graphite.c (graphite_initialize, graphite_finalize): Print to
1927 dump_file the compiled function.
1928 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1929 of create_empty_loop_on_edge.
1930 (translate_clast): Update the code generation of loops for the new
1931 shape of loops.
1932 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1933
19342009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1935
1936 Reverted the patch from 2009-03-19.
1937
19382009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1939
1940 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1941 poly_drs vector.
1942 (print_scop): Style.
1943 * graphite-poly.h (poly_bb): Add drs vector.
1944 (PBB_DRS): Add accessor.
1945 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1946 (build_access_matrix_with_af, build_access_matrix,
1947 build_scop_data_accesses): Delete.
1948 (build_poly_dr): New.
1949 (build_pbb_drs, build_scop_drs): New.
1950 (build_poly_scop): call build_scop_drs.
1951
19522009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1953
1954 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1955 once per basic block.
1956
19572009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1958
1959 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1960 (graphite_can_represent_expr): Renamed from loop_affine_expr
1961 and enhanced.
1962 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1963 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1964 (scopdet_basic_block_info): Actually define entry_block.
1965 (stmt_simple_memref_p): Moved here from ...
1966
1967 * tree-data-ref.c (stmt_simple_memref_p): here.
1968 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1969
19702009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1971
1972 * testsuite/gcc.dg/graphite/id-4.c: New.
1973
19742009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1975
1976 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1977 (register_old_and_new_names): Update the content of the map.
1978 When there was already a rename_map_elt in the map at that
1979 location, free it.
1980 (copy_bb_and_scalar_dependences): Do rename_variables after
1981 expand_scalar_variables.
1982 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1983 of the map. When there was already a rename_map_elt in the
1984 map at that location, free it.
1985 (translate_clast): Pass the rename_map. Do not initialize and free
1986 a rename_map per stmt_user.
1987 (gloog): Initialize and free one rename_map and pass it to
1988 translate_clast.
1989
19902009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1991
1992 * sese.c (expand_scalar_variables_stmt,
1993 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1994 parameter.
1995 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1996 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1997 the gimple_stmt_iterator of the statement to be expanded.
1998 * graphite-scop-detection.c (is_simple_operand): Do handle
1999 REALPART_EXPR.
2000
20012009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2002
2003 * graphite-scop-detection.c (is_simple_operand): Do not handle
2004 REALPART_EXPR.
2005 * testsuite/gcc.dg/graphite/id-2.c: New.
2006
2007 * graphite-sese-to-poly.c (build_bb_loops,
2008 add_value_to_dim, scan_tree_for_params_right_scev,
2009 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2010 find_params_in_bb, build_loop_iteration_domains,
2011 add_conditions_to_domain): Remove subtract.
2012
20132009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2014
2015 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2016 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2017 pbb_loop_at_index -> gbb_loop_at_index.
2018 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2019 (debug_loop_vec): Delete.
2020 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2021 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2022 (PBB_LOOPS): Removed.
2023 (PBB_BLACK_BOX): Insert cast.
2024 (pbb_set_black_box): New setter.
2025 (pbb_loop_at_index, pbb_loop_index): Removed.
2026 (scop_set_region, scop_set_nb_params): New.
2027 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2028 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2029 (build_poly_scop): Use scop_set_nb_params.
2030 * sese.h (gimple_bb): Add LOOPS.
2031 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2032
20332009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2034
2035 Revert previous commit.
2036
20372009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2038
2039 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2040 (register_old_and_new_names): Update the content of the map.
2041 When there was already a rename_map_elt in the map at that
2042 location, free it.
2043 (copy_bb_and_scalar_dependences): Do rename_variables after
2044 expand_scalar_variables.
2045 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2046 of the map. When there was already a rename_map_elt in the
2047 map at that location, free it.
2048 (translate_clast): Pass the rename_map. Do not initialize and free
2049 a rename_map per stmt_user.
2050 (gloog): Initialize and free one rename_map and pass it to
2051 translate_clast.
2052
20532009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2054
2055 Remove forgotten line in revert.
2056
20572009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2058
2059 Revert previous commit.
2060
20612009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2062
2063 * sese.c (register_old_and_new_names): Update the content
2064 of the map. When there was already a rename_map_elt in the
2065 map at that location, free it.
2066 (copy_bb_and_scalar_dependences): Do rename_variables after
2067 expand_scalar_variables.
2068 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2069 of the map. When there was already a rename_map_elt in the
2070 map at that location, free it.
2071 (translate_clast): Pass the rename_map. Do not initialize and free
2072 a rename_map per stmt_user.
2073 (gloog): Initialize and free one rename_map and pass it to
2074 translate_clast.
2075
20762009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2077
2078 * graphite-clast-to-gimple.c (translate_clast): context_loop
2079 is never NULL.
2080
20812009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2082 Sebastian Pop <sebastian.pop@amd.com>
2083
2084 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2085 of the use of ppl_Polyhedron_map_space_dimensions.
2086
20872009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2088 Sebastian Pop <sebastian.pop@amd.com>
2089
2090 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2091 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2092 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2093 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2094 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2095 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2096 pbb_nb_params): New.
2097 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2098 nb_loops_around_pbb): Adapt return types.
2099
21002009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2101
2102 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2103 graphite-clast-to-gimple.o, graphite-data-ref.o,
2104 graphite-scop-detection.o, graphite-poly.o): Add
2105 more headers.
2106
21072009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2108
2109 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2110 graphite-clast-to-gimple.o, graphite-data-ref.o,
2111 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2112
21132009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2114
2115 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2116 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2117 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2118 * testsuite/gcc.dg/graphite/block-0.c: Same.
2119 * testsuite/gcc.dg/graphite/block-1.c: Same.
2120 * testsuite/gcc.dg/graphite/block-2.c: Same.
2121 * testsuite/gcc.dg/graphite/block-3.c: Same.
2122 * testsuite/gcc.dg/graphite/block-4.c: Same.
2123 * testsuite/gcc.dg/graphite/block-5.c: Same.
2124 * testsuite/gcc.dg/graphite/block-6.c: Same.
2125 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2126 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2127 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2128 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2129 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2130 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2131 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2132 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2133 * opts.c: Remove -floop-block from -O2.
2134 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2135 -floop-strip-mine are used.
2136
21372009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2138 Sebastian Pop <sebastian.pop@amd.com>
2139
2140 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2141 dimensions.
2142 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2143 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2144 strip_mine_profitable_p, is_interchange_valid,
2145 graphite_trans_bb_block, graphite_trans_loop_block,
2146 graphite_trans_scop_block): Temporary removed.
2147 (extend_scattering, unify_scattering_dimensions): New.
2148 (print_scattering_function, graphite_read_transforms):
2149 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2150 (graphite_generate_scattering_fns): Removed.
2151 (apply_poly_transforms): Cleanup.
2152 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2153 (schedule_to_scattering): Moved.
2154 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2155 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2156 (pbb_nb_scattering): New.
2157 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2158 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2159 Removed.
2160 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2161 shift_poly.
2162 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2163 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2164 -> PBB_TRANSFORMED_SCATTERING.
2165 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2166 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2167 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2168 (check_poly_representation): Do not return bool.
2169 (graphite_transform_loops): Reformat.
2170 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2171
21722009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2173
2174 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2175 debug_pbb_domain, debug_pbb, debug_scop): New.
2176 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2177 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2178
21792009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2180
2181 PR middle-end/39335
2182 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2183 when the type precision of the induction variable should be
2184 larger than the type precision of nit.
2185 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2186 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2187 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2188
2189 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2190 * testsuite/gcc.dg/graphite/pr39335.c: New.
2191
21922009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2193
2194 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2195 SSA_NAMES not struct reduction_info.
2196
21972009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2198
2199 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2200
22012009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2202 Tobias Grosser <grosser@fim.uni-passau.de>
2203
2204 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2205 (free_sese): Free SESE_REDUCTION_LIST.
2206 * sese.h (struct sese): Add field reduction_list.
2207 (SESE_REDUCTION_LIST): New.
2208 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2209 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2210
22112009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2212 Tobias Grosser <grosser@fim.uni-passau.de>
2213
2214 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2215 of loop_p.
2216
22172009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2218 Tobias Grosser <grosser@fim.uni-passau.de>
2219
2220 * tree-parloops.c (struct brli, build_reduction_list_info,
2221 analyze_reduction_list, gather_scalar_reductions): New.
2222 (loop_parallel_p): Build a reduction list containing only
2223 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2224 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2225 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2226 * tree-flow.h (gather_scalar_reductions): Declared.
2227
22282009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2229
2230 PR middle-end/39308
2231 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2232 number_of_iterations_exit from a gcc_assert.
2233
22342009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2235 Jan Sjodin <jan.sjodin@amd.com>
2236
2237 * output.h (graphite_out_file, graphite_in_file): Declared.
2238 * toplev.c (graphite_out_file, graphite_in_file): New.
2239 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2240 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2241 Don't call schedule_to_scattering.
2242 * common.opt (fgraphite-write, fgraphite-read): New.
2243 * graphite-poly.c: Include output.h.
2244 (print_scattering_function, print_scattering_functions,
2245 debug_scattering_function, debug_scattering_functions,
2246 graphite_write_transforms, graphite_read_transforms,
2247 graphite_generate_scattering_fns): New.
2248 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2249 Call graphite_generate_scattering_fns, graphite_write_transforms,
2250 graphite_read_transforms.
2251 (new_poly_bb): Initialize PBB_SCATTERING.
2252 (free_poly_bb): Free PBB_SCATTERING.
2253 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2254 * graphite-poly.h (struct poly_bb): Add field scattering.
2255 (PBB_SCATTERING): New.
2256 (print_scattering_function, print_scattering_functions,
2257 debug_scattering_function, debug_scattering_functions): Declared.
2258 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2259 GMP values, not integers!
2260 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2261 ppl_read_polyhedron_matrix): New.
2262 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2263 debug_ppl_polyhedron_matrix,
2264 ppl_read_polyhedron_matrix): Declared.
2265 * Makefile.in (graphite-poly.o): Depends on output.h.
2266
22672009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2268 Tobias Grosser <grosser@fim.uni-passau.de>
2269
2270 Revert this change:
2271 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2272 scalar evolutions in the scop_entry->loop_father.
2273
22742009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2275 Tobias Grosser <grosser@fim.uni-passau.de>
2276
2277 * graphite.h (ref_nb_loops): Remove declaration.
2278 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2279 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2280 debug_gbb): Moved to sese.h.
2281 * sese.h: As said.
2282
22832009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2284 Tobias Grosser <grosser@fim.uni-passau.de>
2285
2286 * graphite-data-ref.[ch]: Disable.
2287
22882009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2289 Tobias Grosser <grosser@fim.uni-passau.de>
2290
2291 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2292 scalar evolutions in the scop_entry->loop_father.
2293
22942009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2295
2296 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2297 (graphite_cannot_represent_loop_niter): Renamed
2298 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2299 (limit_scops): build_sese_loop_nests does not return a bool.
2300 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2301 * sese.c (nb_reductions_in_loop): ... from here.
2302 (graphite_loop_normal_form): ... from here.
2303 (sese_record_loop): Does not fail, so does not return a bool.
2304 (build_sese_loop_nests): Same.
2305 * sese.h (build_sese_loop_nests): Update declaration.
2306 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2307 (build_graphite_loop_normal_form): New.
2308 (gloog): Call build_graphite_loop_normal_form.
2309 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2310 build_sese_loop_nests.
2311
2312 * testsuite/gcc.dg/graphite/id-1.c: New.
2313
23142009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2315 Tobias Grosser <grosser@fim.uni-passau.de>
2316
2317 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2318 The SCoP detection fix is sufficient.
2319
23202009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2321
2322 PR tree-optimization/39260
2323 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2324 the basic block contains a condition with a real type.
2325 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2326
2327 * gcc.dg/graphite/pr39260.c: New.
2328
23292009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2330
2331 * graphite-poly.c: Inlcude params.h.
2332 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2333 the size of a tile.
2334 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2335 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2336
23372009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2338 Tobias Grosser <grosser@fim.uni-passau.de>
2339
2340 * graphite-scop-detection.c (dot_all_scops_1,
2341 dot_all_scops): Moved here.
2342 * graphite-scop-detection.h (dot_all_scops): Declared here.
2343 * graphite.c (graphite_initialize, graphite_finalize): New.
2344 (graphite_transform_loops): Cleaned up.
2345 * sese.c (debug_oldivs): Moved here.
2346 * graphite-poly.c (graphite_apply_transformations): Renamed
2347 apply_poly_transforms.
2348 (debug_loop_vec): Moved here.
2349 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2350 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2351 find_scop_parameters, build_scop_iteration_domain,
2352 add_conditions_to_constraints, build_scop_canonical_schedules,
2353 build_scop_data_accesses): Now static.
2354 (build_poly_scop, check_poly_representation): New.
2355
23562009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2357
2358 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2359 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2360 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2361 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2362 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2363 scan_tree_for_params, struct irp_data, dx_record_params,
2364 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2365 build_loop_iteration_domains, add_conditions_to_domain,
2366 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2367 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2368 build_sese_conditions, add_conditions_to_constraints,
2369 build_scop_iteration_domain, build_access_matrix_with_af,
2370 build_access_matrix,
2371 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2372
2373 * graphite-sese-to-poly.c: New.
2374 * graphite-sese-to-poly.h: New.
2375
2376 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2377
23782009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2379
2380 * graphite.c: Split graphite code generation to a new file.
2381 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2382 max_precision_type, clast_to_gcc_expression_red,
2383 clast_to_gcc_expression, gcc_type_for_clast_expr,
2384 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2385 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2386 graphite_create_new_guard, clast_get_body_of_loop,
2387 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2388 graphite_create_new_loop, build_iv_mapping, copy_renames,
2389 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2390 compute_cloog_iv_types, free_scattering, save_var_name,
2391 initialize_cloog_names, build_scop_context, build_cloog_prog,
2392 set_cloog_options, debug_clast_stmt, scop_to_clast,
2393 print_generated_program, debug_generated_program,
2394 gloog): Moved to graphite-clast-to-gimple.c.
2395
2396 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2397
2398 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2399 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2400 loop_iv_stack_pop, loop_iv_stack_get_iv,
2401 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2402 free_loop_iv_stack, loop_iv_stack_remove_constants,
2403 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2404 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2405 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2406 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2407 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2408 get_vdef_before_sese, sese_adjust_vphi,
2409 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2410 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2411 is_iv, expand_scalar_variables_ssa_name,
2412 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2413 expand_scalar_variables, rename_variables, remove_condition,
2414 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2415 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2416 default_liveout_before_guard, add_guard_exit_phis,
2417 insert_guard_phis, register_old_and_new_names,
2418 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2419 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2420 if_region_set_false_region, create_if_region_on_edge,
2421 move_sese_in_condition): Moved to sese.c.
2422
2423 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2424 if_region_exit, if_region_get_condition_block,
2425 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2426 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2427 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2428 ivtype_map_elt, new_ivtype_map_elt,
2429 recompute_all_dominators): Moved to sese.h.
2430
2431 * graphite-clast-to-gimple.c: New.
2432 * graphite-clast-to-gimple.h: New.
2433 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2434 * sese.c: Modified as said above.
2435 * sese.h: Same.
2436
24372009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2438
2439 * graphite.c: Split scop detection to a new file.
2440 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2441 move_sd_regions, loop_affine_expr, exclude_component_ref,
2442 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2443 graphite_cannot_represent_loop_niter, struct scopdet_info,
2444 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2445 find_single_entry_edge, find_single_exit_edge,
2446 create_single_entry_edge, sd_region_without_exit,
2447 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2448 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2449 Moved to graphite-scop-detection.c.
2450
2451 * graphite-scop-detection.c: New.
2452 * graphite-scop-detection.h: New.
2453 * Makefile.in: Add new rule for graphite-scop-detection.o.
2454
2455 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2456 tree-scalar-evolution.h.
2457 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2458 build_sese_loop_nests): Moved here from graphite.c.
2459 (param_index): Renamed parameter_index_in_region.
2460
24612009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2462 Sebastian Pop <sebastian.pop@amd.com>
2463
2464 * gcc.dg/graphite/block-0.c: Expected to fail now.
2465 * gcc.dg/graphite/block-1.c: Same.
2466 * gcc.dg/graphite/block-5.c: Same.
2467 * gcc.dg/graphite/block-6.c: Same.
2468
24692009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2470 Sebastian Pop <sebastian.pop@amd.com>
2471
2472 * graphite.h: Separate from graphite_bb_p the polyhedral
2473 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2474 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2475 graphite-data-ref.h.
2476 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2477 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2478 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2479 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2480 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2481 scop_nb_params): Moved to graphite-poly.h.
2482 * graphite-data-ref.c: Same.
2483 * graphite-data-ref.h: New.
2484 * graphite.c: Same.
2485 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2486 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2487 is_interchange_valid, graphite_trans_bb_block,
2488 graphite_trans_loop_block, scop_max_loop_depth,
2489 graphite_trans_scop_block, graphite_apply_transformations,
2490 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2491 graphite-poly.c.
2492 * graphite-poly.h: New.
2493 * graphite-poly.c: New.
2494 * Makefile.in (OBJS-common): Add graphite-poly.o.
2495 (graphite-poly.o): New rule.
2496 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2497 (DR_SCOP): Removed.
2498
24992009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2500 Tobias Grosser <grosser@fim.uni-passau.de>
2501
2502 * graphite.c: Replace gb -> gbb.
2503 * graphite.h: Same.
2504 * graphite-data-ref.c: Same.
2505
25062009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2507 Tobias Grosser <grosser@fim.uni-passau.de>
2508
2509 * Makefile.in (OBJS-commmon): Add sese.o.
2510 (sese.o): New.
2511 (graphite.o): Add sese.h.
2512 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2513 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2514 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2515 Move to sese.
2516 (block_before_scop): Add missing return.
2517 (new_scop, free_scop): Remove SESE data structures.
2518 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2519 find_scop_parameters, build_loop_iteration_domains,
2520 add_conditions_to_domain, register_scop_liveout_renames,
2521 copy_bb_and_scalar_dependences): Scop -> SESE.
2522
2523 (add_conditions_to_domain): SCoP -> SESE and remove check
2524 (scop_contains_non_iv_scalar_phi_nodes): New.
2525 (build_scop_conditions_1, build_scop_conditions): Remove check for
2526 non iv scalar phi nodes.
2527 (print_scop_statistics): New.
2528 (graphite_transform_loops): Cleanup.
2529
2530 * graphite.h: Move to sese & cleanup.
2531 * sese.c: New.
2532 * sese.h: New.
2533
25342009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2535 Tobias Grosser <grosser@fim.uni-passau.de>
2536
2537 * graphite.c (build_scop_conditions_1): Conditions are only
2538 at the end of a basic block.
2539
25402009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2541 Tobias Grosser <grosser@fim.uni-passau>
2542
2543 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2544 field.
2545 (GBB_ALPHA): Removed.
2546
25472009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2548 Tobias Grosser <grosser@fim.uni-passau.de>
2549
2550 * graphite-data-ref.c (graphite_test_dependence): Don't use
2551 GBB_DYNAMIC_SCHEDULE.
2552 * graphite.c (new_graphite_bb): Same.
2553 (free_graphite_bb): Same.
2554 (build_scop_dynamic_schedules): Removed.
2555 (graphite_transform_loops): Don't call it.
2556 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2557 (GBB_DYNAMIC_SCHEDULE): Removed.
2558
25592009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2560 Tobias Grosser <grosser@fim.uni-passau.de>
2561
2562 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2563 (print_graphite_bb): Same.
2564 (build_cloog_prog): Same.
2565
25662009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2567 Tobias Grosser <grosser@fim.uni-passau.de>
2568
2569 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2570
25712009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2572 Tobias Grosser <grosser@fim.uni-passau.de>
2573
2574 * graphite.c (build_scop_context): Don't use CloogMatrix.
2575 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2576 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2577
25782009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2579 Tobias Grosser <grosser@fim.uni-passau.de>
2580
2581 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2582 liveout_renames, add_params fields...
2583 (struct sese): ... here.
2584 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2585 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2586
25872009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2588 Tobias Grosser <grosser@fim.uni-passau.de>
2589
2590 * graphite.c (print_scop): Do not print the CLooG program.
2591 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2592 build_cloog_prog, gloog): Don't use SCOP_PROG.
2593 (find_transform): Renamed scop_to_clast.
2594 (print_generated_program, debug_generated_program): New.
2595 (graphite_transform_loops): Adapt to new interface.
2596 * graphite.h (struct scop): Remove program field.
2597 (SCOP_PROG): Removed.
2598 (print_generated_program, debug_generated_program): Declared.
2599
26002009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2601
2602 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2603 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2604 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2605 free_graphite_bb, build_scop_canonical_schedules,
2606 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2607 schedules are now represented using a ppl_Linear_Expression_t.
2608 * graphite.h (struct graphite_bb): Same.
2609 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2610 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2611
26122009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2613
2614 * graphite.c: Free local memory.
2615 * graphite-ppl.c: Same.
2616
26172009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2618
2619 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2620 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2621 swap_constraint_variables, scale_constraint_variable): Removed.
2622 (graphite_trans_bb_strip_mine): Remove pong.
2623 * graphite-ppl.c: Include missing header files.
2624 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2625 * graphite-ppl.h (ppl_strip_loop): Declared.
2626 * Makefile.in (graphite-ppl.o): Adjust dependences.
2627
26282009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2629
2630 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2631 (build_scop_iteration_domain): Same.
2632
26332009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2634
2635 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2636 ping pong.
2637 (add_value_to_dim, scan_tree_for_params_right_scev,
2638 scan_tree_for_params_int): New.
2639 * graphite-ppl.c (oppose_constraint): New.
2640 (insert_constraint_into_matrix): Implement missing cases.
2641 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2642
26432009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2644
2645 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2646 use ppl_move_dimension.
2647
26482009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2649
2650 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2651 * graphite.c: Same.
2652 * graphite.h: Same.
2653 * graphite-ppl.c: Same.
2654 * graphite-ppl.h: Same.
2655
26562009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2657
2658 Revert last 3 commits.
2659
26602009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2661
2662 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2663 ping pong.
2664 (add_value_to_dim, scan_tree_for_params_right_scev,
2665 scan_tree_for_params_int): New.
2666 * graphite-ppl.c (oppose_constraint): New.
2667 (insert_constraint_into_matrix): Implement missing cases.
2668 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2669
26702009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2671
2672 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2673
26742009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2675 Tobias Grosser <grosser@fim.uni-passau.de>
2676
2677 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2678 use ppl_move_dimension.
2679 * graphite-ppl.c (ppl_move_dimension): New.
2680 * graphite-ppl.h (ppl_move_dimension): Declared.
2681
26822009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2683
2684 * graphite.c: Do not include cloog/cloog.h.
2685 (print_graphite_bb): Remove ping pong, call PPL print function.
2686
26872009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2688
2689 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2690 (graphite.o): Add dependence on graphite-ppl.h.
2691 (graphite-ppl.o): New.
2692 (graphite-data-ref.c): Ping pong between PPL data structures
2693 and matrices.
2694 * graphite-ppl.c: New.
2695 * graphite-ppl.h: New.
2696 * graphite.c: Include graphite-ppl.h.
2697 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2698 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2699 Ping pong between PPL data structures and matrices.
2700 (new_graphite_bb): Create a PPL constraint system.
2701 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2702 (build_loop_iteration_domains): Use PPL functions.
2703 * graphite.h: Include graphite-ppl.h. Fix comments.
2704 (graphite_bb): Use a ppl_Constraint_System_t instead of
2705 CloogMatrix for representing the domain.
2706 (scop): Remove static_schedule.
2707 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2708
27092009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2710
2711 * graphite.c: Fix some comments.
2712
27132009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2714
2715 PR middle-end/38953
2716 * graphite.c (if_region_set_false_region): After moving a region
2717 in the false branch of a condition, remove the empty dummy
2718 basic block.
2719 (gloog): Remove wrong fix for PR38953.
2720
27212009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2722
2723 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2724 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2725 register_bb_in_sese, new_sese, free_sese): Moved.
2726 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2727 outermost_loop_in_scop, build_scop_iteration_domain,
2728 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2729 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2730 Use loop_in_sese_p instead of loop_in_scop_p.
2731 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2732 (free_scop): Do not free SCOP_BBS_B.
2733 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2734 ref_nb_loops): Moved here...
2735 * graphite.h (ref_nb_loops): ... from here.
2736 (struct scop): Remove bbs_b bitmap.
2737 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2738 * testsuite/gcc.dg/graphite/scop-19.c: New
2739
27402009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2741
2742 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2743 detection.
2744
27452009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2746
2747 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2748 eq_loop_to_cloog_loop): Remove.
2749 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2750 * graphite.h (struct scop): Remove loop2cloog_loop.
2751 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2752
27532009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2754
2755 * opts.c (decode_options): Only add graphite options to O2
2756 if we compile with graphite enabled.
2757
27582009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2759
2760 * Merge from mainline (r143163:143684).
2761
27622009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2763
2764 * graphite.c (debug_value): Removed.
2765 * graphite.h (debug_value): Removed.
2766
27672009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2768
2769 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2770 after graphite: pass_copy_prop does not maintain a proper loop closed
2771 SSA form. pass_copy_prop should be fixed.
2772
27732009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2774
2775 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2776
27772009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2778
2779 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2780 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2781 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2782 changed the CFG.
2783
27842009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2785
2786 * graphite.c (gloog): Return true when code gen succeeded.
2787 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2788 the code of the function did not changed. After cleanup_tree_cfg
2789 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2790 form.
2791
27922009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2793
2794 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2795 gimple_call_lhs is NULL.
2796
27972009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2798 Tobias Grosser <tobi.grosser@amd.com>
2799
2800 * graphite.c (graphite_trans_scop_block): Do not block single
2801 nested loops.
2802
28032009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2804 Tobias Grosser <tobi.grosser@amd.com>
2805
2806 * graphite.c (build_scop_canonical_schedules): Start schedules at
2807 zero.
2808
28092009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2810 Tobias Grosser <tobi.grosser@amd.com>
2811
2812 * graphite.c (compare_prefix_loops): New.
2813 (build_scop_canonical_schedules): Rewritten.
2814 (graphite_transform_loops): Move build_scop_canonical_schedules
2815 after build_scop_iteration_domain.
2816
28172009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2818 Tobias Grosser <tobi.grosser@amd.com>
2819
2820 * graphite.c (add_conditions_to_domain): Add the loops to
2821 the dimension of the iteration domain. Do copy the domain
2822 only when it exists.
2823 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2824 (add_conditions_to_constraints): New.
2825 (can_generate_code_stmt, can_generate_code): Removed.
2826 (gloog): Do not call can_generate_code.
2827 (graphite_transform_loops): Call add_conditions_to_constraints
2828 after building the iteration domain.
2829
28302009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2831 Tobias Grosser <tobi.grosser@amd.com>
2832 Jan Sjodin <jan.sjodin@amd.com>
2833
2834 * graphite.c (scan_tree_for_params): On substractions negate
2835 all the coefficients of the term.
2836 (clast_to_gcc_expression_red): New. Handle reduction expressions
2837 of more than two operands.
2838 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2839 (get_vdef_before_scop): Handle also the case of default definitions.
2840
28412009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2842
2843 PR middle-end/38431
2844 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2845 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2846 (gloog): Do not call cleanup_tree_cfg.
2847 (graphite_transform_loops): Call cleanup_tree_cfg after all
2848 scops have been code generated.
2849
28502009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2851
2852 * passes.c (init_optimization_passes): Schedule after
2853 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2854
28552009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2856
2857 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2858 Fix comment.
2859 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2860 Set the type of an expression to the type of its assign statement.
2861 (expand_scalar_variables_expr): Do not pass loop_p.
2862 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2863 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2864 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2865
28662009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2867
2868 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2869 an expression to the gimple_expr_type of its assign statement.
2870 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2871 or tcc_declaration.
2872
28732009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2874
2875 PR tree-optimization/38786
2876 * testsuite/gcc.dg/graphite/pr38786.c: New.
2877 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2878 the SSA_NAME case of expand_scalar_variables_expr.
2879 (expand_scalar_variables_expr): Also gather the scalar computation
2880 used to index the memory access.
2881 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2882 the gimple_stmt_iterator where it inserts new code.
2883
28842009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2885
2886 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2887
28882009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2889
2890 * opts.c (decode_options): Enable flag_graphite_identity and
2891 flag_loop_block in -O2 and above.
2892
28932009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2894
2895 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2896 Fix merge problem: replace with the file from trunk.
2897
28982009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2899
2900 * Merge from mainline (r141727:143163).
2901
29022009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2903 Jan Sjodin <jan.sjodin@amd.com>
2904
2905 PR tree-optimization/38559
2906 * testsuite/gcc.dg/graphite/pr38559.c: New.
2907
2908 * graphite.c (debug_value, copy_constraint,
2909 swap_constraint_variables, scale_constraint_variable, ): New.
2910 (get_lower_bound, get_upper_bound): Removed.
2911 (graphite_trans_bb_strip_mine): Clean up this code that works
2912 only for constant number of iterations. Fully copy upper and
2913 lower bound constraints, not only the constant part of them.
2914 * graphite.h (debug_value): Declared.
2915
29162009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2917
2918 PR tree-optimization/38492
2919 PR tree-optimization/38498
2920 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2921 * tree-chrec.h (scev_is_linear_expression): Declared.
2922 * graphite.c (graphite_cannot_represent_loop_niter): New.
2923 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2924 (graphite_loop_normal_form): Use gcc_assert.
2925 (scan_tree_for_params): Use CASE_CONVERT.
2926 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2927 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2928 Use gcc_assert. Discard scops that contain unhandled cases.
2929 (build_scop_conditions): Return a boolean status for unhandled cases.
2930 (strip_mine_profitable_p): Print the loop number, not its depth.
2931 (is_interchange_valid): Pass the depth of the loop nest, don't
2932 recompute it wrongly.
2933 (graphite_trans_bb_block): Same.
2934 (graphite_trans_bb_block): Print tentative of loop blocking.
2935 (graphite_trans_scop_block): Do not print that the loop has been
2936 blocked.
2937 (graphite_transform_loops): Do not handle scops that contain condition
2938 scalar phi nodes.
2939
2940 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2941 in trunk.
2942 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2943 * testsuite/gcc.dg/graphite/block-1.c: Same.
2944 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2945 blocking.
2946 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2947 * testsuite/gcc.dg/graphite/block-3.c: New.
2948 * testsuite/gcc.dg/graphite/pr38498.c: New.
2949
29502008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2951
2952 PR tree-optimization/38510
2953 * gcc.dg/graphite/pr38510.c: New.
2954 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2955 (translate_clast): Call recompute_all_dominators before
2956 graphite_verify.
2957 (gloog): Call recompute_all_dominators before graphite_verify.
2958
29592008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2960
2961 PR tree-optimization/38492
2962 * graphite.c (rename_map_elt, debug_rename_elt,
2963 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2964 rename_map_elt_info, eq_rename_map_elts,
2965 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2966 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2967 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2968 (sese_build_livein_liveouts): New.
2969 (new_sese, free_sese): New.
2970 (new_scop): Call new_sese.
2971 (free_scop): Call free_sese.
2972 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2973 (register_old_new_names): Renamed register_old_and_new_names.
2974 (register_scop_liveout_renames, add_loop_exit_phis,
2975 insert_loop_close_phis, struct igp,
2976 default_liveout_before_guard, add_guard_exit_phis,
2977 insert_guard_phis, copy_renames): New.
2978 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2979 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2980 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2981 (scop_adjust_phis_for_liveouts): New.
2982 (gloog): Call scop_adjust_phis_for_liveouts.
2983
2984 * graphite.h (struct sese): Documented. Added fields liveout,
2985 num_ver and livein.
2986 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2987 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2988 (struct scop): Added field liveout_renames.
2989 (SCOP_LIVEOUT_RENAMES): New.
2990
29912008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2992
2993 PR tree-optimization/38409
2994 * gcc.dg/graphite/pr38409.c: New.
2995 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2996
29972008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2998
2999 * graphite.c (gcc_type_for_cloog_iv): By default return
3000 integer_type_node.
3001 (graphite_create_new_loop): Don't fold_convert the already
3002 fold_convert-ed expression.
3003
30042008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3005
3006 PR tree-optimization/38446
3007 * gcc.dg/graphite/pr38446.c: New.
3008 * graphite.c (register_bb_in_sese): New.
3009 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3010 looking at the bbs in the region.
3011 * graphite.h (sese): Add region_basic_blocks pointer set to
3012 structure and initialize at the time of defining new scop.
3013
30142008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3015
3016 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3017 (find_params_in_bb): Do not free data refs.
3018 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3019
30202008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3021
3022 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3023 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3024 * testsuite/gcc.dg/graphite/block-5.c: New.
3025 * testsuite/gcc.dg/graphite/block-6.c: New.
3026 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3027 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3028 * testsuite/gcc.dg/graphite/block-2.c: Same.
3029
3030 * graphite.c (struct ivtype_map_elt): New.
3031 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3032 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3033 gcc_type_for_cloog_iv): New.
3034 (loop_iv_stack_patch_for_consts): Use the type of the induction
3035 variable from the original loop, except for the automatically
3036 generated loops, i.e., in the case of a strip-mined loop, in
3037 which case there is no original loop: in that case just use
3038 integer_type_node.
3039 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3040 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3041 (clast_name_to_gcc): Accept params to be NULL.
3042 (clast_to_gcc_expression): Take an extra parameter for the type.
3043 Convert to that type all the expressions built by this function.
3044 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3045 (graphite_translate_clast_equation): Compute the type of the
3046 clast_equation before translating its LHS and RHS.
3047 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3048 (graphite_create_new_loop): Compute the type of the induction
3049 variable before translating the lower and upper bounds and before
3050 creating the induction variable.
3051 (rename_variables_from_edge, rename_phis_end_scop): New.
3052 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3053 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3054 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3055 compute_cloog_iv_types): New.
3056 (gloog): Call compute_cloog_iv_types before starting the
3057 translation of the clast.
3058
3059 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3060 (GBB_CLOOG_IV_TYPES): New.
3061 (debug_ivtype_map): Declared.
3062 (oldiv_for_loop): New.
3063
30642008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3065
3066 PR middle-end/38459
3067 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3068 (param_index): Assert if parameter is not know after parameter
3069 detection.
3070 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3071 (find_scop_parameters): Mark, that we have finished parameter
3072 detection.
3073 (graphite_transform_loops): Move condition detection before parameter
3074 detection.
3075 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3076 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3077
30782008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3079
3080 * graphite.c (graphite_transform_loops): Always call find_transform ()
3081 in ENABLE_CHECKING. So we test these code paths, even if we do not
3082 generate code.
3083
30842008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3085
3086 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3087 (print_scop): Ditto.
3088
30892008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3090
3091 PR middle-end/38084
3092 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3093 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3094 regions more than once.
3095
30962008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3097
3098 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3099 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3100 when not needed.
3101
31022008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3103
3104 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3105 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3106 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3107 (max_precision_type): New.
3108 (value_clast): Removed.
3109 (clast_to_gcc_expression): Be more careful to types of expressions.
3110 Use max_precision_type and update use of gmp_cst_to_tree.
3111 (graphite_translate_clast_equation): Use max_precision_type.
3112 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3113 use the type of the condition.
3114 (graphite_create_new_loop): Do not use integer_type_node, use the
3115 max_precision_type of lb and ub.
3116
31172008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3118
3119 * graphite.c (build_scops_1): Initialize open_scop.exit
3120 and sinfo.last.
3121
31222008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3123
3124 * testsuite/gcc.dg/graphite/pr38084.c: New.
3125 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3126 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3127 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3128 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3129 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3130
31312008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3132 Jan Sjodin <jan.sjodin@amd.com>
3133 Harsha Jagasia <harsha.jagasia@amd.com>
3134
3135 PR middle-end/37852
3136 PR middle-end/37883
3137 PR middle-end/37928
3138 PR middle-end/37980
3139 PR middle-end/38038
3140 PR middle-end/38039
3141 PR middle-end/38073
3142 PR middle-end/38083
3143 PR middle-end/38125
3144
3145 * testsuite/gcc.dg/graphite/pr38073.c: New.
3146 * testsuite/gcc.dg/graphite/pr37928.c: New.
3147 * testsuite/gcc.dg/graphite/pr37883.c: New.
3148 * testsuite/gcc.dg/graphite/pr38125.c: New.
3149 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3150 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3151 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3152
3153 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3154 the number of detected scops. Copy exact same test for loop
3155 blocking...
3156 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3157 loops to be blocked as reductions are not handled.
3158 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3159
3160 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3161 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3162 ...here.
3163 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3164 * Makefile.in (graphite.o): Depend on value-prof.h.
3165 (graphite.o-warn): Removed -Wno-error.
3166 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3167 to be a NULL pointer. Call update_stmt. Return the newly created
3168 cannonical induction variable.
3169
3170 * graphite.h (debug_rename_map): Declared. Fix some comments.
3171
3172 * graphite.c: Reimplement the code generation from graphite to gimple.
3173 Include value-prof.h.
3174 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3175 (get_old_iv_from_ssa_name): Removed.
3176 (graphite_stmt_p): New.
3177 (new_graphite_bb): Test for useful statements before building a
3178 graphite statement for the basic block.
3179 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3180 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3181 reason.
3182 (recompute_all_dominators, graphite_verify,
3183 nb_reductions_in_loop, graphite_loop_normal_form): New.
3184 (scop_record_loop): Call graphite_loop_normal_form.
3185 (build_scop_loop_nests): Iterate over all the blocks of the
3186 function instead of relying on the incomplete information from
3187 SCOP_BBS. Return the success of the operation.
3188 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3189 (add_bb_domains): Removed.
3190 (build_loop_iteration_domains): Don't call add_bb_domains.
3191 Add the iteration domain only to the basic blocks that have been
3192 translated to graphite.
3193 (build_scop_conditions_1): Add constraints only if the basic
3194 block have been translated to graphite.
3195 (build_scop_data_accesses): Completely disabled until data
3196 dependence is correctly implemented.
3197 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3198 (remove_all_edges_1, remove_all_edges): Removed.
3199 (get_new_name_from_old_name): New.
3200 (graphite_rename_variables_in_stmt): Renamed
3201 rename_variables_in_stmt. Call get_new_name_from_old_name.
3202 Use replace_exp and update_stmt.
3203 (is_old_iv): Renamed is_iv.
3204 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3205 Use replace_exp and update_stmt.
3206 (expand_scalar_variables_expr): Same. Use the map to get the
3207 new names for the renaming of induction variables and for the
3208 renaming of variables after a basic block has been copied.
3209 (expand_scalar_variables): Same.
3210 (graphite_rename_variables): Renamed rename_variables.
3211 (move_phi_nodes): Removed.
3212 (get_false_edge_from_guard_bb): New.
3213 (build_iv_mapping): Do not insert the induction variable of a
3214 loop in the renaming iv map if the basic block does not belong
3215 to that loop.
3216 (register_old_new_names, graphite_copy_stmts_from_block,
3217 copy_bb_and_scalar_dependences): New.
3218 (translate_clast): Heavily reimplemented: copy basic blocks,
3219 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3220 At each translation step call graphite_verify ensuring the
3221 consistency of the SSA, loops and dominators information.
3222 (collect_virtual_phis, find_vdef_for_var_in_bb,
3223 find_vdef_for_var_1, find_vdef_for_var,
3224 patch_phis_for_virtual_defs): Removed huge hack.
3225 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3226 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3227 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3228 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3229 if_region_get_condition_block, if_region_set_false_region,
3230 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3231 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3232 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3233 rewrite_into_sese_closed_ssa): New.
3234 (gloog): Remove dead code. Early return if code cannot be
3235 generated. Call cleanup_tree_cfg once the scop has been code
3236 generated.
3237 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3238 block loops with less than two loops.
3239 (graphite_apply_transformations): Remove the call to
3240 scop_remove_ignoreable_gbbs.
3241 (limit_scops): When build_scop_loop_nests fails, continue on
3242 the next scop. Fix open_scop.entry.
3243 (graphite_transform_loops): Call recompute_all_dominators: force the
3244 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3245 Call initialize_original_copy_tables and free_original_copy_tables
3246 to be able to copy basic blocks during code generation.
3247 When build_scop_loop_nests fails, continue on next scop.
3248 (value_clast): New union.
3249 (clast_to_gcc_expression): Fix type cast warning.
3250
32512008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3252
3253 * Merge from mainline (r140838:141727).
3254
32552008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3256
3257 PR middle-end/37833
3258
3259 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3260
32612008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3262
3263 PR middle-end/37943
3264
3265 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3266 exits and conditions.
3267 * testsuite/gcc.dg/graphite/pr37943.c: New.
3268
32692008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3270
3271 PR middle-end/37886
3272 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3273
32742008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3275
3276 * doc/invoke.texi: Fix spaces.
3277
32782008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3279
3280 PR tree-optimization/37891
3281 Reverted last commit.
3282 * graphite.c (create_single_entry_edge): Set
3283 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3284
32852008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3286 Mitul Thakkar <mitul.thakkar@amd.com>
3287
3288 * graphite.c (create_single_entry_edge): Set
3289 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3290
32912008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3292
3293 * doc/invoke.texi: Add -fgraphite-identity.
3294 * graphite.c (graphite_apply_transformations): Check for
3295 -fgraphite-identity.
3296 * toplev.c (process_options): Add flag_graphite_identity.
3297 * tree-ssa-loop.c: Add flag_graphite_identity.
3298
32992008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3300
3301 Undo changes from 2008-10-02:
3302 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3303 operand type when copying the operand to a variable of different type.
3304 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3305 with the IV name after increment.
3306
33072008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3308 Harsha Jagasia <harsha.jagasia@amd.com>
3309
3310 PR tree-optimization/37828
3311 * testsuite/gcc.dg/graphite/pr37828.c: New.
3312 * graphite.c (graphite_trans_loop_block): Do not loop block
3313 single nested loops.
3314
33152008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3316 Sebastian Pop <sebastian.pop@amd.com>
3317
3318 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3319 rename_map_elt_info, eq_rename_map_elts): New.
3320 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3321 (expand_scalar_variables_expr): Change parameters.
3322 (expand_scalar_variables_stmt): Same.
3323 (expand_scalar_variables): Same.
3324 (graphite_rename_ivs): Rename graphite_rename_variables.
3325 (build_iv_mapping): New.
3326 (translate_clast): Call build_iv_mapping.
3327 * graphite.h (gbb_p): New name.
3328
33292008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3330
3331 PR tree-optimization/37684
3332 * gcc.dg/graphite/pr37684.c: New.
3333 * graphite.c (exclude_component_ref): New.
3334 (is_simple_operand): Call exclude_component_ref.
3335
33362008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3337 Harsha Jagasia <harsha.jagasia@amd.com>
3338
3339 PR tree-optimization/37485
3340 * gcc.dg/graphite/block-2.c: New
3341 * graphite.c (gmp_cst_to_tree): Moved.
3342 (iv_stack_entry_is_constant): New.
3343 (iv_stack_entry_is_iv): New.
3344 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3345 (loop_iv_stack_insert_constant): New.
3346 (loop_iv_stack_pop): Use new datatpype.
3347 (loop_iv_stack_get_iv): Same.
3348 (loop_iv_stack_get_iv_from_name): Same.
3349 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3350 (loop_iv_stack_patch_for_consts): New.
3351 (loop_iv_stack_remove_constants): New.
3352 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3353 (translate_clast): Call loop_iv_stack_patch_for_consts and
3354 loop_iv_stack_remove_constants.
3355 (gloog): Use new datatype. Redirect construction edge to end
3356 block to avoid accidental deletion.
3357 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3358 iv stack entry.
3359 (union iv_stack_entry_data): New. Data in iv stack entry.
3360 (struct iv_stack_entry): New. Datatype for iv stack entries.
3361
33622008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3363
3364 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3365 operand type when copying the operand to a variable of different type.
3366
33672008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3368
3369 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3370 with the IV name after increment.
3371
33722008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3373
3374 * Merge from mainline (r140164:140838).
3375
33762008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3377
3378 * graphite-data-ref.c: New.
3379 * graphite.c (print_scop): Also dump the dependence graph.
3380 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3381 (new_scop): Initialize SCOP_DEP_GRAPH.
3382 (build_scop_dynamic_schedules): New.
3383 (build_access_matrix_with_af): Fixed column numbering.
3384 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3385 * graphite.h: Add ifndef/define guards against multiple inclusion.
3386 (struct scop): Add dep_graph field.
3387 (SCOP_DEP_GRAPH): Defined.
3388 (ref_nb_loops): Fixed and moved to other position.
3389 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3390 (nb_loops_around_loop_in_scop): New.
3391 (graphite_dump_dependence_graph): Declared.
3392 (graphite_build_rdg_all_levels): Declared.
3393 (graphite_test_dependence): Declared.
3394 * Makefile.in (graphite-data-ref.o): New target.
3395
33962008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3397
3398 * Merge from mainline (139870:140164).
3399
34002008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3401
3402 * Merge from mainline (138275:139870).
3403 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3404 the commits from trunk broke the niter detection.
3405
34062008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3407
3408 * graphite.c: Add more documentation. Fix formatting.
3409 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3410 loop_iv_stack_debug): Moved...
3411 (schedule_to_scattering): Move before use.
3412 (dot_all_scops): Include in "#if 0" the code for system
3413 call dotty.
3414
3415 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3416 loop_iv_stack_debug): ...here.
3417
34182008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3419
3420 * tree-phinodes.c (make_phi_node): Extern.
3421 (add_phi_node_to_bb): New.
3422 (create_phi_node): Call add_phi_node_to_bb.
3423 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3424 (remove_statement): Handle case where stored phi was updated
3425 and is no longer the same.
3426 * graphite.c (is_parameter): New.
3427 (is_old_iv): New.
3428 (expand_scalar_variables_expr): New.
3429 (expand_scalar_variables_stmt): New.
3430 (expand_scalar_variables): New.
3431 (move_phi_nodes): Create new phi instead of moving old one.
3432 (translate_clast): Call expand_scalar_variables.
3433 (find_vdef_for_var_in_bb): Also scan regular definitions.
3434 (skip_phi_defs): New.
3435 (collect_scop_exit_phi_args): New.
3436 (patch_scop_exit_phi_args): New.
3437 (gloog): Patch phis after scop.
3438 * tree-flow.h: (add_phi_node_to_bb): Declared.
3439 (make_phi_node): Declared.
3440
34412008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3442
3443 * graphite.c (end_scop): Split the entry of the scop when it
3444 is the header of the loop in which the scop is ending.
3445 (build_scops_1, limit_scops): Update uses of end_scop.
3446
34472008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3448
3449 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3450 SCOP_ENTRY or SCOP_EXIT.
3451
34522008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3453
3454 * graphite.c (get_construction_edge): Removed.
3455 (gloog): Construction edge is the scop entry edge.
3456
34572008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3458
3459 * graphite.c (can_generate_for_scop): Removed.
3460 (gloog): Do not call it.
3461
34622008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3463
3464 * graphite.c (new_scop): Entry of a scop is an edge.
3465 Initialize SESE region.
3466 (free_scop): Free SESE region.
3467 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3468 (split_difficult_bb): New, split from end_scop.
3469 (end_scop): Exit of a scop is an edge.
3470 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3471 not automatically updated and thus is always wrong.
3472 * graphite.h (struct sese): New.
3473 (SESE_ENTRY): New.
3474 (SESE_EXIT): New.
3475 (struct scop): New field for a SESE region. Remove entry, exit.
3476 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3477 semantics as before. Moved comment around.
3478
34792008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3480 Sebastian Pop <sebastian.pop@amd.com>
3481
3482 * graphite.c (graphite_transform_loops): Always enable gloog
3483 and find_transform when ENABLE_CHECKING.
3484
34852008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3486
3487 * graphite.c (graphite_transform_loops): Move pretty printer
3488 of SCOPs before doing any transform. Remove call to print_scops
3489 and dot_all_scops_1.
3490
34912008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3492
3493 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3494 (print_graphite_bb): Same.
3495
34962008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3497
3498 * graphite.c (dot_all_scops_1): Cleanup.
3499 (move_scops): Fix comment.
3500
35012008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3502
3503 * graphite.c (build_scop_bbs): Revert commit 139355:
3504
3505 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3506 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3507
3508 * graphite.c (build_scop_bbs): Factor up code.
3509
35102008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3511
3512 * graphite.c (gloog): Update dominator info.
3513
35142008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3515
3516 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3517
35182008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3519
3520 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3521 initialization.
3522 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3523 (translate_clast): Correct formatting.
3524 * graphite.h (struct num_map): Removed.
3525 (struct graphite_bb): Remove num_map field.
3526 (GBB_INDEX_TO_NUM_MAP): Removed.
3527
35282008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3529
3530 * graphite.c (build_access_matrix_with_af): Fix comments.
3531 (build_scop_data_accesses): Same.
3532
35332008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3534
3535 * graphite.c (build_scop_data_accesses): Don't construct
3536 access matrices. Add a FIXME and an assert condition that
3537 should pass when the access matrices will be needed.
3538
35392008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3540
3541 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3542 really_constant_p.
3543 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3544 Moved close by free_graphite_bb.
3545 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3546 (new_scop): Move close by free_scop.
3547 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3548
35492008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3550
3551 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3552 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3553 instead of recursive call.
3554 (graphite_translate_clast_equation): New.
3555 (graphite_create_guard_cond_expr): New.
3556 (graphite_create_new_guard): New.
3557 (get_stack_index_from_iv): Removed.
3558 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3559 (get_true_edge_from_guard_bb): New.
3560 (translate_clast): Handle stmt_guard in clast.
3561 (get_construction_edge): Allow construction edge detection for
3562 a scope entry with multiple predecessors if one predecessor is
3563 the immediate dominator of scope entry.
3564 (can_generate_code_stmt): Enable code generation for clast_guard.
3565 (gloog): Use correct context loop. Removed check for post dominators.
3566 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3567
35682008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3569
3570 * graphite.c (remove_dead_loops): Document better which
3571 loops are removed.
3572
35732008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3574
3575 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3576 and PPLINC.
3577 (graphite.o): Also depends on pointer-set.h.
3578
35792008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3580
3581 * graphite.c (scop_record_loop): Fix compile warning.
3582
35832008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3584 Sebastian Pop <sebastian.pop@amd.com>
3585
3586 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3587
35882008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3589
3590 * graphite.c (build_graphite_bb): Initialize bb->aux to
3591 point to the graphite_bb_p.
3592 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3593 content of bb->aux.
3594 (add_bb_domains): Does not use the scop parameter.
3595 (graphite_transform_loops): Clean bb->aux at the end.
3596
35972008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3598 Sebastian Pop <sebastian.pop@amd.com>
3599
3600 * testsuite/lib/target-supports.exp
3601 (check_effective_target_fgraphite): New.
3602
3603 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3604 check_effective_target_fgraphite returns false.
3605 Set dg-do-what-default to compile.
3606 (scan-graphite-dump-times): Removed.
3607 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3608
3609 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3610 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3611 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3612 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3613 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3614 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3615 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3616 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3617 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3618 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3619 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3620 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3621 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3622 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3623 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3624 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3625 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3626 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3627 * testsuite/gcc.dg/graphite/block-0.c: Same.
3628 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3629 * testsuite/gcc.dg/graphite/block-1.c: Same.
3630 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3631 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3632 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3633 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3634 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3635
36362008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3637
3638 * graphite.c: Fix some XXX comments.
3639 (build_scop_dynamic_schedules): Removed.
3640
36412008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3642
3643 * graphite.h (scop_max_loop_depth): Moved...
3644 * graphite.c (scop_max_loop_depth): ...here.
3645 (remove_all_edges_1): New.
3646 (remove_all_edges): Factored code.
3647 (remove_cond_exprs): Check only the last statement for
3648 a GIMPLE_COND expression.
3649
36502008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3651
3652 * graphite.c (scan_tree_for_params): Early return when the
3653 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3654 (find_scop_parameters): Factor out code.
3655 (graphite_trans_bb_strip_mine): Remove dead code.
3656
36572008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3658
3659 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3660 graphite_trans_bb_move_loop): Factor asserts.
3661 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3662 Do not call calculate_dominance_info and estimate_bb_frequencies.
3663
36642008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3665
3666 * graphite.c (create_loops_mapping, free_loops_mapping,
3667 create_loops_mapping_num, debug_loop_mapping_1,
3668 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3669 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3670 graphite_loops_mapping_add_child_num,
3671 graphite_loops_mapping_insert_child,
3672 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3673 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3674 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3675 create_num_from_index, get_num_from_index,
3676 swap_loop_mapped_depth): Removed.
3677 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3678 (free_scop): Do not call free_loops_mapping.
3679 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3680 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3681 get_loop_mapped_depth.
3682 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3683 (graphite_trans_bb_strip_mine): Same.
3684 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3685 (struct scop): Remove field loops_mapping.
3686
36872008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3688 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3689
3690 * graphite.c (scop_record_loop): Factor out one level of the
3691 condition by early return.
3692 (build_scop_loop_nests): Format following FSF coding style.
3693 (build_scop_dynamic_schedules): Factor out code.
3694 (scopdet_bb_info): Reindent. Default case should not be reachable.
3695
36962008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3697 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3698
3699 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3700 assignments that are not handled as simple operands for now.
3701
37022008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3703 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3704
3705 * graphite.c (build_scop_bbs): Factor up code.
3706
37072008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3708 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3709
3710 * graphite.c (stmt_simple_for_scop_p): Factor code out
3711 of the loop.
3712 (enum gbb_type): New. Group all the GBB_* types under it.
3713 (is_loop_exit): Moved...
3714 (end_scop): Enable BB spliting.
3715 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3716 * cfgloop.h (is_loop_exit): Declared.
3717
37182008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3719
3720 * doc/invoke.texi: Remove strides from examples containing
3721 DO loops when the strides are equal to 1.
3722
37232008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3724 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3725
3726 * graphite.c (graphite_trans_scop_block): Or the result with
3727 the result from graphite_trans_loop_block.
3728 * testsuite/gcc.dg/graphite/block-1.c: New.
3729 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3730 * testsuite/gfortran.dg/graphite/block-2.f: New.
3731
37322008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3733
3734 * graphite.c (graphite_transform_loops): Call cloog_initialize
3735 and cloog_finalize.
3736
37372008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3738
3739 * tree-data-ref.c) (stmt_simple_memref_p): New.
3740 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3741 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3742 (is_simple_operand): Call stmt_simple_memref_p.
3743
3744 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3745 using pointer arithmetic, as this is optimized by PRE and
3746 makes the code too difficult to analyze.
3747
3748 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3749
37502008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3751
3752 * gdbinit.in (pgg): New.
3753
37542008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3755
3756 * graphite.c (graphite_trans_loop_block): Fix warning.
3757
37582008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3759
3760 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3761
37622008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3763
3764 * graphite.c (graphite_trans_bb_block): Remove check for
3765 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3766 Check if loop blocking is profitable for every loop, before applying
3767 the changes.
3768 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3769 if flag_loop_block is set.
3770
37712008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3772
3773 * graphite.c: Add some more documentation for the loop
3774 mapping.
3775
37762008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3777
3778 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3779 * graphite.c: Format on less than 80 columns.
3780 * graphite.h: Same.
3781
37822008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3783
3784 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3785
37862008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3787
3788 * doc/invoke.texi (floop-block, floop-strip-mine,
3789 floop-interchange): Update documentation with examples.
3790
37912008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3792
3793 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3794 add_referenced_var.
3795 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3796
37972008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3798
3799 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3800 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3801 * tree-scalar-evolution.c: Revert useless changes.
3802 * tree-phinodes.c: Same.
3803 * cfghooks.c: Same.
3804 * vec.h: Same.
3805 * tree-vectorizer.h: Same.
3806 * tree-flow.h: Same.
3807 * tree-cfg.c: Same.
3808 * common.opt (fgraphite): Update documentation.
3809
38102008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3811
3812 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3813 -floop-interchange): Add more text for explaining what each of these
3814 flags is doing.
3815 * tree-into-ssa.c (gimple_vec): Moved to...
3816 * graphite.c: Include gimple.h.
3817 (gimple_vec): Moved to...
3818 (del_loop_to_cloog_loop): Removed.
3819 (loop_affine_expr): Do not call create_data_ref when the
3820 operand is a constant.
3821 (new_scop): Use free instead of del_loop_to_cloog_loop.
3822 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3823 * gimple.h (gimple_vec): ... here.
3824
38252008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3826
3827 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3828 latch executions.
3829 (build_loop_iteration_domains): Fail, if latch executions unknown.
3830
38312008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3832
3833 * graphite.c (add_conditions_to_domain): New.
3834 (build_scop_conditions_1): Call add_conditions_to_domain.
3835 (set_cloog_options): Allow to disable optimizations.
3836
38372008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3838
3839 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3840 Do not use walk_dominator_tree.
3841 (find_scop_parameters): Do not use walk_dominator_tree.
3842
38432008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3844
3845 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3846 (idx_record_params): Adapt.
3847 * graphite.h (scop_gimple_loop_depth): New.
3848
38492008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3850
3851 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3852 (scan_tree_for_params): Remove value_init.
3853 (build_scop_context): Remove value_init.
3854 (build_loop_iteration_domains): Remove value_init.
3855 (schedule_to_scattering): Remove value_init.
3856 (graphite_trans_bb_strip_mine): Remove value_init.
3857
38582008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3859
3860 * gcc/graphite.c (limit_scops): New.
3861 (graphite_transform_loops): Add limit SCoPs.
3862 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3863 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3864 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3865 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3866 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3867 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3868 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3869 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3870 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3871 Change loop numbers.
3872 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3873 Change loop numbers.
3874 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3875 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3876 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3877 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3878 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3879 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3880 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3881 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3882 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3883 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3884
38852008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3886
3887 * graphite.c (graphite_transform_loops): Call always find_transform.
3888
38892008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3890
3891 * graphite.c (free_loops_mapping): New.
3892 (stmt_simple_for_scop_p): Fix typo.
3893 (stmt_simple_for_scop_p): Fix tuples functions, that
3894 broke polyhedron.
3895 (free_graphite_bb): Fix some memleaks.
3896 (free_scop): Fix some memleaks.
3897 (scopdet_bb_info): Do not forget some tmp SCoPs.
3898 (find_params_in_bb): Fix some memleaks.
3899 (clast_to_gcc_expression): Fix warning.
3900
39012008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
3902
3903 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
3904 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
3905
39062008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3907
3908 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
3909 Move code ifdef-ed HAVE_cloog...
3910 * graphite.c: Include toplev.h.
3911 ... here.
3912 * Makefile.in (OBJS-common): Always build graphite.o.
3913 (BACKEND): Remove @GRAPHITE@.
3914 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
3915 (graphite.o): Depend on TOPLEV_H.
3916
39172008-08-04 Sebastian Pop <sebastian.pop@amd.com>
3918
3919 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
3920 Remove typo left from polylib to ppl conversion.
3921 * graphite.c (graphite_transforms): Use sorry instead of fatal.
3922
39232008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3924
3925 * toplev.c (process_options): Move the graphite loop optimization
3926 flags...
3927 * tree-ssa-loop.c (graphite_transforms): ... here.
3928 When not configured with CLooG, print to dump_file that
3929 Graphite transforms were not performed.
3930 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
3931 New.
3932 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
3933 scan-graphite-dump-times.
3934
39352008-08-03 Sebastian Pop <sebastian.pop@amd.com>
3936
3937 * graphite.c (dot_scop, dot_all_scops): Do not call system.
3938 Do not open /tmp/scop.dot and /tmp/allscops.dot.
3939
39402008-08-02 Sebastian Pop <sebastian.pop@amd.com>
3941 Jan Sjodin <jan.sjodin@amd.com>
3942
3943 * configure: Regenerated.
3944 * omp-low.c (expand_omp_sections): Remove now unused code.
3945 * config.in (HAVE_polylib): Removed.
3946 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
3947 (PPLLIBS, PPLINC): Added.
3948 * graphite.c: Replace unsigned with int wherever possible.
3949 Don't access Cloog's data structures, but use accessor functions.
3950 Clast's stmt->type is now implemented as a vtable: change the
3951 switches of stmt->type into ifs.
3952 (polylib/polylibgmp.h): Don't include.
3953 (initialize_dependence_polyhedron,
3954 initialize_data_dependence_polyhedron, is_empty_polyhedron,
3955 statement_precedes_p, test_dependence, build_rdg_all_levels,
3956 dump_dependence_graph): Removed until this code is cleaned up
3957 or ported to Cloog.
3958 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
3959 (POLYLIBINC): Renamed PPLINC.
3960
39612008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
3962 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3963 Jan Sjodin <jan.sjodin@amd.com>
3964
3965 Finish the merge and tuplification of graphite.
3966
39672008-07-24 Sebastian Pop <sebastian.pop@amd.com>
3968 Jan Sjodin <jan.sjodin@amd.com>
3969
3970 Partial merge from mainline (138072:138275).
3971 * graphite.c still has to be tuplified.
3972
39732008-07-29 Jan Sjodin <jan.sjodin@amd.com>
3974
3975 * graphite.c (graphite_loops_mapping_max_loop_num): New.
3976 (create_num_from_index): New.
3977 (get_num_from_index): Also pass in the graphite BB.
3978 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
3979 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
3980 (graphite_trans_bb_strip_mine): Call create_num_from_index.
3981 (is_interchange_valid): Return false when failing.
3982 * graphite.h (struct num_map): New.
3983 (struct graphite_bb): New field num_map.
3984 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
3985
39862008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
3987
3988 * graphite.c (dump_gbb_conditions): Print also conditions like
3989 "if (a)". Remove dublicated code and use print_generic_expr ().
3990 (stmt_simple_for_scop_p): Only allow conditions we can handle
3991 {<, <=, >, >=}.
3992
39932008-07-25 Jan Sjodin <jan.sjodin@amd.com>
3994
3995 * graphite.h (struct scop): Removed new_ivs field.
3996 (SCOP_NEWIVS): Deleted.
3997 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
3998 clast_to_gcc_expression, graphite_create_new_loop):
3999 Removed use of new_ivs.
4000
40012008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4002
4003 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4004 create_loops_mapping_num, debug_loop_mapping_1): New.
4005 (debug_loop_mapping): Call debug_loop_mapping_1.
4006 (get_loop_mapping_for_num,
4007 graphite_loops_mapping_add_child,
4008 graphite_loops_mapping_add_child_num,
4009 graphite_loops_mapping_insert_child,
4010 graphite_loops_mapping_parent,
4011 split_loop_mapped_depth_for_num,
4012 loop_mapped_depth_split_loop): New.
4013 (increment_loop_mapped_depths): Removed.
4014 (swap_loop_mapped_depth_for_num): Reimplemented.
4015 (new_scop): Call create_loops_mapping.
4016 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4017 (translate_clast): Pass the old loop father in parameter, and pass
4018 it to get_old_iv_from_ssa_name.
4019 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4020 can_generate_code, can_generate_for_scop): New.
4021 (graphite_trans_bb_block): Returns false when it fails to transform.
4022 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4023
40242008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4025
4026 Reverted all the changes related to the streamization and
4027 loop fusion.
4028 These changes are now tracked in the streamization branch.
4029
40302008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4031 Jan Sjodin <jan.sjodin@amd.com>
4032
4033 * graphite.c (gbb_compare): Correctly constify.
4034 (gbb_can_be_ignored): Indent.
4035 (graphite_trans_scop_swap_1and2): Add legality check.
4036 Remove dead FIXMEs.
4037
40382008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4039
4040 Remove fallouts from "Reverted the Condate changes".
4041 * tree.h: Remove unused decl.
4042 * testsuite/gcc.dg/tree-checker: Same.
4043 * timevar.def: Remove counter.
4044
40452008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4046
4047 * Merge from mainline (135673:138072).
4048
4049 Reverted the MIRO changes (from 2008-04-05) that are now
4050 tracked in the miro branch.
4051 * tree-bounds.c: Removed.
4052 * tree-bounds.h: Removed.
4053
4054 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4055 are now tracked in the condate branch.
4056 * tree-check.c: Removed.
4057 * tree-match.c: Removed.
4058 * condate.y: Removed.
4059
40602008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4061
4062 * common.opt: New user flag -floop-block, -floop-strip-mine
4063 and -floop-interchange.
4064 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4065 graphite loop optimization flags is turned on.
4066 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4067 flag_loop_strip_mine and flag_loop_interchange checks before
4068 optimizations.
4069 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4070 -floop-strip-mine and -floop-interchange.
4071 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4072 -fgraphite.
4073 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4074 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4075 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4076
40772008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4078 Sebastian Pop <sebastian.pop@amd.com>
4079
4080 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4081 (create_empty_loop_on_edge): More fixes.
4082 * tree-phinodes.c (resize_phi_node): Extern.
4083 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4084 * cfghooks.c (update_dominator_information): New split from
4085 split_edge.
4086 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4087 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4088 successor of the function entry block.
4089
4090 * graphite.c: Include pointer-set.h.
4091 (debug_loop_mapping, increment_loop_mapped_depths,
4092 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4093 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4094 swap_loop_mapped_depth_for_num, get_num_from_index,
4095 swap_loop_mapped_depth, loop_iv_stack_debug,
4096 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4097 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4098 get_old_iv_from_ssa_name): New.
4099 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4100 (free_scop): Free SCOP_LOOPS_MAPPING.
4101 (scop_record_loop): Record old ivs.
4102 (create_var_name): Removed.
4103 (initialize_cloog_names): Allocate double space in case strip mine
4104 applies to all loops once.
4105 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4106 (clast_to_gcc_expression): Same. Implement more clast to gimple
4107 translation.
4108 (graphite_create_new_loop): Pass in ivstack.
4109 (remove_all_edges): Pass in the construction_edge.
4110 (graphite_remove_iv): Removed.
4111 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4112 remove_cond_exprs): Rewritten.
4113 (move_phi_nodes): New.
4114 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4115 (translate_clast): Pass in ivstack. Rewrite some cases.
4116 (set_cloog_options, debug_clast_stmt): New.
4117 (find_transform): Use set_cloog_options.
4118 (outermost_loop_layer): Removed.
4119 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4120 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4121 mark_old_loops, remove_dead_loops): New.
4122 (gloog): Rewritten.
4123 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4124 (const_column_index, get_first_matching_sign_row_index,
4125 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4126 get_upper_bound): New.
4127 (graphite_trans_bb_strip_mine): Also update the iv map.
4128
4129 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4130 (struct name_tree): Add a loop field.
4131 (struct scop): Add a graphite_loops_mapping field.
4132 (SCOP_LOOPS_MAPPING): New.
4133 (debug_clast_stmt): Declare.
4134 * lambda.h (find_induction_var_from_exit_cond): Declare.
4135 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4136 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4137 (create_empty_loop_on_edge): Updated.
4138 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4139 rename_variables_in_bb): Declare.
4140 * tree-cfg.c (remove_bb): Extern.
4141
4142 * testsuite/gcc.dg/graphite/block-0.c: New.
4143
41442008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4145 Sebastian Pop <sebastian.pop@amd.com>
4146
4147 * graphite.c (strip_mine_profitable_p): New.
4148 (graphite_trans_bb_block): Disable strip mining if not profitable.
4149
4150 * testsuite/gcc.dg/graphite/scop-18.c: New.
4151 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4152 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4153
41542008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4155 Jan Sjodin <jan.sjodin@amd.com>
4156 Sebastian Pop <sebastian.pop@amd.com>
4157
4158 * graphite.c (is_interchange_valid): New.
4159 (graphite_trans_bb_block): Check loop nest of basic block for legality
4160 of interchange.
4161
4162 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4163 outer_most_loop, gbb_outer_most_loop_index): New.
4164
4165 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4166 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4167 * testsuite/gcc.dg/graphite/scop-16.c: New.
4168 * testsuite/gcc.dg/graphite/scop-17.c: New.
4169
41702008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4171
4172 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4173 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4174
41752008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4176
4177 * graphite.c (new_scop): Initialize SCOP_EXIT.
4178 (scopdet_info): Add.
4179 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4180 (build_scops_1): Cleanup, bugfixes.
4181 (build_scops): Cleanup.
4182
4183 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4184 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4185
41862008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4187
4188 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4189
4190 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4191 DEFAULT_GRAPHITE_FLAGS.
4192
4193 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4194
41952008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4196
4197 * graphite.c (scan_tree_for_params): Do not assert any more if
4198 MULT_EXPR parameter is negative.
4199
4200 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4201
4202 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4203
4204 * testsuite/gcc.dg/graphite/scop-15.c: New.
4205
42062008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4207
4208 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4209
42102008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4211
4212 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4213 graphite_swap_loops.
4214 (graphite_trans_bb_move_loop): New.
4215 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4216 (graphite_trans_bb_block): New.
4217 (graphite_trans_loop_block): New.
4218 (graphite_trans_scop_swap_1and2): Rename from
4219 graphite_trans_swap_1and2.
4220 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4221 (graphite_trans_scop_block): New.
4222 (graphite_apply_transformations): Rename from
4223 graphite_transformations.
4224
4225 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4226
42272008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4228
4229 * graphite.c (gbb_compare): New.
4230 (graphite_sort_gbbs): New.
4231 (gbb_can_be_ignored): New.
4232 (scop_remove_ignoreable_gbbs): New.
4233 (graphite_transformations): Cleanup and add
4234 scop_remove_ignoreable_gbbs.
4235 * lambda.h (lambda_vector_compare): New.
4236
42372008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4238
4239 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4240 (graphite_swap_loops): int -> unsigned
4241 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4242 (graphite_transformations): New.
4243 (graphite_transform_loops): Move to graphite_transformations.
4244 * graphite.h (gbb_nb_loops): Return unsigned.
4245
42462008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4247
4248 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4249 the domain matrix. This makes scop-0.c work again.
4250
42512008-06-20 Richard Guenther <rguenther@suse.de>
4252
4253 * graphite.h: Adjust copyright to GPLv3.
4254 * graphite.c: Likewise.
4255 (stmt_simple_memref_for_scop_p): Split out from ...
4256 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4257 and simplify.
4258 (get_bb_type): Optimize.
4259 (is_pred): Remove.
4260 (is_bb_addable): Fix memleak, replace is_pred call with
4261 single_pred.
4262 (build_scops): Use current_loops.
4263 (param_index): Fix memleak.
4264
42652008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4266
4267 * graphite.c: Fix formatting.
4268
42692008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4270
4271 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4272 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4273 (create_var_name, save_var_name): Newly defined functions.
4274 (initialize_cloog_names): Part of the code factored out to
4275 save_var_name.
4276 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4277 in clast_reduction statement.
4278 (graphite_create_new_loop): Now takes a new parameter
4279 for outer_loop.
4280 (translate_clast): Now also takes the context_loop and bb_exit
4281 parameters. Rewritten the code so that it creates a gimple code
4282 inside the given context.
4283 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4284 remove_cond_expr, disconnect_cond_expr,
4285 disconnect_virtual_phi_nodes): Newly defined functions.
4286 * graphite.h (struct scop): added old_ivs vector.
4287 SCOP_OLDIVS: New macro.
4288
42892008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4290
4291 * cfgloopmanip.c: Add missing function comments, fix formatting.
4292
42932008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4294
4295 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4296 (create_empty_loop_on_edge): Defined.
4297 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4298 instead of void.
4299 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4300 (update_dominators_in_loop): Declared as extern
4301 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4302
43032008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4304
4305 * graphite.c (print_graphite_bb): Allow changing number of loops
4306 in SCoP domain.
4307 (initialize_cloog_names): Allow changing number of loops.
4308 (build_cloog_prog): Simplify.
4309 (find_transform): Enable cloog option --strides.
4310 (graphite_swap_loops): New.
4311 (graphite_strip_mine_loop): New.
4312 (graphite_trans_swap_1and2): New.
4313 (graphite_trans_strip): New.
4314 (graphite_transform_loops): Add graphite_trans_strip.
4315 * graphite.h (scop_max_loop_depth): New.
4316
43172008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4318
4319 * graphite.c (build_scop_iteration_domain): Remove forgotten
4320 line. (Fixes compile)
4321
43222008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4323
4324 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4325 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4326 (build_bb_loops): New.
4327 (graphite_transform_loops): Add build_bb_loops.
4328 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4329 numbers.
4330 * graphite.h (graphite_bb): Add loops.
4331 (gbb_nb_loops): New.
4332 (gbb_loop_at_index): New.
4333 (gbb_loop_index): New.
4334 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4335 using nb_params_in_scop.
4336
43372008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4338
4339 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4340 (build_scop_canonical_schedules): Build minimized schedule.
4341 (schedule_to_scattering): Adapt to minimized schedule.
4342 * graphite.h (graphite_bb): Add/Update descriptions.
4343
43442008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4345 Tobias Grosser <grosser@fim.uni-passau.de>
4346
4347 * graphite.c (print_graphite_bb): Add condition printing.
4348 (dump_value): New.
4349 (dump_gbb_conditions): New.
4350 (build_scop_conditions_1): New.
4351 (build_scop_conditions): New.
4352 * graphite.h (graphite_bb): Add conditions.
4353
43542008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4355
4356 * graphite.c (print_graphite_bb):
4357 (free_graphite_bb): New.
4358 (free_scop): Free bbs.
4359 (get_bb_type): Free doms.
4360 (build_scop_context): Free context matrix.
4361 (build_loop_iteration_domains): Remove unused code.
4362 (build_cloog_prog): Free scattering function and blocklist.
4363 (find_transform): Free options.
4364
43652008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4366
4367 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4368 Remove unnecessery cloog data structures. Make a copy of the domain
4369 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4370 unnecessary cloog data structures. Fix memory leaks. Remove insert
4371 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4372 used.
4373 (build_scop_iteration_domain): Remove unnecessary cloog
4374 data structures. Fix memory leaks.
4375 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4376 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4377
43782008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4379
4380 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4381
43822008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4383
4384 * graphite.c (end_scop): Style fix.
4385 (schedule_to_scattering): Style and comment fix.
4386
43872008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4388 * graphite.c (print_graphite_bb): Fix definiton of
4389 schedule_to_scattering.
4390 (initialize_cloog_names): Change nb_scattdims to max loop
4391 depth in SCoP.
4392 (schedule_to_scattering): Take parameter for number of scattering
4393 dimensions.
4394 (build_cloog_prog): Only build as much scattering dimensions as
4395 necessary.
4396
43972008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4398
4399 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4400 in polyhedron/aermod.f90.
4401
44022008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4403 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4404 Harsha Jagasia <harsha.jagasia@amd.com>
4405
4406 * graphite.c (is_bb_addable): Fix segfault.
4407
44082008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4409
4410 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4411 with multiple exits and conditional handling in edge cases.
4412 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4413
4414 * testsuite/gcc.dg/graphite/scop-14.c: New.
4415
44162008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4417 Adrien Eliche <aeliche@isty.uvsq.fr>
4418
4419 * graphite.c (is_bb_addable): Add more comments and enhance
4420 readablity of the source code. Fix memory leak.
4421 (is_loop_exit): Fix memory leak.
4422
44232008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4424
4425 * graphite.c (first_loop_in_scop): Deleted.
4426 (setup_cloog_loop): Only walk the loop chain for inner loops.
4427 (build_scop_iteration_domain): Execute setup_cloog_loop for
4428 all loops in the first layer.
4429
44302008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4431
4432 * graphite.c (scan_tree_for_params): Change the way params are
4433 added to be indepenent of the number of loops.
4434 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4435 handling.
4436 (build_cloog_prog): Revert to short matrix format.
4437
44382008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4439 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4440
4441 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4442 warning.
4443
44442008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4445
4446 * graphite.c (nb_data_refs_in_scop): New.
4447 (graphite_transform_loops): Print more stats: number of
4448 loops, basic blocks and data references per scop.
4449
44502008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4451 Jan Sjodin <jan.sjodin@amd.com>
4452
4453 * graphite.c (loop_affine_expr, idx_record_params,
4454 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4455 instead of instantiate_parameters.
4456
44572008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4458
4459 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4460 add support for parameters, add STATIC_SCHEDULE at the right places,
4461 cleanup.
4462
44632008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4464
4465 * graphite.c (build_scop_loop_nests): Only add the loops, that
4466 are contained completely in the SCoP.
4467 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4468 and the domains are fixed.
4469 (build_scop_canonical_schedules): Add support for bbs not contained
4470 in any SCoP.
4471
44722008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4473
4474 * graphite.h (scop_contains_loop): Update comments to match
4475 the actual behavior.
4476 (scop_contains_loop): New.
4477 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4478
44792008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4480
4481 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4482 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4483 as GBB_COND_HEADER.
4484
44852008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4486 Tobias Grosser <grosser@fim.uni-passau.de>
4487
4488 * graphite.c (graphite_transform_loops): Early return when
4489 there are no loops in the function.
4490
44912008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4492 Jan Sjodin <jan.sjodin@amd.com>
4493
4494 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4495 offset of the last loop.
4496 (setup_cloog_loop): Copy the entire outer constraint matrix.
4497
44982008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4499 Jan Sjodin <jan.sjodin@amd.com>
4500
4501 * graphite.c (stmt_in_scop_p, function_parameter_p,
4502 invariant_in_scop_p): Removed.
4503 (scan_tree_for_params): Can be used with no constraint
4504 matrix for gathering parameters.
4505 (idx_record_params): Don't use idx_record_param, instead use
4506 scan_tree_for_params.
4507 (find_scop_parameters): Same.
4508 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4509 Fix the size of loop domains.
4510 (schedule_to_scattering): Exit when the outer loop is not in scop.
4511 (find_transform): Enable build_cloog_prog.
4512
45132008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4514 Jan Sjodin <jan.sjodin@amd.com>
4515
4516 * graphite.c (schedule_to_scattering): Make scattering domains
4517 uniformly of the same size, as required by CLooG 0.14.0 and before.
4518
45192008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4520 Jan Sjodin <jan.sjodin@amd.com>
4521
4522 * graphite.c (schedule_to_scattering): Rewrite, correct the
4523 translation of the scheduling function to scattering.
4524 (build_cloog_prog): Call schedule_to_scattering only once.
4525 * graphite.h (scop_loop_index): Do not fail for loops not
4526 in the scop: return -1.
4527
45282008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
4529
4530 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
4531 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
4532 (setup_cloog_loop): Export GBB_DOMAIN.
4533 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
4534 able to rebuild the original control flow.
4535 * graphite.h (graphite_bb): Add domain field and access macro.
4536 (GBB_DOMAIN): New.
4537
45382008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4539
4540 * graphite.c (debug_gbb): New.
4541 (print_scop, build_graphite_bb): Use SCOP_BBS.
4542 (build_scop_bbs): Reimplemented.
4543 (dfs_bb_in_scop_p): Removed.
4544 (build_scop_loop_nests): Reorder loops inserted in
4545 SCOP_LOOP_NEST: outer loops should come first.
4546 (build_scop_canonical_schedules): Reinitialize at zero
4547 the components of the SCOP_STATIC_SCHEDULE for the loops
4548 that have already been parsed.
4549
4550 * graphite.h (debug_gbb): Declared.
4551
45522008-05-30 Sebastian Pop <sebastian.pop@amd.com>
4553 Jan Sjodin <jan.sjodin@amd.com>
4554
4555 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
4556 (graphite_loop_to_gcc_loop): Removed.
4557 (remove_all_edges): New.
4558 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
4559 (gloog): Remove useless code.
4560
45612008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4562
4563 * graphite.c (get_bb_type): Reworked. We distinguish between
4564 loops with one or multiple exits.
4565 (is_loop_exit): New.
4566 (is_pred): New.
4567 (is_bb_addable): Rework condition handling, now support for case
4568 case statements and loops with multiple exits.
4569
4570 * testsuite/gcc.dg/graphite/scop-11.c: New.
4571 * testsuite/gcc.dg/graphite/scop-12.c: New.
4572 * testsuite/gcc.dg/graphite/scop-13.c: New.
4573
45742008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
4575
4576 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
4577 we have too many colors.
4578
45792008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
4580
4581 * doc/invoke.texi (-ftree-loop-fusion): Document.
4582 * tree-pass.h (pass_loop_fusion): Declared.
4583 * tree-loop-fusion.c: New.
4584 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
4585 * tree-data-ref.c (find_data_references_in_loop): Make extern.
4586 * tree-data-ref.h (find_data_references_in_loop): Declared.
4587 * common.opt (ftree-loop-fusion): Declared.
4588 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
4589
45902008-05-21 Sebastian Pop <sebastian.pop@amd.com>
4591
4592 * graphite.c (build_access_matrix): Fix typo from the merge.
4593
45942008-05-20 Sebastian Pop <sebastian.pop@amd.com>
4595
4596 * Merge from mainline (130800:135673).
4597
45982008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4599
4600 * graphite.c (end_scop): The exit of the scop is not part of the scop.
4601 Update dominators after splitting.
4602
46032008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4604
4605 * graphite.c (is_bb_addable): Return the harmful statement.
4606 Factor up some code.
4607 (end_scop): New. Splits end of scope bbs on a harmful statement.
4608 (build_scops_1): Call end_scop.
4609
46102008-05-07 Sebastian Pop <sebastian.pop@amd.com>
4611
4612 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
4613 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
4614 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
4615 build_scops_1): Removed.
4616 (build_scops_2): Renamed build_scops_1.
4617
46182008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4619
4620 * graphite.c: Fix formatting.
4621
46222008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4623
4624 * graphite.c (get_bb_type): New.
4625 (move_scops): New.
4626 (build_scops_2): New.
4627 (is_bb_addable): New.
4628 (build_scops): Switch the scop detection.
4629 (build_scop_bbs): Add entry bb to scop.
4630 * graphite.h (struct scop): Update comment.
4631
46322008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4633
4634 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
4635 more colors.
4636
46372008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4638
4639 * testsuite/gcc.dg/graphite/scop-1.c: Update.
4640 * testsuite/gcc.dg/graphite/scop-2.c: Update.
4641 * testsuite/gcc.dg/graphite/scop-4.c: Update.
4642 * testsuite/gcc.dg/graphite/scop-5.c: Add.
4643 * testsuite/gcc.dg/graphite/scop-6.c: Add.
4644
46452008-05-06 Sebastian Pop <sebastian.pop@amd.com>
4646
4647 * testsuite/gcc.dg/graphite/scop-0.c: Add.
4648 * testsuite/gcc.dg/graphite/scop-7.c: Add.
4649 * testsuite/gcc.dg/graphite/scop-8.c: Add.
4650 * testsuite/gcc.dg/graphite/scop-9.c: Add.
4651 * testsuite/gcc.dg/graphite/scop-10.c: Add.
4652
46532008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
4654
4655 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
4656 Check affine expressions depending on the outermost loop
4657 instead of a scop.
4658 (stmt_simple_for_scop_p): Same.
4659 (harmfule_stmt_in_scop): Same.
4660
46612008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
4662
4663 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
4664 mark entry and exit, that are not part of the SCoP and update HTML
4665 formatting.
4666
46672008-04-25 Sebastian Pop <sebastian.pop@amd.com>
4668
4669 * graphite.c (basic_block_simple_for_scop_p): Renamed
4670 harmful_stmt_in_bb.
4671 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
4672 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
4673 (all_preds_visited_p, all_succs_visited_p,
4674 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
4675 scop_end_loop): New.
4676 (build_scops): Do not use dfs_enumerate_from.
4677
4678 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
4679
46802008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4681
4682 * graphite.c: Add comments to functions that are missing a
4683 description.
4684 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
4685
46862008-04-23 Sebastian Pop <sebastian.pop@amd.com>
4687
4688 * graphite.c (nb_params_in_scop): Moved...
4689 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
4690 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
4691 (clast_to_gcc_expression): Reduce column size to less than 80.
4692 (graphite_create_iv): Return the new name of the IV.
4693 (find_transform): Set options->esp and options->cpp.
4694 (gloog): Comment out the invalidation of the old loop code.
4695 (initialize_dependence_polyhedron): Replace scop_nb_params with
4696 nb_params_in_scop.
4697
4698 * graphite.h (nb_params_in_scop): ... here.
4699 (scop_nb_params): Removed.
4700 (loop_domain_dim): Return something even when the loop was not
4701 found in the hash table: avoid ICEing on all the graphite.exp
4702 testcases.
4703
47042008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4705
4706 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
4707
4708 * graphite.c (build_scop_dynamic_schedules): Schedule is built
4709 according to nesting level.
4710 (find_scop_parameters): Call instantiate_parameters.
4711 (scan_tree_for_params): Extend it to handle general affine bounds.
4712 Inner loop bound can depend on outer loop induction variable.
4713 (setup_cloog_loop): tmp variable is allocated on stack. Call
4714 instantiate_parameters with respect to outermost_loop_in_scop.
4715 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
4716 graphite.h.
4717 (create_empty_loop): Function loopify should be given edge
4718 probability, instead of edge frequency. Dominance relation from
4719 switch_bb to loop_header.
4720 (clast_to_gcc_expression): Added handling of clast_reduction node.
4721 (gloog): New functionality for removing old loop.
4722 (test_dependence): Factored out from build_rdg_all_levels.
4723 (build_rdg_all_levels): Dependence testing factored out to
4724 test_dependence function.
4725
4726 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
4727 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
4728 from graphite.c
4729
47302008-04-07 Sebastian Pop <sebastian.pop@amd.com>
4731
4732 * graphite.c (free_scop, param_index, initialize_cloog_names,
4733 nb_params_in_scop): Use name_tree map instead of just a tree
4734 for keeping track of the variable name associated to that tree.
4735 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
4736 clast_to_gcc_expression, graphite_create_iv,
4737 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
4738 graphite_stmt_to_gcc_stmt): New.
4739 (gloog): Call these.
4740 * graphite.h (struct name_tree): New.
4741 (struct scop): Use name_tree instead of tree for params.
4742 Store a vector of name_tree for new_ivs.
4743 (SCOP_NEWIVS): New.
4744 (scop_nb_params): Use name_tree instead of tree.
4745
47462008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
4747 Sebastian Pop <sebastian.pop@amd.com>
4748
4749 * tree-bounds.c: New.
4750 * tree-bounds.h: New.
4751 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
4752 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
4753 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
4754 flag_mudflap.
4755 * gcc.c: Same.
4756 * toplev.c: Same.
4757 * c-cppbuiltin.c: Same.
4758 * c-pragma.c: Same.
4759 * common.opt: Same.
4760 * varasm.c: Same.
4761 * tree-outof-ssa.c: Same.
4762 * c-common.c: Same.
4763 * Makefile.in: Same.
4764
47652008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
4766 Sebastian Pop <sebastian.pop@amd.com>
4767
4768 * tree-loop-distribution.c (remaining_stmts,
4769 upstream_mem_writes): Removed static variables.
4770 (copy_loop_before, create_bb_after_loop,
4771 mark_nodes_having_upstream_mem_writes, free_rdg_components,
4772 rdg_build_components, rdg_build_partitions,
4773 dump_rdg_partitions): Extern.
4774 (generate_loops_for_partition, generate_code_for_partition): Do not
4775 return a bool.
4776 (already_processed_vertex_p, predecessor_has_mem_write,
4777 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
4778 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
4779 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
4780 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
4781 Pass remaining_stmts and upstream_mem_writes as parameters.
4782 (rdg_component): Moved...
4783 (build_rdg_partition_for_component): Do not aggregate components when
4784 flag_streamize_loops is set.
4785 (gen_sequential_loops): New.
4786 (ldist_gen): Call gen_sequential_loops.
4787
4788 * tree-pass.h (pass_loop_streamization): Declared.
4789
4790 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
4791 basic blocks when loops structures exist.
4792
4793 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
4794
4795 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
4796
4797 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
4798 eliminate_local_variables_stmt, eliminate_local_variables,
4799 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
4800 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
4801 of code delimited by two edges in the CFG.
4802 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
4803 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
4804 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
4805 the case of parallelisation of reductions.
4806 (create_loop_fn): Extern.
4807 (create_omp_parallel_region): New.
4808
4809 * tree-data-ref.c (dump_data_dependence_relation): Don't call
4810 dump_data_reference for printing dra and drb.
4811 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
4812 RDGE_RELATION.
4813 (build_rdg): Don't call free_dependence_relations for the moment, as
4814 we attach dependence relations on each edge of the RDG.
4815 To be fixed later.
4816
4817 * tree-data-ref.h (rdg_component): ...here.
4818 (struct rdg_edge): New field ddr_p relation.
4819 (RDGE_RELATION): New.
4820 (create_bb_after_loop, copy_loop_before,
4821 mark_nodes_having_upstream_mem_writes, rdg_build_components,
4822 rdg_build_partitions, dump_rdg_partitions,
4823 free_rdg_components): Declared.
4824
4825 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
4826 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
4827
4828 * tree-loop-streamization.c: New.
4829
4830 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
4831 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
4832
4833 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
4834
4835 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
4836
4837 * passes.c: Schedule pass_loop_streamization.
4838
48392008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
4840
4841 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
4842 update comment.
4843
48442008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
4845
4846 * graphite.c (dot_all_scops): Update formatting.
4847 Bbs can now be part of more than one SCoP.
4848
48492008-03-04 Sebastian Pop <sebastian.pop@amd.com>
4850
4851 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
4852 malloc problems.
4853 (loop_domain_dim): Check for unregistered toplev SCOP loop.
4854 * graphite.h (loop_to_cloog_loop): New.
4855
48562008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4857
4858 * graphite.c (loop_domain_dim, ref_nb_loops,
4859 loop_iteration_vector_dim): New.
4860 (build_access_matrix_with_af, build_access_matrix,
4861 initialize_dependence_polyhedron): Fixed for new matrix layout.
4862 No longer assume that all iteration domains are of the same
4863 dimensionality.
4864
48652008-03-02 Sebastian Pop <sebastian.pop@amd.com>
4866
4867 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
4868 defined in a loop at depth 0 is invariant.
4869 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
4870 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
4871 be called at loop depth 0.
4872
4873 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
4874 a parameter.
4875 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
4876 (down_open_scop): Removed.
4877 (loop_in_scop_p): Redefined.
4878 (scop_affine_expr): New argument: scop.
4879 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
4880 a harmful statement ending a scop.
4881 (basic_block_simple_for_scop_p): New argument: scop.
4882 (get_loop_start): Removed.
4883 (new_scop): Initialize SCOP_LOOPS.
4884 (free_scop): Free SCOP_LOOPS.
4885 (succs_at_same_depth, preds_at_same_depth): New.
4886 (end_scop): Test the validity of a scop.
4887 (add_dominators_to_open_scops): New.
4888 (test_for_scop_bound): Call add_dominators_to_open_scops.
4889 Add cases for opening and closing multiple scops.
4890 (build_scops, build_scop_bbs): Iterate over basic blocks in
4891 depth first order.
4892 (build_graphite_bb): Pass scop directly.
4893 (dfs_bb_in_scop_p): New.
4894 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
4895 several times.
4896 (nb_loops_around_gb): Use loop_in_scop_p.
4897 (schedule_to_scattering): Disabled for the moment the code computing
4898 the "textual order for outer loop".
4899
4900 * graphite.h (struct scop): New field loops.
4901 (SCOP_LOOPS): New.
4902 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
4903
4904 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
4905
49062008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
4907 Sebastian Pop <sebastian.pop@amd.com>
4908
4909 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
4910 * common.opt (fstreamize-loops): New.
4911 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
4912 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
4913 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
4914 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
4915
49162008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4917
4918 * tree-data-ref.c (build_empty_rdg): New.
4919 (build_rdg): Use it.
4920 * tree-data-ref.h (build_empty_rdg): Declared.
4921 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
4922 (find_vertex_for_stmt): Removed.
4923 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
4924
49252008-02-21 Sebastian Pop <sebastian.pop@amd.com>
4926
4927 * tree-loop-distribution.c (generate_builtin): After cancelling the
4928 loop tree, also delete basic blocks.
4929 (rdg_flag_uses): Stop recursion when a vertex has already been
4930 processed.
4931
49322008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4933
4934 * graphite.c (build_scop_alpha): Removed.
4935 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
4936 and dump_dependence_graph to avoid compiler warnings.
4937
49382008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4939
4940 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
4941 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
4942 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
4943 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
4944 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
4945 (initialize_dependence_polyhedron, find_vertex_for_stmt,
4946 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4947 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
4948 dump_dependence_graph): New.
4949 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
4950 (GBB_ALPHA): New.
4951 (struct scop): New field loop2cloog_loop.
4952 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
4953 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
4954
49552008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4956
4957 * graphite.c (build_graphite_bb): Fix initialization
4958 of the graphite basic block.
4959
49602008-02-05 Sebastian Pop <sebastian.pop@amd.com>
4961
4962 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
4963 loop domain matrix. Pass in the number of loops contained in the
4964 constraint matrix.
4965 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
4966 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
4967 loops that are not surrounding the current loop are not represented
4968 in the domain constraint matrix.
4969 (build_scop_iteration_domain): Initial domain constraint matrix
4970 contains only the eq/ineq, cst, and scop parameters columns.
4971
49722008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4973
4974 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
4975 (print_graphite_bb): Print scattering.
4976
49772008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4978
4979 * graphite.c (initialize_cloog_names): Initialize names of
4980 scattering variables.
4981
49822009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4983
4984 * graphite.c (dot_all_scops_1): Disable debug output while
4985 printing graph.
4986
49872008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
4988
4989 * graphite.c (find_transform): Change cloog output language to C.
4990
49912008-01-27 Sebastian Pop <sebastian.pop@amd.com>
4992
4993 * tree-loop-distribution.c (generate_memset_zero,
4994 generate_builtin, generate_code_for_partition,
4995 rdg_flag_all_uses): New.
4996 (rdg_flag_uses): Gather in the same partition the statements defining
4997 the VUSES of the current statement.
4998 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
4999 Gather in the same partition not only the stores to the same memory
5000 access, but also the reads.
5001 (ldist_generate_loops): Renamed ldist_gen.
5002
50032008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5004 Tobias Grosser <grosser@fmi.uni-passau.de>
5005
5006 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5007 next pointer, don't use the inner pointer.
5008
50092008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5010
5011 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5012 (find_transform): Call dot_all_1.
5013 * graphite.h (dot_all_scops): Declared.
5014
50152007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5016
5017 * tree-loop-distribution.c: Fix apsi.f ICE.
5018 (create_bb_after_loop): New.
5019 (generate_loops_for_partition): Use it.
5020 * testsuite/gfortran.dg/ldist-1.f90: New.
5021
5022 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5023 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5024
50252007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5026
5027 * graphite.c (find_transform): Dump cloog program sent to cloog.
5028
50292007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5030
5031 * graphite.c (initialize_cloog_names): Initialize cloog
5032 iterator names.
5033
50342007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5035
5036 * graphite.c (build_scop_context): Fix typo, for the matrix
5037 format: insert '0 >= 0' instead of '-1 >= 0'.
5038
50392007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5040
5041 * Fix merge problems.
5042
50432007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5044
5045 * graphite.c (setup_cloog_loop): Fix typo.
5046
50472007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5048
5049 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5050 * tree-loop-distribution.c: Reimplemented.
5051 * tree-pass.h (pass_loop_distribution): New.
5052 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5053 print_loops.
5054 * graphds.h (struct graph): New field indexes.
5055 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5056
5057 * tree-vect-analyze.c: Remove declaration of static functions when not
5058 needed.
5059 * tree-vectorizer.c: Same.
5060 (rename_variables_in_loop): Now extern.
5061 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5062 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5063 calling redirect_edge_and_branch_force.
5064
5065 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5066
5067 * tree-data-ref.c: Don't include tree-chrec.h.
5068 (debug_data_dependence_relations): New.
5069 (dump_data_dependence_relation): Call dump_data_reference on data refs
5070 in the relation.
5071 (same_access_functions): Moved...
5072 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5073 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5074 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5075 struct rdg_vertex_info, ): New.
5076 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5077 at DDR_REVERSED_P.
5078 (create_rdg_vertices): Initialize the htab of graph->indexes.
5079 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5080 (stmts_from_loop): Don't save LABEL_EXPR.
5081 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5082 hash_stmt_vertex_del): New.
5083 (build_rdg): Initialize rdg->indexes.
5084 (free_rdg, stores_from_loop, ref_base_address,
5085 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5086 have_similar_memory_accesses_1, ref_base_address_1,
5087 remove_similar_memory_refs): New.
5088
5089 * tree-data-ref.h: Include tree-chrec.h.
5090 (debug_data_dependence_relations): Declared.
5091 (same_access_functions): ...here. Now static inline.
5092 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5093 ddr_dependence_level): New.
5094 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5095 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5096 RDG_MEM_READS_STMT): New.
5097 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5098 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5099 rdg_vertex_for_stmt): Declared.
5100 (struct rdg_edge): New field level.
5101 (RDGE_LEVEL, free_rdg): New.
5102 (stores_from_loop, remove_similar_memory_refs,
5103 rdg_defs_used_in_other_loops_p,
5104 have_similar_memory_accesses): Declared.
5105 (rdg_has_similar_memory_accesses): New.
5106
5107 * lambda.h (dependence_level): New.
5108 * common.opt (ftree-loop-distribution): New.
5109 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5110 (print_loop_ir): Renamed print_loops.
5111 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5112 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5113 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5114 (tree-loop-distribution.o): Added.
5115 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5116 (mark_virtual_ops_in_bb): New.
5117 (print_loops_bb, debug_loop_num, debug_loop): New.
5118 * passes.c: Scheduled pass_loop_distribution.
5119
51202007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5121
5122 * graphite.c (scan_tree_for_params): Correct the number of columns
5123 for polylib format.
5124 (nb_flat_iterator): New.
5125 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5126 (build_scop_iteration_domain): Correct the number of columns for
5127 polylib format.
5128
51292007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5130
5131 * Merge from mainline (129697:130800).
5132
51332007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5134
5135 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5136 dominated by SCoP's exit.
5137 (graphite_transform_loops): Compute post dominators.
5138
51392007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5140
5141 * Merge from mainline (127169:129697).
5142
51432007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5144
5145 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5146 parameter for the basic block that contains the expression. Use
5147 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5148 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5149 the expression.
5150 * graphite.h (gbb_loop): New.
5151 (GBB_LOOP): Removed.
5152
51532007-08-03 Sebastian Pop <sebpop@gmail.com>
5154
5155 * Makefile.in: Fix merge problem.
5156
51572007-08-03 Sebastian Pop <sebpop@gmail.com>
5158
5159 * Merge from mainline (125309:127169).
5160 * tree-loop-distribution.c: Disabled.
5161
51622007-06-05 Sebastian Pop <sebpop@gmail.com>
5163
5164 * Merge from mainline (r123693:125309).
5165
51662007-05-30 Sebastian Pop <sebpop@gmail.com>
5167
5168 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5169 correct_modify_p
5170 (correct_modify_p, check_statements, number_of_lvalue_uses,
5171 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5172 instead of MODIFY_EXPR.
5173 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5174 and push new edges.
5175
51762007-05-24 Sebastian Pop <sebpop@gmail.com>
5177
5178 * tree-loop-distribution.c (struct rdg): Replace arrays by
5179 VECs for edges and vertices.
5180 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5181 (RDGV_NB_PARTITIONS): New.
5182 (PRDG_NBV, PRDG_NBE): Removed.
5183 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5184 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5185 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5186
51872007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5188 Sebastian Pop <sebpop@gmail.com>
5189
5190 * doc/invoke.texi (-ftree-loop-distribution): Document.
5191 * tree-loop-distribution.c: New file.
5192 * tree-pass.h (pass_loop_distribution): Declared.
5193 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5194 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5195 and set reversed_p.
5196 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5197 (DDR_REVERSED_P): New.
5198 * common.opt (-ftree-loop-distribution): New.
5199 * tree-flow.h (distribute_loops): Declared.
5200 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5201 * passes.c (init_optimization_passes): Schedule loop distribution.
5202
52032007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5204
5205 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5206 (print_scop): Don't print when scop is NULL.
5207 (build_scop_context, find_transform): Don't output to stderr.
5208
52092007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5210
5211 * tree-data-ref.c: Don't include graphite.h.
5212 Comment out the code for printing data reference's scop.
5213 (build_access_matrix_with_af): Moved...
5214 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5215 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5216 (print_graphite_bb): Print basic block's schedule.
5217 (print_scop): Don't print the schedule, call cloog's pretty printer.
5218 (bb_in_scop_p): A basic block is in a scop only if it is both
5219 dominated and postdominated by the scop's entry and exit basic blocks.
5220 (function_parameter_p): New.
5221 (invariant_in_scop_p): Use function_parameter_p.
5222 (new_scop, save_scop): New.
5223 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5224 save_scop.
5225 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5226 (loop_in_scop_p): New.
5227 (scop_record_loop): Use loop_in_scop_p.
5228 (build_scop_domain): Renamed build_scop_iteration_domain.
5229 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5230 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5231 setup_cloog_loop, dot_scop_1, dot_scop): New.
5232 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5233 (struct scop): Add a pointer to cloog's representation of a program.
5234
52352007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5236
5237 * doc/invoke.texi (-ftree-check-verbose): Renamed
5238 -ftree-checks-verbose.
5239 * common.opt (flag_tree_check_verbose): Renamed
5240 flag_tree_checks_verbose.
5241 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5242
52432007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5244
5245 * configure: Regenerated.
5246 * config.in: Regenerated.
5247 * tree-ssa-loop.c (graphite_transforms): Execute
5248 graphite_transform_loops only when HAVE_cloog.
5249 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5250 * graphite.c: Include polylibgmp.h and cloog.h.
5251 (graphite_transform_loops): Removed loops parameter.
5252 * tree-flow.h (graphite_transform_loops): Update declaration.
5253 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5254 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5255 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5256 (OBJS-common): Remove dependence on graphite.o.
5257 (BACKEND): Depend on @GRAPHITE@.
5258
52592007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5260
5261 * doc/invoke.texi (-ftree-check-verbose): Documented.
5262 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5263 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5264 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5265 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5266 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5267 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5268 * common.opt (ftree-checks-verbose): New.
5269 * tree-check.c (tree_check_warning): Move extra stderr output
5270 under control of flag_tree_check_verbose.
5271
52722007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5273
5274 * tree-match.c: Fix comments formatting.
5275 * tree-match.h: Fix comments formatting.
5276 * tree-check.c: Fix comments formatting.
5277 (tree_check_init): Restructure.
5278
52792007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5280
5281 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5282
52832007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5284
5285 * Merge from mainline (r120733:123693).
5286
52872007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5288
5289 * condate.y: New file.
5290 * tree-match.h (struct patt_info_s): New field sign.
5291 (struct condate_s): New field msg.
5292 (normalize_condate, name_condate, add_condate): New.
5293 (conds[], condate_parse): Made extern.
5294 * tree-check.c (tree_check_warning): First arg changed to cond;
5295 warning reformatted.
5296 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5297 (tree_scan): New.
5298 (tree_check): Process trivial condates.
5299 (read_delimited_string): Removed.
5300 (print_cond): Print name and msg.
5301 (conds[]): Made extern.
5302 (parse_tree_check_file_once): Rewritten to use the parser in
5303 condate.y.
5304 Processing of option --tree_check_string moved to tree_scan().
5305 * Makefile.in: Added condate.y
5306
53072007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5308
5309 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5310 Use VECs instead of varrays.
5311 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5312 * Makefile.in (pretty-print.o): Depend on vec.h.
5313 * pretty-print.c: Include tree.h and vec.h.
5314 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5315 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5316 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5317 pp_free_list): Use VECs instead of varrays.
5318 * pretty-print.h: Do not include varray.h.
5319 (struct tree_chunk_s): Declaration moved before its use.
5320 (output_buffer): Rename varray field to chunks.
5321 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5322 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5323 save_global_holes): Use VECs instead of varrays.
5324 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5325 * tree-check.c (scan_cfg_stmts, push_node,
5326 print_matching_stmt): Removed.
5327 (tree_check_instance, push_global_holes_if_new, tree_check,
5328 execute_tree_check): Use VECs instead of varrays.
5329 (gate_tree_check): Don't execute the CFG check when basic_block_info
5330 is not available.
5331
53322007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5333
5334 * Merge from mainline (r115016:120733).
5335
53362007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5337
5338 * Merge from mainline (r117632:117661).
5339
53402007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5341
5342 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5343 * tree-pass.h (TDF_DEBUG, debug_p): New.
5344 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5345 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5346 get_loop_exit_condition, analyze_evolution_in_loop,
5347 analyze_initial_condition, analyze_scalar_evolution,
5348 instantiate_parameters, number_of_latch_executions): Use debug_p.
5349 * tree-chrec.c (chrec_apply): Use debug_p.
5350 * tree-data-ref.c: Include graphite.h.
5351 (dump_data_reference): Print also the access matrix.
5352 (analyze_array, analyze_indirect_ref, init_data_ref,
5353 analyze_offset_expr, address_analysis, object_analysis,
5354 create_data_ref, finalize_ddr_dependent,
5355 non_affine_dependence_relation, analyze_ziv_subscript,
5356 analyze_siv_subscript_cst_affine,
5357 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5358 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5359 analyze_miv_subscript, analyze_overlapping_iterations,
5360 build_classic_dist_vector, subscript_dependence_tester,
5361 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5362 (build_access_matrix_with_af): No longer static.
5363 * tree-data-ref.h (scop_p): ... declaration here.
5364 (data_reference.scop): New field.
5365 (DR_SCOP, DR_ACCESS_MATRIX): New.
5366 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5367 * graphite.c (print_graphite_bb): Call dump_data_references.
5368 (print_scop): Use scop_nb_loops and scop_dim_domain.
5369 (test_for_scop_bound): Use debug_p.
5370 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5371 scop_nb_params.
5372 (scop_loop_index): Moved...
5373 (scop_record_loop): New.
5374 (build_scop_loop_nests): Use scop_record_loop.
5375 (build_scop_domain): Use scop_dim_domain.
5376 (build_access_matrix): Implemented.
5377 (build_scop_canonical_schedules): Use scop_nb_loops.
5378 (build_graphite_bb): Initialize GBB_SCOP.
5379 * graphite.h (scop_p): Moved...
5380 (graphite_bb.scop): New field.
5381 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5382 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5383 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5384 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5385 scop_loop_index): New.
5386 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5387
53882007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5389
5390 * Merge from mainline (r117661:120450).
5391
53922006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5393
5394 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5395 at the first declaration outside the varying loop, instantiate as
5396 far as possible.
5397 * tree-chrec.c (for_each_scev_op): New.
5398 * tree-chrec.h (for_each_scev_op): Declared.
5399 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5400 * tree-data-ref.c (get_references_in_stmt,
5401 find_data_references_in_stmt): New, from trunk.
5402 (find_data_references_in_loop): Use get_references_in_stmt
5403 and find_data_references_in_loop, modified as in trunk.
5404 (build_access_matrix_with_af): New.
5405 * tree-data-ref.h (data_reference): Add a field access_matrix.
5406 (data_ref_loc): New, as in trunk.
5407 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5408 invariant_in_scop_p, param_index, scan_tree_for_params,
5409 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5410 idx_record_param, idx_record_params, build_access_matrix,
5411 build_scop_data_accesses, build_scop_canonical_schedules,
5412 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5413 build_scop_params): New.
5414 * graphite.h (graphite_bb): New.
5415 (scop): Add fields static_schedule, params, loop_nest,
5416 iteration_domain.
5417 * lambda.h: Declare vecs of lambda_matrix.
5418 * tree-flow.h (print_loop_ir_bb): Declared.
5419 * tree-cfg.c (print_loop_ir_bb): New.
5420 (print_loop): Use print_loop_ir_bb.
5421
54222006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5423
5424 * Merge from mainline (r115016:117632).
5425
54262006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5427
5428 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5429 break due to a warning.
5430
54312006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5432
5433 * graphite.c (print_scops, debug_scops): New.
5434 (graphite_transform): Renamed graphite_find_transform.
5435 * graphite.h (debug_scops): Declared.
5436
54372006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5438
5439 * tree-match.c: Reformat following the GNU style.
5440 * tree-match.h: Reformat following the GNU style.
5441 * tree-pattern.h: Removed empty file.
5442 * Makefile.in: Remove references to tree-pattern.h.
5443 * tree-check.c: Reformat following the GNU style.
5444 (execute_tree_check): Move gate condition code to...
5445 (gate_tree_check): ...here. New function.
5446 (pass_check): Use the gate function.
5447
54482006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5449
5450 * tree-pattern.h: New. Tree pattern matching and checking using
5451 concrete syntax.
5452 * tree-check.c: New. Tree/CFG checking pass.
5453 * tree-match.c: New. Library for tree pattern matching.
5454 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5455 * toplev.c, flags.h: Add globals for tree-check pass.
5456 * Makefile.in: Integrate the files in tree-check pass.
5457 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5458 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5459 Introduce a "lazy" pretty-print mode.
5460 * tree.c, tree.h: Add tree_name.
5461
54622006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5463
5464 * doc/invoke.texi (-fgraphite): Correct typo.
5465 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5466 use of print_loop_ir.
5467 * testsuite/gcc.dg/graphite/scop-1.c: New.
5468 * testsuite/gcc.dg/graphite/scop-2.c: New.
5469 * testsuite/gcc.dg/graphite/graphite.exp: New.
5470 * graphite.c: Include domwalk.h.
5471 (print_scop): Print only the entry and exit blocks.
5472 (debug_scop): No longer static.
5473 (affine_expr): Fix formating. Return also true when the expression is
5474 constant.
5475 (stmt_simple_for_scop_p): Fix formating.
5476 (build_scops): Use domwalk.
5477 (get_loop_start, end_scop, test_for_scop_bound): New.
5478 (graphite_transform_loops): Avoid printing on stderr.
5479 * graphite.h (debug_scop): Declared.
5480 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5481 * Makefile.in (graphite.o): Depend on domwalk.h.
5482 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5483 declarations for static functions.
5484 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5485 controlling output verbosity.
5486
54872006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5488 Plesco Alexandru <shurikx@gmail.com>
5489
5490 * doc/invoke.texi (-fgraphite): Document.
5491 * tree-pass.h (pass_graphite_transforms): Declared.
5492 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5493 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5494 (pass_graphite_transforms): Defined.
5495 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5496 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5497 * graphite.c, graphite.h: New.
5498 * common.opt (fgraphite): Declared.
5499 * tree-flow.h (graphite_transform_loops): Declared.
5500 * Makefile.in (OBJS-common): Add graphite.o.
5501 (graphite.o): New rule.
5502 * passes.c (pass_graphite_transforms): Scheduled.
5503