1 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
3 Partially revert the previous patch, except the following.
4 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
5 as parameters the operands of the not expression.
7 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
9 * tree-scalar-evolution.c (instantiate_scev_assign): New.
10 Do not call analyze_scalar_evolution on assignments.
11 (instantiate_scev_phi): Call analyze_scalar_evolution.
12 (instantiate_scev_name): Call instantiate_scev_assign and
14 (instantiate_scev_not): Adapted to pass as parameters the operands
15 of the not expression.
17 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
19 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
20 to pass as parameters the operands of the binary expression.
22 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
24 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
25 instantiate_scev_not. Handle NEGATE_EXPR.
26 (instantiate_scev_r): Handle NEGATE_EXPR.
28 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
30 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
32 (instantiate_scev_r): Move code in instantiate_scev_2
33 and instantiate_scev_1.
35 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
37 * tree-scalar-evolution.c (instantiate_scev_3): New.
38 (instantiate_scev_1): Move code in instantiate_scev_3.
40 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
42 * tree-scalar-evolution.c (instantiate_scev_poly): New.
43 (instantiate_scev_1): Move code in instantiate_scev_poly.
45 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
47 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
48 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
50 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
52 * tree-scalar-evolution.c (instantiate_scev_convert): New.
53 (instantiate_scev_1): Move code in instantiate_scev_convert.
55 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
57 * tree-scalar-evolution.c (instantiate_scev_binary): New.
58 (instantiate_scev_1): Move code in instantiate_scev_binary.
60 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
62 * tree-scalar-evolution.c (instantiate_scev_name): New.
63 (instantiate_scev_1): Move code in instantiate_scev_name.
65 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
67 * Merge from mainline (150992:151171).
69 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
71 * graphite-dependences.c (graphite_legal_transform_bb): Call
72 pbb_remove_duplicate_pdrs.
73 * graphite-poly.c (can_collapse_pdr): Removed.
74 (pdr_find_duplicate): Removed.
75 (can_collapse_pdrs): New.
76 (pbb_remove_duplicate_pdrs): New.
77 (new_poly_dr): Do not look for duplicates.
78 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
79 (PBB_PDR_DUPLICATES_REMOVED): New.
80 (pbb_remove_duplicate_pdrs): Declared.
82 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
84 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
85 the strides by multiplying by PDR_NB_REFS.
86 * graphite-poly.c (can_collapse_pdr): New.
87 (pdr_find_duplicate): New.
88 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
89 Initialize PDR_NB_REFS.
90 * graphite-poly.h (struct poly_dr): Add field nb_refs.
92 (new_poly_dr): Number of subscripts is a graphite_dim_t.
94 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
96 Revert one of the previous commits:
97 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
98 the computation of symmetric data dependence relations.
99 (dependency_between_pbbs_p): Same.
101 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
104 * graphite-poly.c (apply_poly_transforms): Remove legality test before
107 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
109 * graphite-dependences.c (pddr_original_scattering): Return NULL
110 for read-read dependence relations.
111 * graphite-poly.h (enum poly_dr_type): Fix comment.
114 (pdr_may_write_p): New.
116 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
118 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
119 (struct poly_dr): Same.
121 * graphite-poly.c (new_poly_dr): Same.
123 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
124 Sebastian Pop <sebastian.pop@amd.com>
126 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
127 pbb_strip_mine_time_depth. Changed the implementation so that
128 transformation is expressed as a transformation on
129 time (scatttering) dimensions. Also, ensures that the 2d+1
130 scheduling format is preserved.
131 (pbb_strip_mine_profitable_p): Profitability is based on the
132 iteration number of a given time (scattering) dimension,
133 and not on a original loop depth dimension.
134 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
135 (pbb_do_strip_mine): Call psct_dynamic_dim.
136 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
137 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
138 (pbb_nb_dynamic_scattering_transform): New.
139 (psct_dynamic_dim): New.
141 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
143 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
144 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
145 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
146 * graphite-interchange.c (build_linearized_memory_access): Same.
147 (memory_stride_in_loop): Same.
149 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-dependences.c (pddr_original_scattering): New.
152 (graphite_legal_transform_dr): Call pddr_original_scattering.
155 * graphite-dependences.h (dot_deps): Declared.
156 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
157 (print_pdr): Print PDR_ID.
158 * graphite-poly.h (struct poly_dr): Add field id.
161 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
163 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
165 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
166 not delete the original dependence relation.
168 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
170 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
171 the computation of symmetric data dependence relations.
172 (dependency_between_pbbs_p): Same.
174 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
176 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
177 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
178 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
179 (free_poly_ddr): New.
180 (pddr_is_empty): New.
181 (dependence_polyhedron_1): Now returns a poly_ddr_p.
182 (dependence_polyhedron): Same. Remove useless gcc_assert.
184 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
185 (graphite_carried_dependence_level_k): Call pddr_is_empty.
186 * graphite-dependences.h (enum poly_dependence_kind): New.
187 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
188 (PDRP_SOURCE): Renamed PDDR_SOURCE.
189 (PDRP_SINK): Renamed PDDR_SINK.
190 (PDRP_DDP): Renamed PDDR_DDP.
192 (free_poly_ddr): Declared.
193 * graphite-poly.c (new_scop): Use the new hash function names.
194 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
196 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
198 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
200 * Merge from mainline (150764:150992).
202 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
204 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
205 bounds with LT_EXPR to make niter analysis more precise on code
206 generated by Graphite.
208 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
210 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
211 (graphite_legal_transform_bb): Same.
212 (poly_drs_may_alias_p): Same.
214 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
217 * graphite-ppl.c (ppl_max_for_le): Correct the use of
218 ppl_Pointset_Powerset_C_Polyhedron_maximize.
220 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
222 * graphite-poly.c (print_pbb): Print PBB index.
224 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
226 * Merge from mainline (r150672:150764).
228 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
230 * graphite-interchange.c (ppl_max_for_le): Moved...
231 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
232 * graphite-ppl.c (ppl_max_for_le): ... here.
233 * graphite-ppl.h (ppl_max_for_le): Declared.
235 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
237 * Merge from mainline (r150372:150672).
239 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
242 * sese.c (convert_for_phi_arg): New.
243 (add_guard_exit_phis): Use convert_for_phi_arg.
245 * testsuite/gfortran.dg/graphite/id-17.f: New.
247 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
249 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
250 unknown subscript upper bounds.
252 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
254 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
255 Pranav Garg <pranav.garg2107@gmail.com>
257 * graphite-interchange.c (gather_access_strides): Removed.
258 (ppl_max_for_le): New.
259 (build_linearized_memory_access): New.
260 (memory_stride_in_loop): New.
261 (pbb_interchange_profitable_p): Reimplemented.
262 * graphite-ppl.h (ppl_new_id_map): New.
263 (ppl_interchange): New.
265 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
267 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
269 * graphite-interchange.c (compute_subscript): Removed.
270 (compute_array_size_cstr): Removed.
271 (compute_array_size_poly): Removed.
272 (compute_array_size): Removed.
273 (gather_access_strides_poly): Removed.
274 (gather_access_strides): Empty.
276 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
278 * graphite-dependences.c (dependence_polyhedron_1): Replace
279 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
280 (graphite_legal_transform_dr): Same.
281 (graphite_carried_dependence_level_k): Same.
282 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
283 Initialize PDR_NB_SUBSCRIPTS.
284 (print_pdr_access_layout): Replace pdr_nb_subscripts with
286 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
287 (PDR_NB_SUBSCRIPTS): New.
288 (pdr_nb_subscripts): Removed.
289 (pdr_dim): Simplified.
290 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
291 with PDR_NB_SUBSCRIPTS.
293 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
295 * graphite-interchange.c (compute_array_size): Remove use of
297 * graphite-poly.c (new_poly_dr): Remove argument data_container.
298 Do not initialize PDR_DATA_CONTAINER.
299 (print_pdr): Do not print PDR_DATA_CONTAINER.
300 * graphite-poly.h (struct poly_dr): Remove data_container field.
301 (PDR_DATA_CONTAINER): Removed.
302 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
304 (build_poly_dr): Same.
306 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
308 * testsuite/gcc.dg/graphite/interchange-9.c: New.
310 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
311 Sebastian Pop <sebastian.pop@amd.com>
313 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
314 copy of the dependence polyhedron. Free the temporary objects.
315 (graphite_carried_dependence_level_k): Free unused objects before
318 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
319 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
320 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
321 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
322 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
324 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
326 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
327 Early return without analyzing the data dependences if no
328 transform has been done. Call restore_scattering if the transform
330 (graphite-interchange.c): Same.
331 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
332 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
333 (apply_poly_transforms): Do not gcc_assert that
334 the transform is legal.
335 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
336 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
337 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
338 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
339 * graphite-poly.h (struct poly_scattering): New.
340 (struct poly_bb): Add original, transformed, and saved fields.
341 Remove transformed_scattering, original_scattering, nb_local_variables,
342 and nb_scattering_transform fields.
343 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
344 (poly_scattering_new): New.
345 (poly_scattering_free): New.
346 (poly_scattering_copy): New.
347 (store_scattering_pbb): New.
348 (store_scattering): New.
349 (restore_scattering_pbb): New.
350 (restore_scattering): New.
351 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
352 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
354 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
356 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
359 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
361 * Makefile.in (graphite.o): Depends on PREDICT_H.
362 * graphite.c: Include predict.h.
363 (graphite_finalize): Call tree_estimate_probability.
364 * predict.c (predict_loops): Do not call scev_initialize and
366 (tree_estimate_probability_bb): New.
367 (tree_estimate_probability): Do not initialize loops: move that
368 code to the driver. Call tree_estimate_probability_bb.
369 (tree_estimate_probability_driver): New.
370 (pass_profile): Use tree_estimate_probability_driver.
371 * predict.h (tree_estimate_probability): Declared.
373 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
375 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
376 * graphite-dependences.c (graphite_legal_transform): Add time to
377 TV_GRAPHITE_DATA_DEPS.
378 (dependency_between_pbbs_p): Same.
379 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
381 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
383 * Merge from mainline (r149952:150372).
385 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
387 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
388 * graphite-blocking.c: Same.
389 * graphite-clast-to-gimple.c: Same.
390 * graphite-dependences.c: Same.
391 * graphite-poly.c: Same.
392 * graphite-poly.h: Same.
393 * graphite-ppl.c: Same.
394 * graphite-scop-detection.c: Same.
395 * graphite-sese-to-poly.c: Same.
398 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
400 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
401 (remove_simple_copy_phi): New.
402 (remove_invariant_phi): New.
403 (simple_copy_phi_p): New.
404 (reduction_phi_p): New.
405 (gsi_for_ssa_name_def): New.
406 (insert_out_of_ssa_copy): New.
407 (insert_out_of_ssa_copy_on_edge): New.
408 (create_zero_dim_array): New.
409 (scalar_close_phi_node_p): New.
410 (rewrite_close_phi_out_of_ssa): New.
411 (rewrite_phi_out_of_ssa): New.
412 (rewrite_reductions_out_of_ssa): New.
413 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
415 * testsuite/gcc.dg/graphite/id-11.c: New.
416 * testsuite/gcc.dg/graphite/id-15.c: New.
417 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
418 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
419 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
420 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
421 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
422 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
423 * testsuite/gfortran.dg/graphite/id-13.f: New.
424 * testsuite/gfortran.dg/graphite/id-5.f: New.
426 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
428 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
429 check that nb_reductions_in_loop is zero.
430 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
432 (nb_reductions_in_loop): Removed.
433 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
434 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
435 (bb_contains_non_iv_scalar_phi_nodes): Removed.
436 (scop_contains_non_iv_scalar_phi_nodes): Removed.
437 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
439 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
441 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
442 statements that have an empty iteration domain.
443 * testsuite/gfortran.dg/graphite/id-16.f: New.
445 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
447 * tree-scalar-evolution.c (instantiate_scev_1): Return
448 chrec_dont_know when the result is not above instantiate_below.
449 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
450 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
451 the tree has a known scalar evolution.
452 * testsuite/gfortran.dg/graphite/id-14.f: New.
453 * testsuite/gfortran.dg/graphite/id-15.f: New.
455 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
457 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
459 (rename_variables): Keep inserting renames after the ones already
462 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
464 * graphite-sese-to-poly.c (compare_bb_depths): New.
465 (graphite_sort_dominated_info): New.
466 (build_scop_bbs_1): Call graphite_sort_dominated_info.
467 (build_scop_scattering): Fix comment.
469 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
471 * graphite.c (graphite_finalize): Call print_loops instead of
472 dump_function_to_file.
473 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
474 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
475 loops generated in the graphite output file.
476 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
477 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
478 * testsuite/gfortran.dg/graphite/id-12.f: New.
480 2009-07-24 Li Feng <nemokingdom@gmail.com>
482 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
485 2009-07-24 Li Feng <nemokingdom@gmail.com>
486 Tobias Grosser <grosser@fim.uni-passau.de>
488 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
489 alias set number build alias in ACCESSES polyhedron.
490 (build_alias_set_for_drs): New.
491 (build_pbb_drs): Added build_alias_set_for_drs.
492 * graphite-dependences.c (poly_drs_may_alias_p): New.
493 (graphite_carried_dependence_level_k): Check alias information
494 before building polyhedron.
496 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
498 * Makefile.in (lambda-code.o): Fix formatting.
500 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
502 * Merge from mainline (r149350-149952)
504 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
506 * graphite-poly.c (apply_poly_transforms): Move strip_mine
507 before interchange to prepare for loop blocking.
509 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
511 * graphite-poly.c (apply_poly_transforms): Add checks after every
513 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
514 done in apply_poly_transforms.
516 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
518 * graphite-dependences.c (build_lexicographically_gt_constraint):
519 Replace RES parameter with *RES.
520 (dependence_polyhedron_1): Pass an address of the parameter RES
521 instead of value of RES.
523 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
525 * graphite.c (graphite_finalize): Fix comment.
526 (graphite_transform_loops): Reset scev info after code generation
529 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
531 * graphite.c (graphite_finalize): Call scev_reset.
533 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
535 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
536 GBB_CLOOG_IV_TYPES hash table twice.
537 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
538 (add_condition_to_domain): Clear GMP values.
540 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
542 * graphite-dependences.c: Fix formatting.
543 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
544 (pbb_number_of_iterations): Free ppl_Linear_Expression.
545 * graphite-sese-to-poly.c: Fix formatting.
546 * graphite.c (graphite_transform_loops): Create the hash table
547 after the early return.
549 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
551 * testsuite/gcc.dg/graphite/id-14.c: New.
552 * testsuite/gcc.dg/graphite/pr40157.c: New.
553 * testsuite/gfortran.dg/graphite/id-11.f: New.
555 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
557 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
558 (build_poly_scop): Return false when there are no pbbs within
559 loops to avoid to pass to cloog scops with no loops.
561 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
563 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
564 useless test "i % 2".
565 (build_pbb_scattering_polyhedrons): Fix formatting.
566 (build_poly_dr): Same.
567 * graphite.c (graphite_transform_loops): Restructure.
569 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
571 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
572 reduction_list parameter.
573 (rewrite_all_phi_nodes_with_iv): Same.
574 (canonicalize_loop_ivs): Same.
575 * tree-parloops.c (struct brli): Removed.
576 (build_reduction_list_info): Removed.
577 (build_new_reduction): New.
578 (analyze_reduction_list): Removed.
579 (gather_scalar_reductions): Find reductions instead of phi
580 nodes that can't be canonicalized.
581 (try_create_reduction_list): Remove reduction_list parameter.
582 (gen_parallel_loop): Same.
583 (parallelize_loops): Remove analyze_reductions variable,
584 initialization and free.
585 Change reduction_list htab initialization to reduction_info
586 elements instead of ssa names.
587 Call try_create_reduction_list and gen_parallel_loop without
588 analyzed_reduction argument.
589 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
590 canonicalize_loop_ivs with one less argument.
591 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
593 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
595 * graphite-dependences.c (new_poly_dr_pair): New.
596 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
597 (new_poly_dr_pair): New.
598 (eq_poly_dr_pair_p): New.
599 (hash_poly_dr_pair_p): New.
600 * graphite-dependences.h (struct poly_dr_pair): New.
601 (eq_poly_dr_pair_p): Declared.
602 (hash_poly_dr_pair_p): Declared.
603 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
604 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
605 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
606 * Makefile.in (graphite-poly.o): Add dependence on
607 graphite-dependences.h.
609 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
611 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
612 polynomials of degree > 1 pass to Graphite.
613 * tree-chrec.c (scev_is_linear_expression): Call
614 evolution_function_is_affine_multivariate_p.
615 * testsuite/gfortran.dg/graphite/id-10.f90: New.
617 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
619 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
620 Instantiate scevs varying in outer loops.
621 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
623 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
625 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
626 redundant constraint.
628 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
630 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
631 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
632 based on the file names as in the C testsuite.
633 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
634 * testsuite/gfortran.dg/graphite/block-2.f: Same.
635 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
636 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
637 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
638 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
639 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
640 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
641 * testsuite/gfortran.dg/graphite/id-6.f: Same.
642 * testsuite/gfortran.dg/graphite/id-9.f: Same.
643 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
644 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
645 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
647 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
649 * sese.c (expand_scalar_variables_call): New.
650 (expand_scalar_variables_ssa_name): Handle calls in expander.
652 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
654 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
655 Expect to see the pattern twice.
656 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
657 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
658 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
660 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
662 * testsuite/gcc.dg/graphite/id-10.c: New.
663 * testsuite/gcc.dg/graphite/id-12.c: New.
664 * testsuite/gfortran.dg/graphite/id-7.f: New.
665 * testsuite/gfortran.dg/graphite/id-8.f: New.
667 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
669 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
672 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
674 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
676 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
678 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
680 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
682 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
683 building PDR subscripts.
685 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
687 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
688 computation of array sizes.
690 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
692 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
694 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
696 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
697 build_pairwise_constraint, dr_equality_constraints,
698 build_pairwise_scheduling_equality,
699 build_pairwise_scheduling_inequality, lexicographically_gt_p,
700 build_lexicographically_gt_constraint, dependence_polyhedron,
701 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
702 Move from NNC_Polyhedron to C_Polyhedron.
703 * graphite-interchange.c (compute_array_size_poly,
704 gather_access_strides): Dito.
705 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
706 free_scop, pbb_number_of_iterations): Dito.
707 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
708 pbb_dim_iter_domain, struct scop): Dito.
709 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
710 new_Cloog_Domain_from_ppl_Polyhedron,
711 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
712 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
713 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
714 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
715 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
716 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
717 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
718 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
719 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
720 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
721 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
722 build_scop_iteration_domain, build_poly_dr): Dito
724 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
726 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
728 * testsuite/gcc.dg/graphite/run-id-1.c: New.
730 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
732 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
733 positivity constraint on the symbolic number of iterations.
735 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
737 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
739 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
740 Tobias Grosser <grosser@fim.uni-passau.de>
742 * graphite-clast-to-gimple.c (build_scop_context): Removed.
743 (build_cloog_prog): Directly use SCOP_CONTEXT.
744 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
745 (free_scop): Free SCOP_CONTEXT.
746 (print_scop_context): New.
747 (print_scop): Call print_scop_context.
748 (debug_scop_context): New.
749 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
750 (struct scop): Added field context.
752 * graphite-sese-to-poly.c (add_param_constraints): New.
753 (build_scop_context): New.
754 (build_poly_scop): Call build_scop_context.
756 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
758 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
759 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
760 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
761 * graphite-ppl.h: Include double-int.h and tree.h.
762 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
763 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
764 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
765 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
767 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
769 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
770 POINTER_PLUS_EXPR for pointer types.
771 (clast_to_gcc_expression): Same.
773 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
775 * graphite-poly.c (print_scattering_function): Early return when
776 PBB_TRANSFORMED_SCATTERING is not initialized.
777 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
779 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
781 * tree-parloops.c (analyze_reduction_list): Remove unused variable
784 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
786 * tree-parloops.c (analyze_reduction_list): Change return
788 (try_create_reduction_list): Move the call to
789 analyze_reduction_list to the beginining.
790 Call reduction_phi with analyzed_reductions as argument
791 instead of reduction_list.
793 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
795 * Merge from mainline (r148296:149346)
797 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
799 * graphite-scop-detection.c (graphite_can_represent_init): New.
800 (graphite_can_represent_scev): Call graphite_can_represent_init:
801 check that the initial value does not contain multiplications of
803 (stmt_has_simple_data_refs_p): New.
804 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
805 (is_simple_operand): Fix formatting.
806 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
808 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
810 * testsuite/gcc.dg/graphite/id-13.c: New.
811 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
812 analyze_scalar_evolution, use scalar_evolution_in_region.
813 (scan_tree_for_params_right_scev): Add extra assert.
814 (parameter_index_in_region_1): Split from parameter_index_in_region.
815 (idx_record_params): Use scalar_evolution_in_region.
816 (find_params_in_bb): Same.
817 (find_scop_parameters): Same.
818 (build_loop_iteration_domains): Same.
819 (create_linear_expr_from_tree): Same.
820 * sese.c (scalar_evolution_in_region): New.
821 * sese.h (scalar_evolution_in_region): Declared.
822 (defined_in_sese_p): New.
823 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
825 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
828 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
830 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
831 TREE_DATA_REF_H also implies SCEV_H.
833 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
835 * graphite-poly.c (print_scop_params): New.
836 (print_scop): Call print_scop_params.
837 (debug_scop_params): New.
838 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
840 2009-07-07 Li Feng <nemokingdom@gmail.com>
842 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
843 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
844 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
845 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
846 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
847 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
849 2009-07-07 Li Feng <nemokingdom@gmail.com>
851 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
852 for dependency checking part.
853 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
854 tests for dependency checking.
855 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
856 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
857 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
858 flag -fdump-tree-graphite-all for autopar testsuites.
860 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
862 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
863 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
864 canonicalize_loop_ivs): Moved...
865 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
867 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
869 * tree-parloops.c (try_create_reduction_list): Pass an extra
870 argument analyzed_reductions. Call analyze_reduction_list.
871 (gen_parallel_loop): Do not call analyze_reduction_list.
872 (parallelize_loops): Init and finalize analyzed_reductions.
874 2009-07-06 Li Feng <nemokingdom@gmail.com>
876 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
877 Added flag -fno-loop-strip-mine for autopar testcase.
879 2009-07-04 Li Feng <nemokingdom@gmail.com>
881 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
882 transformed scattering dimension instead of unmatch orignal when
883 calling dependence_polyhedron.
885 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
887 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
889 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
891 * graphite-poly.c (pbb_number_of_iterations): Check for returned
892 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
894 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
896 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
897 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
898 * graphite-poly.c (pbb_number_of_iterations): New.
899 * graphite-poly.h (pbb_number_of_iterations): Declared.
900 (pbb_iterator_dim, pbb_parameter_dim): New.
902 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
905 last commit on type of lower and upper bound of loops.
907 2009-06-29 Li Feng <nemokingdom@gmail.com>
909 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
910 graphite-dependences.h.
911 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
912 (mark_bb_with_pbb): New.
913 (get_stmtfor_depth): New.
914 (find_pbb_via_hash): New.
915 (dependency_in_loop_p): New.
916 (mark_loops_parallel): New.
917 (free_aux_in_new_loops): New.
918 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
919 bb with it's relevant pbb. Mark newly created loops. Remove mark
920 innermost loop parallel without checking.
921 (gloog): Add parameter BB_PBB_MAPPING.
922 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
923 (gloog): Change declaration.
924 (mark_loop_parallel): Make extern.
925 (free_aux_in_new_loops): Declare.
926 (bb_pbb_map_hash): New.
927 (eq_bb_pbb_map): New.
928 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
929 auto parallelization when flag_graphite_force_parallel is set.
930 (graphite_finalize): Added free_aux_in_new_loops.
931 * tree-parloops.c (parallelize_loops): Only generate parallel code for
932 the innermost loop that marked parallel. Use
933 flag_graphite_force_parallel instead of loop->can_be_parallel.
934 (loop_parallel_p): Move inner most checking out of function.
936 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
938 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
939 type of lower and upper bound of loops signed long int.
941 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
943 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
944 expression outside the loop.
946 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
948 * gcc.dg/graphite/interchange-8.c: New.
950 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
952 * gcc.dg/graphite/interchange-0.c: XFailed.
953 * gcc.dg/graphite/interchange-5.c: XFailed.
954 * gcc.dg/graphite/interchange-6.c: XFailed.
956 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
958 * graphite-interchange.c (compute_array_size_poly): The end of the
959 recursion should return 1.
961 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-interchange.c (compute_array_size_cstr): Allow the
964 subscript multiplier to be -1.
965 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
966 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
967 data_container. Initializes PDR_DATA_CONTAINER.
968 (print_pdr_access_layout): New.
969 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
970 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
972 (PDR_DATA_CONTAINER): New.
973 (new_poly_dr): Update declaration.
974 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
975 (build_poly_dr): Call pdr_add_data_dimensions.
977 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
979 * graphite-poly.h (struct poly_dr): Fix comment.
980 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
981 (pdr_add_memory_accesses): New.
982 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
984 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
986 * graphite-poly.c (print_pdrs, debug_pdrs): New.
987 (print_pbb): Add call to print_pdrs.
988 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
990 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
991 Li Feng <nemokingdom@gmail.com>
993 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
994 (dependency_between_pbbs_p): New.
995 (lexicographically_gt_p): Assure !empty_p before polyhedron
997 (build_lexicographically_gt_constraint): Correct lexicographically
999 * graphite-dependences.h: New.
1000 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1002 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1004 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1005 (gloog): Print to dump_file the generated clast.
1006 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1007 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1009 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1011 * graphite-poly.c (extend_scattering): Increment
1012 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1014 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1016 * graphite-interchange.c (compute_array_size_poly): Added exit of
1017 recursion condition. Continue iterating even after the first equality.
1018 (compute_array_size): Same.
1020 2009-06-24 Li Feng <nemokingdom@gmail.com>
1022 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1023 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1024 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1025 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1026 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1028 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1030 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1031 only when the use verifies is_gimple_reg.
1033 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1035 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1036 Allocate scaldims after call to unify_scattering_dimensions.
1038 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1040 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1042 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1043 Albert Cohen <albert.cohen@inria.fr>
1045 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1046 variables for the strip mining.
1048 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1049 Pranav Garg <pranav.garg2107@gmail.com>
1051 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1052 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1053 (graphite-blocking.o): New rule.
1054 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1055 * graphite-blocking.c: New.
1056 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1057 flag_loop_strip_mine.
1058 (psct_scattering_dim_for_loop_depth): New.
1059 * graphite-poly.h (scop_do_strip_mine): Declared.
1060 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1061 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1062 flag_loop_strip_mine.
1064 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1066 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1067 a GMP value and a PPL coefficient at each iteration of a loop.
1069 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1071 * graphite-dependences.c (dependence_polyhedron): Do not use
1072 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1073 pbb_nb_scattering_transform.
1074 (graphite_legal_transform_dr): Same.
1075 * graphite-poly.c (extend_scattering): Same.
1076 (unify_scattering_dimensions): Same.
1077 (print_scattering_function): Same.
1078 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1079 PBB_NB_LOCAL_VARIABLES.
1080 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1081 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1082 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1083 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1084 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1085 (pbb_nb_scattering_transform): New.
1086 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1087 (psco_scattering_dim): Add assert on parameters.
1088 (psct_scattering_dim): Same.
1089 (psct_scattering_dim_for_loop_depth): Declared.
1090 (psct_local_var_dim): New.
1091 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1092 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1093 correct layout, call pbb_nb_local_vars.
1094 (psct_add_local_variable, psct_add_scattering_dimension): New.
1095 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1096 Initialize PBB_NB_SCATTERING_TRANSFORM.
1098 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1100 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1101 (set_coef): Renamed ppl_set_coef.
1102 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1104 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1106 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1107 test a boolean against 1.
1108 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1109 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1110 (pbb_do_interchange): Returns true when a transform has been performed.
1111 (scop_do_interchange): Same.
1112 * graphite-poly.c (apply_poly_transforms): Use the return value of
1113 scop_do_interchange.
1114 * graphite-poly.h (scop_do_interchange): Update declaration.
1116 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1118 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1120 * sese.c (sese_reset_aux_in_loops): New.
1121 * sese.h (sese_reset_aux_in_loops): New.
1123 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1125 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1126 multiplier and multiply the constant by the multiplier.
1127 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1128 (build_poly_dr): Do not use the multiplier to define the subscript.
1130 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1132 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1133 compiler's data reference. Initialize PDR_CDR.
1134 (print_pdr): Call dump_data_reference.
1135 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1136 Add compiler_dr field.
1137 (PDR_BB): Renamed PDR_PBB.
1139 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1140 GCC's data reference representation.
1141 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1142 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1144 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1146 * graphite-poly.c (print_scattering_function): Also print the layout.
1147 * graphite-poly.h (pbb_nb_local_vars): New.
1149 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1151 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1153 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1155 * graphite-poly.c (print_pdr, debug_pdr): New.
1156 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1157 (PDR_BASE): Removed.
1159 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1161 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1164 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1166 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1167 subscript identification column.
1168 (pbb_do_interchange): Print to dump_file that some loops "will be
1169 interchanged". Rely on that chain of characters in the testcases.
1170 * gcc.dg/graphite/interchange-0.c: New.
1171 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1172 interchange-*.c files and compile them with -floop-interchange.
1174 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1176 * graphite-interchange.c (interchange_profitable_p): Renamed
1177 pbb_interchange_profitable_p.
1179 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1180 Harsha Jagasia <harsha.jagasia@amd.com>
1181 Pranav Garg <pranav.garg2107@gmail.com>
1183 * graphite-interchange.c (interchange_profitable_p): Make static.
1184 (pbb_interchange_loop_depths, pbb_do_interchange,
1185 scop_do_interchange): New.
1186 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1187 for flag_loop_interchange.
1188 * graphite-poly.h (scop_do_interchange): Declared.
1189 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1190 flag_loop_interchange is used.
1192 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1194 * graphite-dependences.c (dependence_polyhedron): Update use of
1195 pbb_nb_scattering_dims.
1196 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1197 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1198 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1199 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1201 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1203 * graphite.c: Cleanup foo.
1205 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1207 * Merge from mainline (r143684:148293).
1208 * Disabled libpcp until it gets fixed.
1210 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1211 Harsha Jagasia <harsha.jagasia@amd.com>
1213 * graphite-interchange.c: New.
1214 * Makefile.in (graphite-interchange.o): New.
1215 * graphite-poly.h (interchange_profitable_p): Declared.
1216 * graphite-ppl.h (value_max): New.
1218 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1220 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1221 * graphite-poly.h: Fix some comments.
1225 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1228 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1229 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1230 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1231 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1232 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1233 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1234 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1235 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1236 * graphite-clast-to-gimple.c: Same.
1237 * graphite-dependences.c: Same.
1238 * graphite-poly.c: Same.
1239 * graphite-sese-to-poly.c: Same.
1241 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1243 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1244 expressions for an IV rename, as returned by clast_to_gcc_expression.
1245 (copy_renames): Rename new_name to expr.
1246 * sese.c (debug_rename_elt): Same.
1249 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1250 the information from the rename map.
1251 (rename_variables_in_stmt): Same.
1252 (add_loop_exit_phis): Rename new_name to expr.
1253 (insert_loop_close_phis): Same.
1254 (add_guard_exit_phis): Same. Call force_gimple_operand.
1255 * sese.h (struct rename_map_elt): Rename new_name to expr.
1256 (new_rename_map_elt): Same.
1258 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1260 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1261 * sese.c (set_rename): Make it extern.
1262 * sese.h (set_rename): Declared.
1264 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1266 * graphite-poly.c (extend_scattering): Free values.
1267 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1269 (ppl_print_powerset_matrix): Same.
1270 * graphite-scop-detection.c (free_scops_1): New.
1271 (limit_scops): Call free_scops_1.
1272 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1273 (build_poly_dr): Free PPL coefficients.
1274 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1276 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1278 * graphite-dependences.c: New.
1279 * graphite-data-ref.c: Removed.
1280 * graphite-data-ref.h: Removed.
1281 * Makefile.in (graphite-data-ref.o): Removed.
1282 (graphite-dependences.o): Added.
1283 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1284 * graphite-poly.c: Same.
1285 Move the data dependence testing to graphite-dependences.c.
1287 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1289 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1290 from graphite_cannot_represent_loop. Code refactored.
1291 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1293 2009-05-17 Li Feng <nemokingdom@gmail.com>
1295 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1296 Cover all the testcases (not only the filtered ones).
1298 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1300 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1301 unnecessary check. Update comments. Move check for REAL_TYPE here.
1302 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1303 done in (stmt_simple_for_scop_p).
1305 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1307 * graphite.c (print_global_statistics): New.
1308 (print_graphite_scop_statistic): New.
1309 (print_graphite_statistics): New.
1310 (graphite_initialize, graphite_transform_loops): Print statistics.
1311 * graphite-scop-detection (build_scops): Print statistics.
1312 (print_graphite_scop_statistics): New.
1313 (print_graphite_statistics): New.
1315 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1317 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1318 (debug_clast_name_index): Removed.
1319 (debug_clast_name_indexes_1): Removed.
1320 (debug_clast_name_indexes): Removed.
1321 (clast_name_index_elt_info): Removed.
1322 (eq_clast_name_indexes): Removed.
1323 (clast_name_to_index): Removed.
1324 (new_clast_name_index): Removed.
1325 (save_clast_name_index): Removed.
1326 (save_var_name): Moved...
1327 (init_sese_params_index): Removed.
1328 (clast_name_to_gcc): Remove use of name_tree.
1329 (initialize_cloog_names): Same.
1330 (gloog): Do not call init_sese_params_index.
1331 * graphite-sese-to-poly.c (save_var_name): ...here.
1332 (parameter_index_in_region): New.
1333 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1334 (parameter_index_in_region): Removed.
1335 (is_parameter): Remove use of name_tree.
1336 * sese.h (struct name_tree): Removed.
1337 (struct sese): Remove use of name_tree. New field params_names.
1338 (SESE_PARAMS_NAMES): New.
1339 (SESE_PARAMS): Remove duplicate.
1340 (parameter_index_in_region): Removed.
1341 (sese_nb_params): Remove use of name_tree.
1342 (struct clast_name_index): New.
1343 (new_clast_name_index): New.
1344 (clast_name_to_index): New.
1345 (save_clast_name_index): New.
1346 (debug_clast_name_index): New.
1347 (debug_clast_name_indexes_1): New.
1348 (debug_clast_name_indexes): New.
1349 (clast_name_index_elt_info): New.
1350 (eq_clast_name_indexes): New.
1352 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1354 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1355 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1356 (graphite_loop_normal_form): Do not pass region. Do not
1357 initialize SESE_OLDIVS.
1358 (build_graphite_loop_normal_form): Update call to
1359 graphite_loop_normal_form.
1360 * sese.c (debug_oldivs): Removed.
1361 (new_sese): Do not initialize SESE_OLDIVS.
1362 (free_sese): Do not free SESE_OLDIVS.
1363 (oldiv_for_loop): Removed.
1364 * sese.h (struct sese): Remove old_ivs.
1365 (SESE_OLDIVS): Removed.
1366 (oldiv_for_loop): Removed.
1368 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1370 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1371 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1372 replaced by a call to newivs_to_depth_to_newiv.
1373 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1374 (clast_to_gcc_expression_red): Same.
1375 (gcc_type_for_clast_expr): Same.
1376 (gcc_type_for_clast_eq): Same.
1377 (graphite_translate_clast_equation): Same.
1378 (graphite_create_guard_cond_expr): Same.
1379 (graphite_create_new_guard): Same.
1380 (graphite_create_new_loop): Same.
1381 (build_iv_mapping): Same.
1382 (translate_clast): Same.
1384 (loop_iv_stack_patch_for_consts): Removed. *
1385 sese.c (iv_stack_entry_is_constant): Removed.
1386 (iv_stack_entry_is_iv): Removed.
1387 (loop_iv_stack_push_iv): Removed.
1388 (loop_iv_stack_insert_constant): Removed.
1389 (loop_iv_stack_pop): Removed.
1390 (loop_iv_stack_get_iv): Removed.
1391 (loop_iv_stack_get_iv_from_name): Removed.
1392 (debug_loop_iv_stack): Removed.
1393 (free_loop_iv_stack): Removed.
1394 (loop_iv_stack_remove_constants): Removed. *
1395 sese.h (iv_stack_entry_kind): Removed.
1396 (iv_stack_entry_data_union): Removed.
1397 (iv_stack_entry_struct): Removed.
1398 (iv_stack_entry_p): Removed.
1399 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1400 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1401 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1402 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1403 (gbb_loop_at_index): Fix indenting.
1404 (gbb_loop_index): Removed.
1406 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1408 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1409 Call clast_name_to_index.
1411 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1413 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1414 do not pass params. Get params from SESE_PARAMS.
1415 (clast_to_gcc_expression): Same.
1416 (clast_to_gcc_expression_red): Same.
1417 (gcc_type_for_clast_eq): Same.
1418 (graphite_translate_clast_equation): Same.
1419 (graphite_create_new_loop): Same.
1420 * sese.c (rename_variables_in_stmt): Fix comment.
1422 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1424 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1426 Call save_clast_name_index.
1427 (translate_clast): Pass newivs_index.
1428 (gloog): Create and free newivs_index.
1430 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1432 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1433 (clast_name_index_p): New type.
1434 (debug_clast_name_index): New.
1435 (debug_clast_name_indexes_1): New.
1436 (debug_clast_name_indexes): New.
1437 (clast_name_index_elt_info): New.
1438 (eq_clast_name_indexes): New.
1439 (clast_name_to_index): New.
1440 (new_clast_name_index): New.
1441 (save_clast_name_index): New.
1442 (init_sese_params_index): New.
1443 (gloog): Call init_sese_params_index.
1444 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1445 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1446 (free_sese): Free SESE_PARAMS_INDEX.
1447 * sese.h (struct sese): Add params_index.
1448 (SESE_PARAMS_INDEX): New.
1450 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1452 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1453 (graphite_create_new_loop): Pass the newivs vector. Push the
1454 newly created IV to newivs.
1455 (translate_clast): Pass the newivs vector.
1456 (gloog): Create and destroy the newivs vector.
1458 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1460 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1461 (graphite_loop_normal_form): Initialize loop->aux with the unique
1462 IV that has been created.
1464 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1466 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1467 scev with parameters in the base part. They where forbidden
1470 2009-05-11 Li Feng <nemokingdom@gmail.com>
1472 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1473 compile options by file names.
1474 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1475 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1476 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1477 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1479 2009-05-08 Li Feng <nemokingdom@gmail.com>
1481 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1482 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1483 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1484 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1486 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1488 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1491 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1493 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1494 allow integer constant strides.
1495 (graphite_can_represent_expr): Depend on outermost_loop.
1496 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1497 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1498 build_scops_1): Same.
1499 (scopdet_basic_block_info): Same and insert layered SCoP
1501 (try_generate_gimple_bb): Cleanup.
1502 (build_scops): Enable data references.
1504 * testsuite/gcc.dg/graphite/id-5.c: New.
1505 * testsuite/gcc.dg/graphite/id-9.c: New.
1506 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1507 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1509 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1511 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1512 that we have not yet built for this SCoP.
1514 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1516 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1517 for complex numbers.
1519 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1521 * graphite-ppl.c: Fix build if cloog is not available.
1523 2009-05-04 Li Feng <nemokingdom@gmail.com>
1525 * tree-parloops.c (loop_parallel_p): Remove construction of
1526 NITER and REDUCTION_LIST.
1527 (try_get_loop_niter): New.
1528 (try_create_reduction_list): New.
1529 (parallelize_loops): Bypass the failed checkings in autopar
1530 when can_be_parallel in loop structure is set to true.
1532 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1534 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1535 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1537 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1539 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1540 Enable EQ_EXPR and NE_EXPR again.
1542 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1544 * graphite-scop-detection.c (graphite_can_represent_scev):
1545 Add check if scev is affine multivariate.
1546 (harmful_stmt_in_bb): Check if we can represent the conditions.
1547 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1549 * testsuite/gcc.dg/graphite/id-7.c: New.
1551 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1553 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1554 Check all bbs in region, not only the bbs that are represented in
1556 (build_poly_scop): Add newline.
1557 * testsuite/gcc.dg/graphite/id-8.c: New.
1559 2009-04-30 Li Feng <nemokingdom@gmail.com>
1561 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1562 when loop initialize.
1563 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1564 * common.opt: Declare flag_graphite_force_parallel.
1565 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1567 * graphite-poly.c (apply_poly_transforms): Introduce
1568 flag_graphite_force_parallel.
1569 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1570 * toplev.c (process_options): ditto and replace a not correctly
1573 2009-04-30 Li Feng <nemokingdom@gmail.com>
1575 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1576 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1577 to the redefinition.
1578 (compute_cloog_iv_types_1): ditto.
1579 (build_iv_mapping): ditto.
1580 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1582 (free_gimple_bb): Removed GBB_LOOPS related free part.
1583 (build_bb_loops): Removed.
1584 * sese.h (struct gimple_bb): Removed loops.
1585 (GBB_LOOPS): Removed.
1586 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1587 (gbb_loop_index): ditto.
1589 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1591 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1592 allow non constant strides.
1593 * testsuite/gcc.dg/graphite/scop-20.c: New.
1595 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1597 * graphite-scop-detection.c (dot_all_scops): Fix system call
1598 return value warning.
1601 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1603 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1604 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1606 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1608 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1609 build_pairwise_constraint, dr_equality_constraints,
1610 build_pairwise_scheduling_equality,
1611 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1612 build_lexicographically_gt_constraint, dependence_polyhedron,
1613 graphite_legal_transform_dr, graphite_legal_transform_bb,
1614 graphite_legal_transform): New.
1615 * graphite-poly.h (graphite_legal_transform): Declared.
1616 * graphite-sese-to-poly.c (build_poly_scop): Call to
1617 graphite_legal_transform is disabled for the moment.
1619 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1621 * graphite-poly.h (pbb_nb_scattering_dims): New.
1622 (pbb_nb_scattering): Use it.
1624 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1626 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1627 Pointset_Powerset version of ppl_insert_dimensions.
1628 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1630 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1632 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1634 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1636 * graphite-poly.h: Fix comment.
1638 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1640 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1642 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1644 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1647 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1649 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1650 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1653 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1655 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1656 handle EQ_EXPR and NE_EXPR.
1658 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1660 * graphite-poly.h (poly_dr): Fix comment.
1662 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1663 Tobias Grosser <grosser@fim.uni-passau.de>
1665 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1666 with a zero dimension polyhedron.
1667 (find_scop_parameters): Move the call to scop_set_nb_params here.
1668 (build_loop_iteration_domains): Store in loop->aux the iteration
1670 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1671 by any loop in scop.
1672 (build_poly_scop): Do not call scop_set_nb_params.
1674 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1675 Tobias Grosser <grosser@fim.uni-passau.de>
1677 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1678 add_condition_to_domain not GT_EXPR.
1680 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1682 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1683 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1684 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1685 upper_bound_assign to calculate unions.
1686 * testsuite/gcc.dg/graphite/id-6.c: New.
1688 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1690 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1691 handle abnormal edges.
1693 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1695 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1696 (free_poly_bb): Also free poly_drs.
1697 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1698 (poly_dr): Polyhedron to Pointset_Powerset.
1699 (pdr_accessp_nb_subscripts): Same.
1700 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1703 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1705 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1706 names into more meaningful names.
1708 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1710 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1711 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1713 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1715 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1717 * tree-parloops.c (rewrite_phi_with_iv): New.
1718 (rewrite_all_phi_nodes_with_iv): New.
1719 (canonicalize_loop_ivs): Call them.
1721 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1723 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1724 graphite_find_data_references_in_stmt.
1725 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1726 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1728 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1730 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1732 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1734 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1735 instead of bb_in_region.
1736 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1737 (build_sese_conditions): Use flag_bb_in_sese.
1738 * sese.c (register_bb_in_sese): Removed.
1739 (new_sese): Remove initialization of SESE_REGION_BBS.
1740 (free_sese): Do not free SESE_REGION_BBS.
1741 * sese.h (struct sese): Remove field region_basic_blocks.
1742 (SESE_REGION_BBS): Removed.
1743 (bb_in_sese_p): Implement in function of bb_in_region.
1745 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1747 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1750 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1752 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1754 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1755 (add_condition_to_domain): New.
1756 (add_condition_to_pbb): New.
1757 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1758 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1760 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1762 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1763 ppl_Pointset_Powerset.
1764 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1765 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1766 (pbb_nb_loops): Same.
1767 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1768 add_conditions_to_domain): Same.
1769 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1770 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1771 ppl_const_Polyhedron_t.
1772 (ppl_print_powerset_matrix): New.
1773 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1774 ppl_print_powerset_matrix): New.
1775 (ppl_print_polyhedron_matrix): Updated.
1777 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1779 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1781 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1783 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1784 (print_iteration_domains, debug_iteration_domain,
1785 debug_iteration_domains): New.
1786 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1787 debug_iteration_domains): Declared.
1788 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1791 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1792 Sebastian Pop <sebastian.pop@amd.com>
1794 * graphite-poly.h (print_iteration_domain): New.
1795 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1796 (build_sese_conditions_1, build_sese_conditions_after,
1797 build_sese_conditions_before): New.
1798 (build_sese_conditions): Rewritten.
1800 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1801 Tobias Grosser <grosser@fim.uni-passau.de>
1803 Cleanup of code generation liveouts.
1804 * graphite-clast-to-gimple.c (translate_clast): Use a single
1805 rename_map instead of one per translated statement.
1806 Do not use SESE_LIVEOUT_RENAMES.
1807 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1808 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1809 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1810 phi node of a reduction: when a loop contains a reduction used outside
1811 the loop, there should be a scalar close phi node on the exit block.
1812 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1813 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1814 (free_sese): Do not free them.
1815 (sese_build_liveouts_use): Do not use them.
1816 (sese_build_liveouts_bb): Same.
1817 (sese_build_liveouts): Same.
1818 (sese_insert_phis_for_liveouts): Same.
1819 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1820 (defined_in_loop_p): New.
1821 (alive_after_loop): New.
1822 (close_phi_not_yet_inserted_p): New.
1823 (struct alep, alep_p): New.
1824 (add_loop_exit_phis): Remove from the rename_map all the names defined
1825 in the code generated loop.
1826 (insert_loop_close_phis): Traverse the rename_map passed to it.
1827 Don't use SESE_LIVEOUT_RENAMES.
1828 (default_liveout_before_guard): Renamed default_before_guard.
1829 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1830 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1831 (register_sese_liveout_renames): Removed.
1832 (copy_bb_and_scalar_dependences): Do not call it.
1833 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1835 (SESE_LIVEOUT): Removed.
1836 (SESE_LIVEOUT_RENAMES): Removed.
1837 (SESE_REDUCTION_LIST): Removed.
1838 (sese_build_liveouts): Removed.
1839 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1840 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1841 (insert_guard_phis): Same.
1842 (rename_map_elt): Declare a VEC of them.
1843 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1844 trees not pointers to trees.
1846 Rewrite in canonical close SSA form:
1847 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1848 (limit_scops): Close the scop after the block containing the close phi
1850 (canonicalize_loop_closed_ssa): New.
1851 (canonicalize_loop_closed_ssa_form): New.
1852 (build_scops): Call canonicalize_loop_closed_ssa_form.
1854 * graphite-sese-to-poly.c: Fix typos.
1856 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1858 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1860 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1861 (print_pbb): Add conditions.
1863 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1864 Sebastian Pop <sebastian.pop@amd.com>
1866 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1867 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1868 (build_scop_bbs_1): New.
1869 (build_scop_bbs): Rewrite.
1870 * sese.h (bb_in_region): New.
1872 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1874 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1876 (print_scop): Style.
1877 * graphite-poly.h (poly_bb): Add drs vector.
1878 (PBB_DRS): Add accessor.
1879 * graphite-sese-to-poly.c (build_poly_dr): New.
1880 (build_pbb_drs, build_scop_drs): New.
1881 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1883 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1885 * tree-ssa-loop.c: Include forgotten toplev.h
1887 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1889 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1890 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1891 * testsuite/gcc.dg/graphite/pr37928.c: Same
1892 * testsuite/gcc.dg/graphite/pr38409.c: Same
1893 * testsuite/gcc.dg/graphite/pr38498.c: Same
1894 * testsuite/gcc.dg/graphite/pr38559.c: Same
1895 * testsuite/gcc.dg/graphite/pr39335.c: Same
1896 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1897 * testsuite/gfortran.dg/graphite/block-2.f: Same
1898 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1901 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1903 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1904 build_access_matrix, build_scop_data_accesses): Remove access function
1905 building. (We get a new version soon).
1906 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1907 * sese.h (nb_loops_around_loop_in_sese): Remove.
1908 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1910 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1911 Sebastian Pop <sebastian.pop@amd.com>
1913 * graphite-scop-detection.c (struct scopdet_info): Rename last
1915 (scopdet_basic_block_info, build_scops_1): Don't use
1916 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1918 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1919 Sebastian Pop <sebastian.pop@amd.com>
1921 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1922 * sese.c (sese_build_liveouts_use): Renamed from
1923 sese_build_livein_liveouts_use. Remove liveins.
1924 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1925 Call sese_build_liveouts_use.
1926 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1927 Call sese_build_liveouts_bb.
1928 (new_sese, free_sese): Remove liveins.
1929 (sese_add_exit_phis_var): Deleted.
1930 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1932 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1934 * sese.h (sese): Remove num_ver and livein.
1935 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1937 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1939 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1941 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1943 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1944 (build_scop_scattering): Do not use compare_prefix_loops any more.
1945 (nb_common_loops): New.
1947 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1949 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1950 (register_old_and_new_names): Renamed set_rename.
1952 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1954 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1955 of the decl from the previous commit.
1957 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1959 * graphite-scop-detection.c (dot_scop): New.
1960 * graphite-scop-detection.h (dot_scop): Declared.
1962 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1964 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1966 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1968 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1969 condition at the end of the loop.
1970 * graphite.c (graphite_initialize, graphite_finalize): Print to
1971 dump_file the compiled function.
1972 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1973 of create_empty_loop_on_edge.
1974 (translate_clast): Update the code generation of loops for the new
1976 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1978 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1980 Reverted the patch from 2009-03-19.
1982 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1984 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1986 (print_scop): Style.
1987 * graphite-poly.h (poly_bb): Add drs vector.
1988 (PBB_DRS): Add accessor.
1989 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1990 (build_access_matrix_with_af, build_access_matrix,
1991 build_scop_data_accesses): Delete.
1992 (build_poly_dr): New.
1993 (build_pbb_drs, build_scop_drs): New.
1994 (build_poly_scop): call build_scop_drs.
1996 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1998 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1999 once per basic block.
2001 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2003 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2004 (graphite_can_represent_expr): Renamed from loop_affine_expr
2006 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2007 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2008 (scopdet_basic_block_info): Actually define entry_block.
2009 (stmt_simple_memref_p): Moved here from ...
2011 * tree-data-ref.c (stmt_simple_memref_p): here.
2012 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2014 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2016 * testsuite/gcc.dg/graphite/id-4.c: New.
2018 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2020 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2021 (register_old_and_new_names): Update the content of the map.
2022 When there was already a rename_map_elt in the map at that
2024 (copy_bb_and_scalar_dependences): Do rename_variables after
2025 expand_scalar_variables.
2026 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2027 of the map. When there was already a rename_map_elt in the
2028 map at that location, free it.
2029 (translate_clast): Pass the rename_map. Do not initialize and free
2030 a rename_map per stmt_user.
2031 (gloog): Initialize and free one rename_map and pass it to
2034 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2036 * sese.c (expand_scalar_variables_stmt,
2037 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2039 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2040 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2041 the gimple_stmt_iterator of the statement to be expanded.
2042 * graphite-scop-detection.c (is_simple_operand): Do handle
2045 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2047 * graphite-scop-detection.c (is_simple_operand): Do not handle
2049 * testsuite/gcc.dg/graphite/id-2.c: New.
2051 * graphite-sese-to-poly.c (build_bb_loops,
2052 add_value_to_dim, scan_tree_for_params_right_scev,
2053 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2054 find_params_in_bb, build_loop_iteration_domains,
2055 add_conditions_to_domain): Remove subtract.
2057 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2059 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2060 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2061 pbb_loop_at_index -> gbb_loop_at_index.
2062 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2063 (debug_loop_vec): Delete.
2064 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2065 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2066 (PBB_LOOPS): Removed.
2067 (PBB_BLACK_BOX): Insert cast.
2068 (pbb_set_black_box): New setter.
2069 (pbb_loop_at_index, pbb_loop_index): Removed.
2070 (scop_set_region, scop_set_nb_params): New.
2071 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2072 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2073 (build_poly_scop): Use scop_set_nb_params.
2074 * sese.h (gimple_bb): Add LOOPS.
2075 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2077 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2079 Revert previous commit.
2081 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2083 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2084 (register_old_and_new_names): Update the content of the map.
2085 When there was already a rename_map_elt in the map at that
2087 (copy_bb_and_scalar_dependences): Do rename_variables after
2088 expand_scalar_variables.
2089 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2090 of the map. When there was already a rename_map_elt in the
2091 map at that location, free it.
2092 (translate_clast): Pass the rename_map. Do not initialize and free
2093 a rename_map per stmt_user.
2094 (gloog): Initialize and free one rename_map and pass it to
2097 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2099 Remove forgotten line in revert.
2101 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2103 Revert previous commit.
2105 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2107 * sese.c (register_old_and_new_names): Update the content
2108 of the map. When there was already a rename_map_elt in the
2109 map at that location, free it.
2110 (copy_bb_and_scalar_dependences): Do rename_variables after
2111 expand_scalar_variables.
2112 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2113 of the map. When there was already a rename_map_elt in the
2114 map at that location, free it.
2115 (translate_clast): Pass the rename_map. Do not initialize and free
2116 a rename_map per stmt_user.
2117 (gloog): Initialize and free one rename_map and pass it to
2120 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2122 * graphite-clast-to-gimple.c (translate_clast): context_loop
2125 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2126 Sebastian Pop <sebastian.pop@amd.com>
2128 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2129 of the use of ppl_Polyhedron_map_space_dimensions.
2131 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2132 Sebastian Pop <sebastian.pop@amd.com>
2134 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2135 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2136 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2137 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2138 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2139 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2140 pbb_nb_params): New.
2141 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2142 nb_loops_around_pbb): Adapt return types.
2144 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2146 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2147 graphite-clast-to-gimple.o, graphite-data-ref.o,
2148 graphite-scop-detection.o, graphite-poly.o): Add
2151 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2153 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2154 graphite-clast-to-gimple.o, graphite-data-ref.o,
2155 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2157 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2159 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2160 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2161 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2162 * testsuite/gcc.dg/graphite/block-0.c: Same.
2163 * testsuite/gcc.dg/graphite/block-1.c: Same.
2164 * testsuite/gcc.dg/graphite/block-2.c: Same.
2165 * testsuite/gcc.dg/graphite/block-3.c: Same.
2166 * testsuite/gcc.dg/graphite/block-4.c: Same.
2167 * testsuite/gcc.dg/graphite/block-5.c: Same.
2168 * testsuite/gcc.dg/graphite/block-6.c: Same.
2169 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2170 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2171 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2172 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2173 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2174 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2175 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2176 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2177 * opts.c: Remove -floop-block from -O2.
2178 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2179 -floop-strip-mine are used.
2181 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2182 Sebastian Pop <sebastian.pop@amd.com>
2184 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2186 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2187 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2188 strip_mine_profitable_p, is_interchange_valid,
2189 graphite_trans_bb_block, graphite_trans_loop_block,
2190 graphite_trans_scop_block): Temporary removed.
2191 (extend_scattering, unify_scattering_dimensions): New.
2192 (print_scattering_function, graphite_read_transforms):
2193 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2194 (graphite_generate_scattering_fns): Removed.
2195 (apply_poly_transforms): Cleanup.
2196 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2197 (schedule_to_scattering): Moved.
2198 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2199 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2200 (pbb_nb_scattering): New.
2201 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2202 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2204 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2206 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2207 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2208 -> PBB_TRANSFORMED_SCATTERING.
2209 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2210 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2211 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2212 (check_poly_representation): Do not return bool.
2213 (graphite_transform_loops): Reformat.
2214 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2216 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2218 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2219 debug_pbb_domain, debug_pbb, debug_scop): New.
2220 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2221 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2223 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2226 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2227 when the type precision of the induction variable should be
2228 larger than the type precision of nit.
2229 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2230 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2231 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2233 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2234 * testsuite/gcc.dg/graphite/pr39335.c: New.
2236 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2238 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2239 SSA_NAMES not struct reduction_info.
2241 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2243 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2245 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2246 Tobias Grosser <grosser@fim.uni-passau.de>
2248 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2249 (free_sese): Free SESE_REDUCTION_LIST.
2250 * sese.h (struct sese): Add field reduction_list.
2251 (SESE_REDUCTION_LIST): New.
2252 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2253 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2255 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2256 Tobias Grosser <grosser@fim.uni-passau.de>
2258 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2261 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2262 Tobias Grosser <grosser@fim.uni-passau.de>
2264 * tree-parloops.c (struct brli, build_reduction_list_info,
2265 analyze_reduction_list, gather_scalar_reductions): New.
2266 (loop_parallel_p): Build a reduction list containing only
2267 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2268 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2269 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2270 * tree-flow.h (gather_scalar_reductions): Declared.
2272 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2275 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2276 number_of_iterations_exit from a gcc_assert.
2278 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2279 Jan Sjodin <jan.sjodin@amd.com>
2281 * output.h (graphite_out_file, graphite_in_file): Declared.
2282 * toplev.c (graphite_out_file, graphite_in_file): New.
2283 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2284 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2285 Don't call schedule_to_scattering.
2286 * common.opt (fgraphite-write, fgraphite-read): New.
2287 * graphite-poly.c: Include output.h.
2288 (print_scattering_function, print_scattering_functions,
2289 debug_scattering_function, debug_scattering_functions,
2290 graphite_write_transforms, graphite_read_transforms,
2291 graphite_generate_scattering_fns): New.
2292 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2293 Call graphite_generate_scattering_fns, graphite_write_transforms,
2294 graphite_read_transforms.
2295 (new_poly_bb): Initialize PBB_SCATTERING.
2296 (free_poly_bb): Free PBB_SCATTERING.
2297 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2298 * graphite-poly.h (struct poly_bb): Add field scattering.
2299 (PBB_SCATTERING): New.
2300 (print_scattering_function, print_scattering_functions,
2301 debug_scattering_function, debug_scattering_functions): Declared.
2302 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2303 GMP values, not integers!
2304 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2305 ppl_read_polyhedron_matrix): New.
2306 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2307 debug_ppl_polyhedron_matrix,
2308 ppl_read_polyhedron_matrix): Declared.
2309 * Makefile.in (graphite-poly.o): Depends on output.h.
2311 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2312 Tobias Grosser <grosser@fim.uni-passau.de>
2315 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2316 scalar evolutions in the scop_entry->loop_father.
2318 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2319 Tobias Grosser <grosser@fim.uni-passau.de>
2321 * graphite.h (ref_nb_loops): Remove declaration.
2322 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2323 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2324 debug_gbb): Moved to sese.h.
2327 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2328 Tobias Grosser <grosser@fim.uni-passau.de>
2330 * graphite-data-ref.[ch]: Disable.
2332 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2333 Tobias Grosser <grosser@fim.uni-passau.de>
2335 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2336 scalar evolutions in the scop_entry->loop_father.
2338 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2340 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2341 (graphite_cannot_represent_loop_niter): Renamed
2342 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2343 (limit_scops): build_sese_loop_nests does not return a bool.
2344 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2345 * sese.c (nb_reductions_in_loop): ... from here.
2346 (graphite_loop_normal_form): ... from here.
2347 (sese_record_loop): Does not fail, so does not return a bool.
2348 (build_sese_loop_nests): Same.
2349 * sese.h (build_sese_loop_nests): Update declaration.
2350 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2351 (build_graphite_loop_normal_form): New.
2352 (gloog): Call build_graphite_loop_normal_form.
2353 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2354 build_sese_loop_nests.
2356 * testsuite/gcc.dg/graphite/id-1.c: New.
2358 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2359 Tobias Grosser <grosser@fim.uni-passau.de>
2361 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2362 The SCoP detection fix is sufficient.
2364 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2366 PR tree-optimization/39260
2367 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2368 the basic block contains a condition with a real type.
2369 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2371 * gcc.dg/graphite/pr39260.c: New.
2373 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2375 * graphite-poly.c: Inlcude params.h.
2376 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2378 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2379 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2381 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2382 Tobias Grosser <grosser@fim.uni-passau.de>
2384 * graphite-scop-detection.c (dot_all_scops_1,
2385 dot_all_scops): Moved here.
2386 * graphite-scop-detection.h (dot_all_scops): Declared here.
2387 * graphite.c (graphite_initialize, graphite_finalize): New.
2388 (graphite_transform_loops): Cleaned up.
2389 * sese.c (debug_oldivs): Moved here.
2390 * graphite-poly.c (graphite_apply_transformations): Renamed
2391 apply_poly_transforms.
2392 (debug_loop_vec): Moved here.
2393 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2394 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2395 find_scop_parameters, build_scop_iteration_domain,
2396 add_conditions_to_constraints, build_scop_canonical_schedules,
2397 build_scop_data_accesses): Now static.
2398 (build_poly_scop, check_poly_representation): New.
2400 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2402 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2403 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2404 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2405 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2406 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2407 scan_tree_for_params, struct irp_data, dx_record_params,
2408 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2409 build_loop_iteration_domains, add_conditions_to_domain,
2410 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2411 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2412 build_sese_conditions, add_conditions_to_constraints,
2413 build_scop_iteration_domain, build_access_matrix_with_af,
2414 build_access_matrix,
2415 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2417 * graphite-sese-to-poly.c: New.
2418 * graphite-sese-to-poly.h: New.
2420 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2422 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2424 * graphite.c: Split graphite code generation to a new file.
2425 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2426 max_precision_type, clast_to_gcc_expression_red,
2427 clast_to_gcc_expression, gcc_type_for_clast_expr,
2428 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2429 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2430 graphite_create_new_guard, clast_get_body_of_loop,
2431 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2432 graphite_create_new_loop, build_iv_mapping, copy_renames,
2433 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2434 compute_cloog_iv_types, free_scattering, save_var_name,
2435 initialize_cloog_names, build_scop_context, build_cloog_prog,
2436 set_cloog_options, debug_clast_stmt, scop_to_clast,
2437 print_generated_program, debug_generated_program,
2438 gloog): Moved to graphite-clast-to-gimple.c.
2440 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2442 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2443 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2444 loop_iv_stack_pop, loop_iv_stack_get_iv,
2445 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2446 free_loop_iv_stack, loop_iv_stack_remove_constants,
2447 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2448 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2449 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2450 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2451 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2452 get_vdef_before_sese, sese_adjust_vphi,
2453 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2454 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2455 is_iv, expand_scalar_variables_ssa_name,
2456 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2457 expand_scalar_variables, rename_variables, remove_condition,
2458 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2459 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2460 default_liveout_before_guard, add_guard_exit_phis,
2461 insert_guard_phis, register_old_and_new_names,
2462 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2463 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2464 if_region_set_false_region, create_if_region_on_edge,
2465 move_sese_in_condition): Moved to sese.c.
2467 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2468 if_region_exit, if_region_get_condition_block,
2469 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2470 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2471 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2472 ivtype_map_elt, new_ivtype_map_elt,
2473 recompute_all_dominators): Moved to sese.h.
2475 * graphite-clast-to-gimple.c: New.
2476 * graphite-clast-to-gimple.h: New.
2477 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2478 * sese.c: Modified as said above.
2481 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2483 * graphite.c: Split scop detection to a new file.
2484 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2485 move_sd_regions, loop_affine_expr, exclude_component_ref,
2486 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2487 graphite_cannot_represent_loop_niter, struct scopdet_info,
2488 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2489 find_single_entry_edge, find_single_exit_edge,
2490 create_single_entry_edge, sd_region_without_exit,
2491 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2492 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2493 Moved to graphite-scop-detection.c.
2495 * graphite-scop-detection.c: New.
2496 * graphite-scop-detection.h: New.
2497 * Makefile.in: Add new rule for graphite-scop-detection.o.
2499 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2500 tree-scalar-evolution.h.
2501 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2502 build_sese_loop_nests): Moved here from graphite.c.
2503 (param_index): Renamed parameter_index_in_region.
2505 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2506 Sebastian Pop <sebastian.pop@amd.com>
2508 * gcc.dg/graphite/block-0.c: Expected to fail now.
2509 * gcc.dg/graphite/block-1.c: Same.
2510 * gcc.dg/graphite/block-5.c: Same.
2511 * gcc.dg/graphite/block-6.c: Same.
2513 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2514 Sebastian Pop <sebastian.pop@amd.com>
2516 * graphite.h: Separate from graphite_bb_p the polyhedral
2517 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2518 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2519 graphite-data-ref.h.
2520 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2521 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2522 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2523 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2524 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2525 scop_nb_params): Moved to graphite-poly.h.
2526 * graphite-data-ref.c: Same.
2527 * graphite-data-ref.h: New.
2529 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2530 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2531 is_interchange_valid, graphite_trans_bb_block,
2532 graphite_trans_loop_block, scop_max_loop_depth,
2533 graphite_trans_scop_block, graphite_apply_transformations,
2534 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2536 * graphite-poly.h: New.
2537 * graphite-poly.c: New.
2538 * Makefile.in (OBJS-common): Add graphite-poly.o.
2539 (graphite-poly.o): New rule.
2540 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2543 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2544 Tobias Grosser <grosser@fim.uni-passau.de>
2546 * graphite.c: Replace gb -> gbb.
2548 * graphite-data-ref.c: Same.
2550 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2551 Tobias Grosser <grosser@fim.uni-passau.de>
2553 * Makefile.in (OBJS-commmon): Add sese.o.
2555 (graphite.o): Add sese.h.
2556 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2557 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2558 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2560 (block_before_scop): Add missing return.
2561 (new_scop, free_scop): Remove SESE data structures.
2562 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2563 find_scop_parameters, build_loop_iteration_domains,
2564 add_conditions_to_domain, register_scop_liveout_renames,
2565 copy_bb_and_scalar_dependences): Scop -> SESE.
2567 (add_conditions_to_domain): SCoP -> SESE and remove check
2568 (scop_contains_non_iv_scalar_phi_nodes): New.
2569 (build_scop_conditions_1, build_scop_conditions): Remove check for
2570 non iv scalar phi nodes.
2571 (print_scop_statistics): New.
2572 (graphite_transform_loops): Cleanup.
2574 * graphite.h: Move to sese & cleanup.
2578 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2579 Tobias Grosser <grosser@fim.uni-passau.de>
2581 * graphite.c (build_scop_conditions_1): Conditions are only
2582 at the end of a basic block.
2584 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2585 Tobias Grosser <grosser@fim.uni-passau>
2587 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2589 (GBB_ALPHA): Removed.
2591 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2592 Tobias Grosser <grosser@fim.uni-passau.de>
2594 * graphite-data-ref.c (graphite_test_dependence): Don't use
2595 GBB_DYNAMIC_SCHEDULE.
2596 * graphite.c (new_graphite_bb): Same.
2597 (free_graphite_bb): Same.
2598 (build_scop_dynamic_schedules): Removed.
2599 (graphite_transform_loops): Don't call it.
2600 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2601 (GBB_DYNAMIC_SCHEDULE): Removed.
2603 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2604 Tobias Grosser <grosser@fim.uni-passau.de>
2606 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2607 (print_graphite_bb): Same.
2608 (build_cloog_prog): Same.
2610 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2611 Tobias Grosser <grosser@fim.uni-passau.de>
2613 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2615 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2616 Tobias Grosser <grosser@fim.uni-passau.de>
2618 * graphite.c (build_scop_context): Don't use CloogMatrix.
2619 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2620 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2622 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2623 Tobias Grosser <grosser@fim.uni-passau.de>
2625 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2626 liveout_renames, add_params fields...
2627 (struct sese): ... here.
2628 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2629 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2631 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2632 Tobias Grosser <grosser@fim.uni-passau.de>
2634 * graphite.c (print_scop): Do not print the CLooG program.
2635 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2636 build_cloog_prog, gloog): Don't use SCOP_PROG.
2637 (find_transform): Renamed scop_to_clast.
2638 (print_generated_program, debug_generated_program): New.
2639 (graphite_transform_loops): Adapt to new interface.
2640 * graphite.h (struct scop): Remove program field.
2641 (SCOP_PROG): Removed.
2642 (print_generated_program, debug_generated_program): Declared.
2644 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2646 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2647 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2648 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2649 free_graphite_bb, build_scop_canonical_schedules,
2650 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2651 schedules are now represented using a ppl_Linear_Expression_t.
2652 * graphite.h (struct graphite_bb): Same.
2653 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2654 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2656 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2658 * graphite.c: Free local memory.
2659 * graphite-ppl.c: Same.
2661 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2663 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2664 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2665 swap_constraint_variables, scale_constraint_variable): Removed.
2666 (graphite_trans_bb_strip_mine): Remove pong.
2667 * graphite-ppl.c: Include missing header files.
2668 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2669 * graphite-ppl.h (ppl_strip_loop): Declared.
2670 * Makefile.in (graphite-ppl.o): Adjust dependences.
2672 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2674 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2675 (build_scop_iteration_domain): Same.
2677 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2679 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2681 (add_value_to_dim, scan_tree_for_params_right_scev,
2682 scan_tree_for_params_int): New.
2683 * graphite-ppl.c (oppose_constraint): New.
2684 (insert_constraint_into_matrix): Implement missing cases.
2685 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2687 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2689 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2690 use ppl_move_dimension.
2692 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2694 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2697 * graphite-ppl.c: Same.
2698 * graphite-ppl.h: Same.
2700 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2702 Revert last 3 commits.
2704 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2706 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2708 (add_value_to_dim, scan_tree_for_params_right_scev,
2709 scan_tree_for_params_int): New.
2710 * graphite-ppl.c (oppose_constraint): New.
2711 (insert_constraint_into_matrix): Implement missing cases.
2712 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2714 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2716 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2718 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2719 Tobias Grosser <grosser@fim.uni-passau.de>
2721 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2722 use ppl_move_dimension.
2723 * graphite-ppl.c (ppl_move_dimension): New.
2724 * graphite-ppl.h (ppl_move_dimension): Declared.
2726 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2728 * graphite.c: Do not include cloog/cloog.h.
2729 (print_graphite_bb): Remove ping pong, call PPL print function.
2731 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2733 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2734 (graphite.o): Add dependence on graphite-ppl.h.
2735 (graphite-ppl.o): New.
2736 (graphite-data-ref.c): Ping pong between PPL data structures
2738 * graphite-ppl.c: New.
2739 * graphite-ppl.h: New.
2740 * graphite.c: Include graphite-ppl.h.
2741 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2742 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2743 Ping pong between PPL data structures and matrices.
2744 (new_graphite_bb): Create a PPL constraint system.
2745 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2746 (build_loop_iteration_domains): Use PPL functions.
2747 * graphite.h: Include graphite-ppl.h. Fix comments.
2748 (graphite_bb): Use a ppl_Constraint_System_t instead of
2749 CloogMatrix for representing the domain.
2750 (scop): Remove static_schedule.
2751 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2753 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2755 * graphite.c: Fix some comments.
2757 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2760 * graphite.c (if_region_set_false_region): After moving a region
2761 in the false branch of a condition, remove the empty dummy
2763 (gloog): Remove wrong fix for PR38953.
2765 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2767 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2768 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2769 register_bb_in_sese, new_sese, free_sese): Moved.
2770 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2771 outermost_loop_in_scop, build_scop_iteration_domain,
2772 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2773 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2774 Use loop_in_sese_p instead of loop_in_scop_p.
2775 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2776 (free_scop): Do not free SCOP_BBS_B.
2777 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2778 ref_nb_loops): Moved here...
2779 * graphite.h (ref_nb_loops): ... from here.
2780 (struct scop): Remove bbs_b bitmap.
2781 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2782 * testsuite/gcc.dg/graphite/scop-19.c: New
2784 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2786 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2789 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2791 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2792 eq_loop_to_cloog_loop): Remove.
2793 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2794 * graphite.h (struct scop): Remove loop2cloog_loop.
2795 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2797 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2799 * opts.c (decode_options): Only add graphite options to O2
2800 if we compile with graphite enabled.
2802 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2804 * Merge from mainline (r143163:143684).
2806 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2808 * graphite.c (debug_value): Removed.
2809 * graphite.h (debug_value): Removed.
2811 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2813 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2814 after graphite: pass_copy_prop does not maintain a proper loop closed
2815 SSA form. pass_copy_prop should be fixed.
2817 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2819 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2821 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2823 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2824 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2825 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2828 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2830 * graphite.c (gloog): Return true when code gen succeeded.
2831 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2832 the code of the function did not changed. After cleanup_tree_cfg
2833 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2836 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2838 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2839 gimple_call_lhs is NULL.
2841 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2842 Tobias Grosser <tobi.grosser@amd.com>
2844 * graphite.c (graphite_trans_scop_block): Do not block single
2847 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2848 Tobias Grosser <tobi.grosser@amd.com>
2850 * graphite.c (build_scop_canonical_schedules): Start schedules at
2853 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2854 Tobias Grosser <tobi.grosser@amd.com>
2856 * graphite.c (compare_prefix_loops): New.
2857 (build_scop_canonical_schedules): Rewritten.
2858 (graphite_transform_loops): Move build_scop_canonical_schedules
2859 after build_scop_iteration_domain.
2861 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2862 Tobias Grosser <tobi.grosser@amd.com>
2864 * graphite.c (add_conditions_to_domain): Add the loops to
2865 the dimension of the iteration domain. Do copy the domain
2866 only when it exists.
2867 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2868 (add_conditions_to_constraints): New.
2869 (can_generate_code_stmt, can_generate_code): Removed.
2870 (gloog): Do not call can_generate_code.
2871 (graphite_transform_loops): Call add_conditions_to_constraints
2872 after building the iteration domain.
2874 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2875 Tobias Grosser <tobi.grosser@amd.com>
2876 Jan Sjodin <jan.sjodin@amd.com>
2878 * graphite.c (scan_tree_for_params): On substractions negate
2879 all the coefficients of the term.
2880 (clast_to_gcc_expression_red): New. Handle reduction expressions
2881 of more than two operands.
2882 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2883 (get_vdef_before_scop): Handle also the case of default definitions.
2885 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2888 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2889 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2890 (gloog): Do not call cleanup_tree_cfg.
2891 (graphite_transform_loops): Call cleanup_tree_cfg after all
2892 scops have been code generated.
2894 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2896 * passes.c (init_optimization_passes): Schedule after
2897 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2899 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2901 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2903 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2904 Set the type of an expression to the type of its assign statement.
2905 (expand_scalar_variables_expr): Do not pass loop_p.
2906 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2907 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2908 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2910 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2912 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2913 an expression to the gimple_expr_type of its assign statement.
2914 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2917 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2919 PR tree-optimization/38786
2920 * testsuite/gcc.dg/graphite/pr38786.c: New.
2921 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2922 the SSA_NAME case of expand_scalar_variables_expr.
2923 (expand_scalar_variables_expr): Also gather the scalar computation
2924 used to index the memory access.
2925 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2926 the gimple_stmt_iterator where it inserts new code.
2928 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2930 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2932 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2934 * opts.c (decode_options): Enable flag_graphite_identity and
2935 flag_loop_block in -O2 and above.
2937 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2939 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2940 Fix merge problem: replace with the file from trunk.
2942 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2944 * Merge from mainline (r141727:143163).
2946 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2947 Jan Sjodin <jan.sjodin@amd.com>
2949 PR tree-optimization/38559
2950 * testsuite/gcc.dg/graphite/pr38559.c: New.
2952 * graphite.c (debug_value, copy_constraint,
2953 swap_constraint_variables, scale_constraint_variable, ): New.
2954 (get_lower_bound, get_upper_bound): Removed.
2955 (graphite_trans_bb_strip_mine): Clean up this code that works
2956 only for constant number of iterations. Fully copy upper and
2957 lower bound constraints, not only the constant part of them.
2958 * graphite.h (debug_value): Declared.
2960 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2962 PR tree-optimization/38492
2963 PR tree-optimization/38498
2964 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2965 * tree-chrec.h (scev_is_linear_expression): Declared.
2966 * graphite.c (graphite_cannot_represent_loop_niter): New.
2967 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2968 (graphite_loop_normal_form): Use gcc_assert.
2969 (scan_tree_for_params): Use CASE_CONVERT.
2970 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2971 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2972 Use gcc_assert. Discard scops that contain unhandled cases.
2973 (build_scop_conditions): Return a boolean status for unhandled cases.
2974 (strip_mine_profitable_p): Print the loop number, not its depth.
2975 (is_interchange_valid): Pass the depth of the loop nest, don't
2976 recompute it wrongly.
2977 (graphite_trans_bb_block): Same.
2978 (graphite_trans_bb_block): Print tentative of loop blocking.
2979 (graphite_trans_scop_block): Do not print that the loop has been
2981 (graphite_transform_loops): Do not handle scops that contain condition
2984 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2986 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2987 * testsuite/gcc.dg/graphite/block-1.c: Same.
2988 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2990 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2991 * testsuite/gcc.dg/graphite/block-3.c: New.
2992 * testsuite/gcc.dg/graphite/pr38498.c: New.
2994 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2996 PR tree-optimization/38510
2997 * gcc.dg/graphite/pr38510.c: New.
2998 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2999 (translate_clast): Call recompute_all_dominators before
3001 (gloog): Call recompute_all_dominators before graphite_verify.
3003 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3005 PR tree-optimization/38492
3006 * graphite.c (rename_map_elt, debug_rename_elt,
3007 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3008 rename_map_elt_info, eq_rename_map_elts,
3009 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3010 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3011 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3012 (sese_build_livein_liveouts): New.
3013 (new_sese, free_sese): New.
3014 (new_scop): Call new_sese.
3015 (free_scop): Call free_sese.
3016 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3017 (register_old_new_names): Renamed register_old_and_new_names.
3018 (register_scop_liveout_renames, add_loop_exit_phis,
3019 insert_loop_close_phis, struct igp,
3020 default_liveout_before_guard, add_guard_exit_phis,
3021 insert_guard_phis, copy_renames): New.
3022 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3023 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3024 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3025 (scop_adjust_phis_for_liveouts): New.
3026 (gloog): Call scop_adjust_phis_for_liveouts.
3028 * graphite.h (struct sese): Documented. Added fields liveout,
3030 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3031 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3032 (struct scop): Added field liveout_renames.
3033 (SCOP_LIVEOUT_RENAMES): New.
3035 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3037 PR tree-optimization/38409
3038 * gcc.dg/graphite/pr38409.c: New.
3039 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3041 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3043 * graphite.c (gcc_type_for_cloog_iv): By default return
3045 (graphite_create_new_loop): Don't fold_convert the already
3046 fold_convert-ed expression.
3048 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3050 PR tree-optimization/38446
3051 * gcc.dg/graphite/pr38446.c: New.
3052 * graphite.c (register_bb_in_sese): New.
3053 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3054 looking at the bbs in the region.
3055 * graphite.h (sese): Add region_basic_blocks pointer set to
3056 structure and initialize at the time of defining new scop.
3058 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3060 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3061 (find_params_in_bb): Do not free data refs.
3062 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3064 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3066 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3067 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3068 * testsuite/gcc.dg/graphite/block-5.c: New.
3069 * testsuite/gcc.dg/graphite/block-6.c: New.
3070 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3071 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3072 * testsuite/gcc.dg/graphite/block-2.c: Same.
3074 * graphite.c (struct ivtype_map_elt): New.
3075 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3076 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3077 gcc_type_for_cloog_iv): New.
3078 (loop_iv_stack_patch_for_consts): Use the type of the induction
3079 variable from the original loop, except for the automatically
3080 generated loops, i.e., in the case of a strip-mined loop, in
3081 which case there is no original loop: in that case just use
3083 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3084 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3085 (clast_name_to_gcc): Accept params to be NULL.
3086 (clast_to_gcc_expression): Take an extra parameter for the type.
3087 Convert to that type all the expressions built by this function.
3088 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3089 (graphite_translate_clast_equation): Compute the type of the
3090 clast_equation before translating its LHS and RHS.
3091 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3092 (graphite_create_new_loop): Compute the type of the induction
3093 variable before translating the lower and upper bounds and before
3094 creating the induction variable.
3095 (rename_variables_from_edge, rename_phis_end_scop): New.
3096 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3097 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3098 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3099 compute_cloog_iv_types): New.
3100 (gloog): Call compute_cloog_iv_types before starting the
3101 translation of the clast.
3103 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3104 (GBB_CLOOG_IV_TYPES): New.
3105 (debug_ivtype_map): Declared.
3106 (oldiv_for_loop): New.
3108 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3111 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3112 (param_index): Assert if parameter is not know after parameter
3114 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3115 (find_scop_parameters): Mark, that we have finished parameter
3117 (graphite_transform_loops): Move condition detection before parameter
3119 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3120 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3122 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3124 * graphite.c (graphite_transform_loops): Always call find_transform ()
3125 in ENABLE_CHECKING. So we test these code paths, even if we do not
3128 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3130 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3131 (print_scop): Ditto.
3133 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3136 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3137 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3138 regions more than once.
3140 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3142 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3143 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3146 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3148 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3149 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3150 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3151 (max_precision_type): New.
3152 (value_clast): Removed.
3153 (clast_to_gcc_expression): Be more careful to types of expressions.
3154 Use max_precision_type and update use of gmp_cst_to_tree.
3155 (graphite_translate_clast_equation): Use max_precision_type.
3156 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3157 use the type of the condition.
3158 (graphite_create_new_loop): Do not use integer_type_node, use the
3159 max_precision_type of lb and ub.
3161 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3163 * graphite.c (build_scops_1): Initialize open_scop.exit
3166 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3168 * testsuite/gcc.dg/graphite/pr38084.c: New.
3169 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3170 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3171 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3172 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3173 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3175 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3176 Jan Sjodin <jan.sjodin@amd.com>
3177 Harsha Jagasia <harsha.jagasia@amd.com>
3189 * testsuite/gcc.dg/graphite/pr38073.c: New.
3190 * testsuite/gcc.dg/graphite/pr37928.c: New.
3191 * testsuite/gcc.dg/graphite/pr37883.c: New.
3192 * testsuite/gcc.dg/graphite/pr38125.c: New.
3193 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3194 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3195 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3197 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3198 the number of detected scops. Copy exact same test for loop
3200 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3201 loops to be blocked as reductions are not handled.
3202 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3204 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3205 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3207 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3208 * Makefile.in (graphite.o): Depend on value-prof.h.
3209 (graphite.o-warn): Removed -Wno-error.
3210 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3211 to be a NULL pointer. Call update_stmt. Return the newly created
3212 cannonical induction variable.
3214 * graphite.h (debug_rename_map): Declared. Fix some comments.
3216 * graphite.c: Reimplement the code generation from graphite to gimple.
3217 Include value-prof.h.
3218 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3219 (get_old_iv_from_ssa_name): Removed.
3220 (graphite_stmt_p): New.
3221 (new_graphite_bb): Test for useful statements before building a
3222 graphite statement for the basic block.
3223 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3224 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3226 (recompute_all_dominators, graphite_verify,
3227 nb_reductions_in_loop, graphite_loop_normal_form): New.
3228 (scop_record_loop): Call graphite_loop_normal_form.
3229 (build_scop_loop_nests): Iterate over all the blocks of the
3230 function instead of relying on the incomplete information from
3231 SCOP_BBS. Return the success of the operation.
3232 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3233 (add_bb_domains): Removed.
3234 (build_loop_iteration_domains): Don't call add_bb_domains.
3235 Add the iteration domain only to the basic blocks that have been
3236 translated to graphite.
3237 (build_scop_conditions_1): Add constraints only if the basic
3238 block have been translated to graphite.
3239 (build_scop_data_accesses): Completely disabled until data
3240 dependence is correctly implemented.
3241 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3242 (remove_all_edges_1, remove_all_edges): Removed.
3243 (get_new_name_from_old_name): New.
3244 (graphite_rename_variables_in_stmt): Renamed
3245 rename_variables_in_stmt. Call get_new_name_from_old_name.
3246 Use replace_exp and update_stmt.
3247 (is_old_iv): Renamed is_iv.
3248 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3249 Use replace_exp and update_stmt.
3250 (expand_scalar_variables_expr): Same. Use the map to get the
3251 new names for the renaming of induction variables and for the
3252 renaming of variables after a basic block has been copied.
3253 (expand_scalar_variables): Same.
3254 (graphite_rename_variables): Renamed rename_variables.
3255 (move_phi_nodes): Removed.
3256 (get_false_edge_from_guard_bb): New.
3257 (build_iv_mapping): Do not insert the induction variable of a
3258 loop in the renaming iv map if the basic block does not belong
3260 (register_old_new_names, graphite_copy_stmts_from_block,
3261 copy_bb_and_scalar_dependences): New.
3262 (translate_clast): Heavily reimplemented: copy basic blocks,
3263 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3264 At each translation step call graphite_verify ensuring the
3265 consistency of the SSA, loops and dominators information.
3266 (collect_virtual_phis, find_vdef_for_var_in_bb,
3267 find_vdef_for_var_1, find_vdef_for_var,
3268 patch_phis_for_virtual_defs): Removed huge hack.
3269 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3270 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3271 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3272 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3273 if_region_get_condition_block, if_region_set_false_region,
3274 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3275 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3276 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3277 rewrite_into_sese_closed_ssa): New.
3278 (gloog): Remove dead code. Early return if code cannot be
3279 generated. Call cleanup_tree_cfg once the scop has been code
3281 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3282 block loops with less than two loops.
3283 (graphite_apply_transformations): Remove the call to
3284 scop_remove_ignoreable_gbbs.
3285 (limit_scops): When build_scop_loop_nests fails, continue on
3286 the next scop. Fix open_scop.entry.
3287 (graphite_transform_loops): Call recompute_all_dominators: force the
3288 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3289 Call initialize_original_copy_tables and free_original_copy_tables
3290 to be able to copy basic blocks during code generation.
3291 When build_scop_loop_nests fails, continue on next scop.
3292 (value_clast): New union.
3293 (clast_to_gcc_expression): Fix type cast warning.
3295 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3297 * Merge from mainline (r140838:141727).
3299 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3303 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3305 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3309 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3310 exits and conditions.
3311 * testsuite/gcc.dg/graphite/pr37943.c: New.
3313 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3316 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3318 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3320 * doc/invoke.texi: Fix spaces.
3322 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3324 PR tree-optimization/37891
3325 Reverted last commit.
3326 * graphite.c (create_single_entry_edge): Set
3327 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3329 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3330 Mitul Thakkar <mitul.thakkar@amd.com>
3332 * graphite.c (create_single_entry_edge): Set
3333 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3335 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3337 * doc/invoke.texi: Add -fgraphite-identity.
3338 * graphite.c (graphite_apply_transformations): Check for
3339 -fgraphite-identity.
3340 * toplev.c (process_options): Add flag_graphite_identity.
3341 * tree-ssa-loop.c: Add flag_graphite_identity.
3343 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3345 Undo changes from 2008-10-02:
3346 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3347 operand type when copying the operand to a variable of different type.
3348 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3349 with the IV name after increment.
3351 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3352 Harsha Jagasia <harsha.jagasia@amd.com>
3354 PR tree-optimization/37828
3355 * testsuite/gcc.dg/graphite/pr37828.c: New.
3356 * graphite.c (graphite_trans_loop_block): Do not loop block
3357 single nested loops.
3359 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3360 Sebastian Pop <sebastian.pop@amd.com>
3362 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3363 rename_map_elt_info, eq_rename_map_elts): New.
3364 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3365 (expand_scalar_variables_expr): Change parameters.
3366 (expand_scalar_variables_stmt): Same.
3367 (expand_scalar_variables): Same.
3368 (graphite_rename_ivs): Rename graphite_rename_variables.
3369 (build_iv_mapping): New.
3370 (translate_clast): Call build_iv_mapping.
3371 * graphite.h (gbb_p): New name.
3373 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3375 PR tree-optimization/37684
3376 * gcc.dg/graphite/pr37684.c: New.
3377 * graphite.c (exclude_component_ref): New.
3378 (is_simple_operand): Call exclude_component_ref.
3380 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3381 Harsha Jagasia <harsha.jagasia@amd.com>
3383 PR tree-optimization/37485
3384 * gcc.dg/graphite/block-2.c: New
3385 * graphite.c (gmp_cst_to_tree): Moved.
3386 (iv_stack_entry_is_constant): New.
3387 (iv_stack_entry_is_iv): New.
3388 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3389 (loop_iv_stack_insert_constant): New.
3390 (loop_iv_stack_pop): Use new datatpype.
3391 (loop_iv_stack_get_iv): Same.
3392 (loop_iv_stack_get_iv_from_name): Same.
3393 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3394 (loop_iv_stack_patch_for_consts): New.
3395 (loop_iv_stack_remove_constants): New.
3396 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3397 (translate_clast): Call loop_iv_stack_patch_for_consts and
3398 loop_iv_stack_remove_constants.
3399 (gloog): Use new datatype. Redirect construction edge to end
3400 block to avoid accidental deletion.
3401 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3403 (union iv_stack_entry_data): New. Data in iv stack entry.
3404 (struct iv_stack_entry): New. Datatype for iv stack entries.
3406 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3408 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3409 operand type when copying the operand to a variable of different type.
3411 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3413 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3414 with the IV name after increment.
3416 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3418 * Merge from mainline (r140164:140838).
3420 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3422 * graphite-data-ref.c: New.
3423 * graphite.c (print_scop): Also dump the dependence graph.
3424 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3425 (new_scop): Initialize SCOP_DEP_GRAPH.
3426 (build_scop_dynamic_schedules): New.
3427 (build_access_matrix_with_af): Fixed column numbering.
3428 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3429 * graphite.h: Add ifndef/define guards against multiple inclusion.
3430 (struct scop): Add dep_graph field.
3431 (SCOP_DEP_GRAPH): Defined.
3432 (ref_nb_loops): Fixed and moved to other position.
3433 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3434 (nb_loops_around_loop_in_scop): New.
3435 (graphite_dump_dependence_graph): Declared.
3436 (graphite_build_rdg_all_levels): Declared.
3437 (graphite_test_dependence): Declared.
3438 * Makefile.in (graphite-data-ref.o): New target.
3440 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3442 * Merge from mainline (139870:140164).
3444 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3446 * Merge from mainline (138275:139870).
3447 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3448 the commits from trunk broke the niter detection.
3450 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3452 * graphite.c: Add more documentation. Fix formatting.
3453 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3454 loop_iv_stack_debug): Moved...
3455 (schedule_to_scattering): Move before use.
3456 (dot_all_scops): Include in "#if 0" the code for system
3459 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3460 loop_iv_stack_debug): ...here.
3462 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3464 * tree-phinodes.c (make_phi_node): Extern.
3465 (add_phi_node_to_bb): New.
3466 (create_phi_node): Call add_phi_node_to_bb.
3467 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3468 (remove_statement): Handle case where stored phi was updated
3469 and is no longer the same.
3470 * graphite.c (is_parameter): New.
3472 (expand_scalar_variables_expr): New.
3473 (expand_scalar_variables_stmt): New.
3474 (expand_scalar_variables): New.
3475 (move_phi_nodes): Create new phi instead of moving old one.
3476 (translate_clast): Call expand_scalar_variables.
3477 (find_vdef_for_var_in_bb): Also scan regular definitions.
3478 (skip_phi_defs): New.
3479 (collect_scop_exit_phi_args): New.
3480 (patch_scop_exit_phi_args): New.
3481 (gloog): Patch phis after scop.
3482 * tree-flow.h: (add_phi_node_to_bb): Declared.
3483 (make_phi_node): Declared.
3485 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3487 * graphite.c (end_scop): Split the entry of the scop when it
3488 is the header of the loop in which the scop is ending.
3489 (build_scops_1, limit_scops): Update uses of end_scop.
3491 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3493 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3494 SCOP_ENTRY or SCOP_EXIT.
3496 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3498 * graphite.c (get_construction_edge): Removed.
3499 (gloog): Construction edge is the scop entry edge.
3501 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3503 * graphite.c (can_generate_for_scop): Removed.
3504 (gloog): Do not call it.
3506 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3508 * graphite.c (new_scop): Entry of a scop is an edge.
3509 Initialize SESE region.
3510 (free_scop): Free SESE region.
3511 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3512 (split_difficult_bb): New, split from end_scop.
3513 (end_scop): Exit of a scop is an edge.
3514 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3515 not automatically updated and thus is always wrong.
3516 * graphite.h (struct sese): New.
3519 (struct scop): New field for a SESE region. Remove entry, exit.
3520 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3521 semantics as before. Moved comment around.
3523 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3524 Sebastian Pop <sebastian.pop@amd.com>
3526 * graphite.c (graphite_transform_loops): Always enable gloog
3527 and find_transform when ENABLE_CHECKING.
3529 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3531 * graphite.c (graphite_transform_loops): Move pretty printer
3532 of SCOPs before doing any transform. Remove call to print_scops
3533 and dot_all_scops_1.
3535 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3537 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3538 (print_graphite_bb): Same.
3540 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3542 * graphite.c (dot_all_scops_1): Cleanup.
3543 (move_scops): Fix comment.
3545 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3547 * graphite.c (build_scop_bbs): Revert commit 139355:
3549 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3550 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3552 * graphite.c (build_scop_bbs): Factor up code.
3554 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3556 * graphite.c (gloog): Update dominator info.
3558 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3560 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3562 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3566 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3567 (translate_clast): Correct formatting.
3568 * graphite.h (struct num_map): Removed.
3569 (struct graphite_bb): Remove num_map field.
3570 (GBB_INDEX_TO_NUM_MAP): Removed.
3572 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3574 * graphite.c (build_access_matrix_with_af): Fix comments.
3575 (build_scop_data_accesses): Same.
3577 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3579 * graphite.c (build_scop_data_accesses): Don't construct
3580 access matrices. Add a FIXME and an assert condition that
3581 should pass when the access matrices will be needed.
3583 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3585 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3587 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3588 Moved close by free_graphite_bb.
3589 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3590 (new_scop): Move close by free_scop.
3591 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3593 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3595 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3596 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3597 instead of recursive call.
3598 (graphite_translate_clast_equation): New.
3599 (graphite_create_guard_cond_expr): New.
3600 (graphite_create_new_guard): New.
3601 (get_stack_index_from_iv): Removed.
3602 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3603 (get_true_edge_from_guard_bb): New.
3604 (translate_clast): Handle stmt_guard in clast.
3605 (get_construction_edge): Allow construction edge detection for
3606 a scope entry with multiple predecessors if one predecessor is
3607 the immediate dominator of scope entry.
3608 (can_generate_code_stmt): Enable code generation for clast_guard.
3609 (gloog): Use correct context loop. Removed check for post dominators.
3610 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3612 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3614 * graphite.c (remove_dead_loops): Document better which
3617 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3619 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3621 (graphite.o): Also depends on pointer-set.h.
3623 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3625 * graphite.c (scop_record_loop): Fix compile warning.
3627 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3628 Sebastian Pop <sebastian.pop@amd.com>
3630 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3632 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3634 * graphite.c (build_graphite_bb): Initialize bb->aux to
3635 point to the graphite_bb_p.
3636 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3638 (add_bb_domains): Does not use the scop parameter.
3639 (graphite_transform_loops): Clean bb->aux at the end.
3641 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3642 Sebastian Pop <sebastian.pop@amd.com>
3644 * testsuite/lib/target-supports.exp
3645 (check_effective_target_fgraphite): New.
3647 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3648 check_effective_target_fgraphite returns false.
3649 Set dg-do-what-default to compile.
3650 (scan-graphite-dump-times): Removed.
3651 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3653 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3654 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3655 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3656 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3657 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3658 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3659 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3660 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3661 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3662 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3663 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3664 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3665 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3666 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3667 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3668 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3669 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3670 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3671 * testsuite/gcc.dg/graphite/block-0.c: Same.
3672 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3673 * testsuite/gcc.dg/graphite/block-1.c: Same.
3674 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3675 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3676 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3677 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3678 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3680 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3682 * graphite.c: Fix some XXX comments.
3683 (build_scop_dynamic_schedules): Removed.
3685 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3687 * graphite.h (scop_max_loop_depth): Moved...
3688 * graphite.c (scop_max_loop_depth): ...here.
3689 (remove_all_edges_1): New.
3690 (remove_all_edges): Factored code.
3691 (remove_cond_exprs): Check only the last statement for
3692 a GIMPLE_COND expression.
3694 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3696 * graphite.c (scan_tree_for_params): Early return when the
3697 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3698 (find_scop_parameters): Factor out code.
3699 (graphite_trans_bb_strip_mine): Remove dead code.
3701 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3703 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3704 graphite_trans_bb_move_loop): Factor asserts.
3705 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3706 Do not call calculate_dominance_info and estimate_bb_frequencies.
3708 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3710 * graphite.c (create_loops_mapping, free_loops_mapping,
3711 create_loops_mapping_num, debug_loop_mapping_1,
3712 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3713 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3714 graphite_loops_mapping_add_child_num,
3715 graphite_loops_mapping_insert_child,
3716 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3717 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3718 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3719 create_num_from_index, get_num_from_index,
3720 swap_loop_mapped_depth): Removed.
3721 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3722 (free_scop): Do not call free_loops_mapping.
3723 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3724 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3725 get_loop_mapped_depth.
3726 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3727 (graphite_trans_bb_strip_mine): Same.
3728 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3729 (struct scop): Remove field loops_mapping.
3731 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3732 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3734 * graphite.c (scop_record_loop): Factor out one level of the
3735 condition by early return.
3736 (build_scop_loop_nests): Format following FSF coding style.
3737 (build_scop_dynamic_schedules): Factor out code.
3738 (scopdet_bb_info): Reindent. Default case should not be reachable.
3740 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3741 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3743 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3744 assignments that are not handled as simple operands for now.
3746 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3747 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3749 * graphite.c (build_scop_bbs): Factor up code.
3751 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3752 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3754 * graphite.c (stmt_simple_for_scop_p): Factor code out
3756 (enum gbb_type): New. Group all the GBB_* types under it.
3757 (is_loop_exit): Moved...
3758 (end_scop): Enable BB spliting.
3759 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3760 * cfgloop.h (is_loop_exit): Declared.
3762 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3764 * doc/invoke.texi: Remove strides from examples containing
3765 DO loops when the strides are equal to 1.
3767 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3768 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3770 * graphite.c (graphite_trans_scop_block): Or the result with
3771 the result from graphite_trans_loop_block.
3772 * testsuite/gcc.dg/graphite/block-1.c: New.
3773 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3774 * testsuite/gfortran.dg/graphite/block-2.f: New.
3776 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3778 * graphite.c (graphite_transform_loops): Call cloog_initialize
3781 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3783 * tree-data-ref.c) (stmt_simple_memref_p): New.
3784 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3785 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3786 (is_simple_operand): Call stmt_simple_memref_p.
3788 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3789 using pointer arithmetic, as this is optimized by PRE and
3790 makes the code too difficult to analyze.
3792 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3794 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3796 * gdbinit.in (pgg): New.
3798 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3800 * graphite.c (graphite_trans_loop_block): Fix warning.
3802 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3804 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3806 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3808 * graphite.c (graphite_trans_bb_block): Remove check for
3809 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3810 Check if loop blocking is profitable for every loop, before applying
3812 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3813 if flag_loop_block is set.
3815 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3817 * graphite.c: Add some more documentation for the loop
3820 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3822 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3823 * graphite.c: Format on less than 80 columns.
3826 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3828 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3830 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3832 * doc/invoke.texi (floop-block, floop-strip-mine,
3833 floop-interchange): Update documentation with examples.
3835 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3837 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3839 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3841 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3843 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3844 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3845 * tree-scalar-evolution.c: Revert useless changes.
3846 * tree-phinodes.c: Same.
3849 * tree-vectorizer.h: Same.
3850 * tree-flow.h: Same.
3852 * common.opt (fgraphite): Update documentation.
3854 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3856 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3857 -floop-interchange): Add more text for explaining what each of these
3859 * tree-into-ssa.c (gimple_vec): Moved to...
3860 * graphite.c: Include gimple.h.
3861 (gimple_vec): Moved to...
3862 (del_loop_to_cloog_loop): Removed.
3863 (loop_affine_expr): Do not call create_data_ref when the
3864 operand is a constant.
3865 (new_scop): Use free instead of del_loop_to_cloog_loop.
3866 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3867 * gimple.h (gimple_vec): ... here.
3869 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3871 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3873 (build_loop_iteration_domains): Fail, if latch executions unknown.
3875 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3877 * graphite.c (add_conditions_to_domain): New.
3878 (build_scop_conditions_1): Call add_conditions_to_domain.
3879 (set_cloog_options): Allow to disable optimizations.
3881 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3883 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3884 Do not use walk_dominator_tree.
3885 (find_scop_parameters): Do not use walk_dominator_tree.
3887 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3889 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3890 (idx_record_params): Adapt.
3891 * graphite.h (scop_gimple_loop_depth): New.
3893 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3895 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3896 (scan_tree_for_params): Remove value_init.
3897 (build_scop_context): Remove value_init.