1 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (struct irp_data): Removed.
4 (idx_record_params): Removed.
5 (find_params_in_bb): Scan for parameters the access functions; don't
6 parse the tree representation.
8 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
10 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
11 passes at -O1 and below.
13 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
15 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
16 tree-scalar-evolution.h, and then tree-data-ref.h.
17 * graphite-clast-to-gimple.c: Same.
18 * graphite-dependences.c: Same.
19 * graphite-interchange.c: Same.
20 * graphite-poly.c: Same.
21 * graphite-scop-detection.c: Same.
22 * graphite-sese-to-poly.c: Same.
24 * lambda-code.c: Same.
25 * matrix-reorg.c: Same.
26 * tree-data-ref.c: Same.
27 * tree-if-conv.c: Same.
28 * tree-loop-distribu: Same.: Same.
29 * tree-loop-linear.c: Same.
30 * tree-parloops.c: Same.
31 * tree-predcom.c: Same.
32 * tree-vect-patterns.c: Same.
34 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
36 Partially revert the previous patch, except the following.
37 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
38 as parameters the operands of the not expression.
40 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
42 * tree-scalar-evolution.c (instantiate_scev_assign): New.
43 Do not call analyze_scalar_evolution on assignments.
44 (instantiate_scev_phi): Call analyze_scalar_evolution.
45 (instantiate_scev_name): Call instantiate_scev_assign and
47 (instantiate_scev_not): Adapted to pass as parameters the operands
48 of the not expression.
50 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
52 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
53 to pass as parameters the operands of the binary expression.
55 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
57 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
58 instantiate_scev_not. Handle NEGATE_EXPR.
59 (instantiate_scev_r): Handle NEGATE_EXPR.
61 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
63 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
65 (instantiate_scev_r): Move code in instantiate_scev_2
66 and instantiate_scev_1.
68 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
70 * tree-scalar-evolution.c (instantiate_scev_3): New.
71 (instantiate_scev_1): Move code in instantiate_scev_3.
73 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
75 * tree-scalar-evolution.c (instantiate_scev_poly): New.
76 (instantiate_scev_1): Move code in instantiate_scev_poly.
78 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
80 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
81 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
83 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
85 * tree-scalar-evolution.c (instantiate_scev_convert): New.
86 (instantiate_scev_1): Move code in instantiate_scev_convert.
88 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
90 * tree-scalar-evolution.c (instantiate_scev_binary): New.
91 (instantiate_scev_1): Move code in instantiate_scev_binary.
93 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
95 * tree-scalar-evolution.c (instantiate_scev_name): New.
96 (instantiate_scev_1): Move code in instantiate_scev_name.
98 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
100 * Merge from mainline (150992:151171).
102 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
104 * graphite-dependences.c (graphite_legal_transform_bb): Call
105 pbb_remove_duplicate_pdrs.
106 * graphite-poly.c (can_collapse_pdr): Removed.
107 (pdr_find_duplicate): Removed.
108 (can_collapse_pdrs): New.
109 (pbb_remove_duplicate_pdrs): New.
110 (new_poly_dr): Do not look for duplicates.
111 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
112 (PBB_PDR_DUPLICATES_REMOVED): New.
113 (pbb_remove_duplicate_pdrs): Declared.
115 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
117 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
118 the strides by multiplying by PDR_NB_REFS.
119 * graphite-poly.c (can_collapse_pdr): New.
120 (pdr_find_duplicate): New.
121 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
122 Initialize PDR_NB_REFS.
123 * graphite-poly.h (struct poly_dr): Add field nb_refs.
125 (new_poly_dr): Number of subscripts is a graphite_dim_t.
127 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
129 Revert one of the previous commits:
130 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
131 the computation of symmetric data dependence relations.
132 (dependency_between_pbbs_p): Same.
134 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
137 * graphite-poly.c (apply_poly_transforms): Remove legality test before
140 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
142 * graphite-dependences.c (pddr_original_scattering): Return NULL
143 for read-read dependence relations.
144 * graphite-poly.h (enum poly_dr_type): Fix comment.
147 (pdr_may_write_p): New.
149 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
152 (struct poly_dr): Same.
154 * graphite-poly.c (new_poly_dr): Same.
156 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
157 Sebastian Pop <sebastian.pop@amd.com>
159 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
160 pbb_strip_mine_time_depth. Changed the implementation so that
161 transformation is expressed as a transformation on
162 time (scatttering) dimensions. Also, ensures that the 2d+1
163 scheduling format is preserved.
164 (pbb_strip_mine_profitable_p): Profitability is based on the
165 iteration number of a given time (scattering) dimension,
166 and not on a original loop depth dimension.
167 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
168 (pbb_do_strip_mine): Call psct_dynamic_dim.
169 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
170 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
171 (pbb_nb_dynamic_scattering_transform): New.
172 (psct_dynamic_dim): New.
174 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
176 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
177 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
178 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
179 * graphite-interchange.c (build_linearized_memory_access): Same.
180 (memory_stride_in_loop): Same.
182 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
184 * graphite-dependences.c (pddr_original_scattering): New.
185 (graphite_legal_transform_dr): Call pddr_original_scattering.
188 * graphite-dependences.h (dot_deps): Declared.
189 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
190 (print_pdr): Print PDR_ID.
191 * graphite-poly.h (struct poly_dr): Add field id.
194 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
196 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
198 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
199 not delete the original dependence relation.
201 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
204 the computation of symmetric data dependence relations.
205 (dependency_between_pbbs_p): Same.
207 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
209 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
210 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
211 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
212 (free_poly_ddr): New.
213 (pddr_is_empty): New.
214 (dependence_polyhedron_1): Now returns a poly_ddr_p.
215 (dependence_polyhedron): Same. Remove useless gcc_assert.
217 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
218 (graphite_carried_dependence_level_k): Call pddr_is_empty.
219 * graphite-dependences.h (enum poly_dependence_kind): New.
220 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
221 (PDRP_SOURCE): Renamed PDDR_SOURCE.
222 (PDRP_SINK): Renamed PDDR_SINK.
223 (PDRP_DDP): Renamed PDDR_DDP.
225 (free_poly_ddr): Declared.
226 * graphite-poly.c (new_scop): Use the new hash function names.
227 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
229 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
231 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
233 * Merge from mainline (150764:150992).
235 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
237 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
238 bounds with LT_EXPR to make niter analysis more precise on code
239 generated by Graphite.
241 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
243 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
244 (graphite_legal_transform_bb): Same.
245 (poly_drs_may_alias_p): Same.
247 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
250 * graphite-ppl.c (ppl_max_for_le): Correct the use of
251 ppl_Pointset_Powerset_C_Polyhedron_maximize.
253 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
255 * graphite-poly.c (print_pbb): Print PBB index.
257 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
259 * Merge from mainline (r150672:150764).
261 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
263 * graphite-interchange.c (ppl_max_for_le): Moved...
264 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
265 * graphite-ppl.c (ppl_max_for_le): ... here.
266 * graphite-ppl.h (ppl_max_for_le): Declared.
268 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
270 * Merge from mainline (r150372:150672).
272 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
275 * sese.c (convert_for_phi_arg): New.
276 (add_guard_exit_phis): Use convert_for_phi_arg.
278 * testsuite/gfortran.dg/graphite/id-17.f: New.
280 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
283 unknown subscript upper bounds.
285 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
287 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
288 Pranav Garg <pranav.garg2107@gmail.com>
290 * graphite-interchange.c (gather_access_strides): Removed.
291 (ppl_max_for_le): New.
292 (build_linearized_memory_access): New.
293 (memory_stride_in_loop): New.
294 (pbb_interchange_profitable_p): Reimplemented.
295 * graphite-ppl.h (ppl_new_id_map): New.
296 (ppl_interchange): New.
298 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
300 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
302 * graphite-interchange.c (compute_subscript): Removed.
303 (compute_array_size_cstr): Removed.
304 (compute_array_size_poly): Removed.
305 (compute_array_size): Removed.
306 (gather_access_strides_poly): Removed.
307 (gather_access_strides): Empty.
309 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
311 * graphite-dependences.c (dependence_polyhedron_1): Replace
312 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
313 (graphite_legal_transform_dr): Same.
314 (graphite_carried_dependence_level_k): Same.
315 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
316 Initialize PDR_NB_SUBSCRIPTS.
317 (print_pdr_access_layout): Replace pdr_nb_subscripts with
319 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
320 (PDR_NB_SUBSCRIPTS): New.
321 (pdr_nb_subscripts): Removed.
322 (pdr_dim): Simplified.
323 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
324 with PDR_NB_SUBSCRIPTS.
326 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
328 * graphite-interchange.c (compute_array_size): Remove use of
330 * graphite-poly.c (new_poly_dr): Remove argument data_container.
331 Do not initialize PDR_DATA_CONTAINER.
332 (print_pdr): Do not print PDR_DATA_CONTAINER.
333 * graphite-poly.h (struct poly_dr): Remove data_container field.
334 (PDR_DATA_CONTAINER): Removed.
335 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
337 (build_poly_dr): Same.
339 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
341 * testsuite/gcc.dg/graphite/interchange-9.c: New.
343 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
344 Sebastian Pop <sebastian.pop@amd.com>
346 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
347 copy of the dependence polyhedron. Free the temporary objects.
348 (graphite_carried_dependence_level_k): Free unused objects before
351 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
352 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
353 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
354 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
355 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
357 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
359 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
360 Early return without analyzing the data dependences if no
361 transform has been done. Call restore_scattering if the transform
363 (graphite-interchange.c): Same.
364 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
365 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
366 (apply_poly_transforms): Do not gcc_assert that
367 the transform is legal.
368 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
369 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
370 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
371 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
372 * graphite-poly.h (struct poly_scattering): New.
373 (struct poly_bb): Add original, transformed, and saved fields.
374 Remove transformed_scattering, original_scattering, nb_local_variables,
375 and nb_scattering_transform fields.
376 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
377 (poly_scattering_new): New.
378 (poly_scattering_free): New.
379 (poly_scattering_copy): New.
380 (store_scattering_pbb): New.
381 (store_scattering): New.
382 (restore_scattering_pbb): New.
383 (restore_scattering): New.
384 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
385 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
387 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
389 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
392 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
394 * Makefile.in (graphite.o): Depends on PREDICT_H.
395 * graphite.c: Include predict.h.
396 (graphite_finalize): Call tree_estimate_probability.
397 * predict.c (predict_loops): Do not call scev_initialize and
399 (tree_estimate_probability_bb): New.
400 (tree_estimate_probability): Do not initialize loops: move that
401 code to the driver. Call tree_estimate_probability_bb.
402 (tree_estimate_probability_driver): New.
403 (pass_profile): Use tree_estimate_probability_driver.
404 * predict.h (tree_estimate_probability): Declared.
406 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
408 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
409 * graphite-dependences.c (graphite_legal_transform): Add time to
410 TV_GRAPHITE_DATA_DEPS.
411 (dependency_between_pbbs_p): Same.
412 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
414 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
416 * Merge from mainline (r149952:150372).
418 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
420 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
421 * graphite-blocking.c: Same.
422 * graphite-clast-to-gimple.c: Same.
423 * graphite-dependences.c: Same.
424 * graphite-poly.c: Same.
425 * graphite-poly.h: Same.
426 * graphite-ppl.c: Same.
427 * graphite-scop-detection.c: Same.
428 * graphite-sese-to-poly.c: Same.
431 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
433 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
434 (remove_simple_copy_phi): New.
435 (remove_invariant_phi): New.
436 (simple_copy_phi_p): New.
437 (reduction_phi_p): New.
438 (gsi_for_ssa_name_def): New.
439 (insert_out_of_ssa_copy): New.
440 (insert_out_of_ssa_copy_on_edge): New.
441 (create_zero_dim_array): New.
442 (scalar_close_phi_node_p): New.
443 (rewrite_close_phi_out_of_ssa): New.
444 (rewrite_phi_out_of_ssa): New.
445 (rewrite_reductions_out_of_ssa): New.
446 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
448 * testsuite/gcc.dg/graphite/id-11.c: New.
449 * testsuite/gcc.dg/graphite/id-15.c: New.
450 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
451 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
452 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
453 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
454 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
455 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
456 * testsuite/gfortran.dg/graphite/id-13.f: New.
457 * testsuite/gfortran.dg/graphite/id-5.f: New.
459 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
461 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
462 check that nb_reductions_in_loop is zero.
463 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
465 (nb_reductions_in_loop): Removed.
466 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
467 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
468 (bb_contains_non_iv_scalar_phi_nodes): Removed.
469 (scop_contains_non_iv_scalar_phi_nodes): Removed.
470 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
472 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
474 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
475 statements that have an empty iteration domain.
476 * testsuite/gfortran.dg/graphite/id-16.f: New.
478 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
480 * tree-scalar-evolution.c (instantiate_scev_1): Return
481 chrec_dont_know when the result is not above instantiate_below.
482 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
483 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
484 the tree has a known scalar evolution.
485 * testsuite/gfortran.dg/graphite/id-14.f: New.
486 * testsuite/gfortran.dg/graphite/id-15.f: New.
488 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
490 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
492 (rename_variables): Keep inserting renames after the ones already
495 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
497 * graphite-sese-to-poly.c (compare_bb_depths): New.
498 (graphite_sort_dominated_info): New.
499 (build_scop_bbs_1): Call graphite_sort_dominated_info.
500 (build_scop_scattering): Fix comment.
502 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
504 * graphite.c (graphite_finalize): Call print_loops instead of
505 dump_function_to_file.
506 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
507 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
508 loops generated in the graphite output file.
509 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
510 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
511 * testsuite/gfortran.dg/graphite/id-12.f: New.
513 2009-07-24 Li Feng <nemokingdom@gmail.com>
515 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
518 2009-07-24 Li Feng <nemokingdom@gmail.com>
519 Tobias Grosser <grosser@fim.uni-passau.de>
521 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
522 alias set number build alias in ACCESSES polyhedron.
523 (build_alias_set_for_drs): New.
524 (build_pbb_drs): Added build_alias_set_for_drs.
525 * graphite-dependences.c (poly_drs_may_alias_p): New.
526 (graphite_carried_dependence_level_k): Check alias information
527 before building polyhedron.
529 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
531 * Makefile.in (lambda-code.o): Fix formatting.
533 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
535 * Merge from mainline (r149350-149952)
537 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
539 * graphite-poly.c (apply_poly_transforms): Move strip_mine
540 before interchange to prepare for loop blocking.
542 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
544 * graphite-poly.c (apply_poly_transforms): Add checks after every
546 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
547 done in apply_poly_transforms.
549 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
551 * graphite-dependences.c (build_lexicographically_gt_constraint):
552 Replace RES parameter with *RES.
553 (dependence_polyhedron_1): Pass an address of the parameter RES
554 instead of value of RES.
556 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
558 * graphite.c (graphite_finalize): Fix comment.
559 (graphite_transform_loops): Reset scev info after code generation
562 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
564 * graphite.c (graphite_finalize): Call scev_reset.
566 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
568 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
569 GBB_CLOOG_IV_TYPES hash table twice.
570 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
571 (add_condition_to_domain): Clear GMP values.
573 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
575 * graphite-dependences.c: Fix formatting.
576 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
577 (pbb_number_of_iterations): Free ppl_Linear_Expression.
578 * graphite-sese-to-poly.c: Fix formatting.
579 * graphite.c (graphite_transform_loops): Create the hash table
580 after the early return.
582 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
584 * testsuite/gcc.dg/graphite/id-14.c: New.
585 * testsuite/gcc.dg/graphite/pr40157.c: New.
586 * testsuite/gfortran.dg/graphite/id-11.f: New.
588 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
590 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
591 (build_poly_scop): Return false when there are no pbbs within
592 loops to avoid to pass to cloog scops with no loops.
594 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
596 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
597 useless test "i % 2".
598 (build_pbb_scattering_polyhedrons): Fix formatting.
599 (build_poly_dr): Same.
600 * graphite.c (graphite_transform_loops): Restructure.
602 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
604 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
605 reduction_list parameter.
606 (rewrite_all_phi_nodes_with_iv): Same.
607 (canonicalize_loop_ivs): Same.
608 * tree-parloops.c (struct brli): Removed.
609 (build_reduction_list_info): Removed.
610 (build_new_reduction): New.
611 (analyze_reduction_list): Removed.
612 (gather_scalar_reductions): Find reductions instead of phi
613 nodes that can't be canonicalized.
614 (try_create_reduction_list): Remove reduction_list parameter.
615 (gen_parallel_loop): Same.
616 (parallelize_loops): Remove analyze_reductions variable,
617 initialization and free.
618 Change reduction_list htab initialization to reduction_info
619 elements instead of ssa names.
620 Call try_create_reduction_list and gen_parallel_loop without
621 analyzed_reduction argument.
622 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
623 canonicalize_loop_ivs with one less argument.
624 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
626 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
628 * graphite-dependences.c (new_poly_dr_pair): New.
629 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
630 (new_poly_dr_pair): New.
631 (eq_poly_dr_pair_p): New.
632 (hash_poly_dr_pair_p): New.
633 * graphite-dependences.h (struct poly_dr_pair): New.
634 (eq_poly_dr_pair_p): Declared.
635 (hash_poly_dr_pair_p): Declared.
636 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
637 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
638 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
639 * Makefile.in (graphite-poly.o): Add dependence on
640 graphite-dependences.h.
642 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
644 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
645 polynomials of degree > 1 pass to Graphite.
646 * tree-chrec.c (scev_is_linear_expression): Call
647 evolution_function_is_affine_multivariate_p.
648 * testsuite/gfortran.dg/graphite/id-10.f90: New.
650 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
652 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
653 Instantiate scevs varying in outer loops.
654 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
656 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
658 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
659 redundant constraint.
661 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
663 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
664 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
665 based on the file names as in the C testsuite.
666 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
667 * testsuite/gfortran.dg/graphite/block-2.f: Same.
668 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
669 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
670 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
671 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
672 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
673 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
674 * testsuite/gfortran.dg/graphite/id-6.f: Same.
675 * testsuite/gfortran.dg/graphite/id-9.f: Same.
676 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
677 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
678 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
680 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
682 * sese.c (expand_scalar_variables_call): New.
683 (expand_scalar_variables_ssa_name): Handle calls in expander.
685 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
687 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
688 Expect to see the pattern twice.
689 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
690 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
691 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
693 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
695 * testsuite/gcc.dg/graphite/id-10.c: New.
696 * testsuite/gcc.dg/graphite/id-12.c: New.
697 * testsuite/gfortran.dg/graphite/id-7.f: New.
698 * testsuite/gfortran.dg/graphite/id-8.f: New.
700 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
702 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
705 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
707 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
709 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
711 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
713 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
715 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
716 building PDR subscripts.
718 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
720 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
721 computation of array sizes.
723 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
725 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
727 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
729 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
730 build_pairwise_constraint, dr_equality_constraints,
731 build_pairwise_scheduling_equality,
732 build_pairwise_scheduling_inequality, lexicographically_gt_p,
733 build_lexicographically_gt_constraint, dependence_polyhedron,
734 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
735 Move from NNC_Polyhedron to C_Polyhedron.
736 * graphite-interchange.c (compute_array_size_poly,
737 gather_access_strides): Dito.
738 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
739 free_scop, pbb_number_of_iterations): Dito.
740 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
741 pbb_dim_iter_domain, struct scop): Dito.
742 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
743 new_Cloog_Domain_from_ppl_Polyhedron,
744 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
745 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
746 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
747 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
748 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
749 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
750 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
751 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
752 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
753 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
754 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
755 build_scop_iteration_domain, build_poly_dr): Dito
757 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
759 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
761 * testsuite/gcc.dg/graphite/run-id-1.c: New.
763 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
765 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
766 positivity constraint on the symbolic number of iterations.
768 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
770 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
772 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
773 Tobias Grosser <grosser@fim.uni-passau.de>
775 * graphite-clast-to-gimple.c (build_scop_context): Removed.
776 (build_cloog_prog): Directly use SCOP_CONTEXT.
777 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
778 (free_scop): Free SCOP_CONTEXT.
779 (print_scop_context): New.
780 (print_scop): Call print_scop_context.
781 (debug_scop_context): New.
782 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
783 (struct scop): Added field context.
785 * graphite-sese-to-poly.c (add_param_constraints): New.
786 (build_scop_context): New.
787 (build_poly_scop): Call build_scop_context.
789 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
791 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
792 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
793 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
794 * graphite-ppl.h: Include double-int.h and tree.h.
795 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
796 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
797 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
798 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
800 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
802 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
803 POINTER_PLUS_EXPR for pointer types.
804 (clast_to_gcc_expression): Same.
806 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
808 * graphite-poly.c (print_scattering_function): Early return when
809 PBB_TRANSFORMED_SCATTERING is not initialized.
810 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
812 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
814 * tree-parloops.c (analyze_reduction_list): Remove unused variable
817 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
819 * tree-parloops.c (analyze_reduction_list): Change return
821 (try_create_reduction_list): Move the call to
822 analyze_reduction_list to the beginining.
823 Call reduction_phi with analyzed_reductions as argument
824 instead of reduction_list.
826 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
828 * Merge from mainline (r148296:149346)
830 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
832 * graphite-scop-detection.c (graphite_can_represent_init): New.
833 (graphite_can_represent_scev): Call graphite_can_represent_init:
834 check that the initial value does not contain multiplications of
836 (stmt_has_simple_data_refs_p): New.
837 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
838 (is_simple_operand): Fix formatting.
839 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
841 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
843 * testsuite/gcc.dg/graphite/id-13.c: New.
844 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
845 analyze_scalar_evolution, use scalar_evolution_in_region.
846 (scan_tree_for_params_right_scev): Add extra assert.
847 (parameter_index_in_region_1): Split from parameter_index_in_region.
848 (idx_record_params): Use scalar_evolution_in_region.
849 (find_params_in_bb): Same.
850 (find_scop_parameters): Same.
851 (build_loop_iteration_domains): Same.
852 (create_linear_expr_from_tree): Same.
853 * sese.c (scalar_evolution_in_region): New.
854 * sese.h (scalar_evolution_in_region): Declared.
855 (defined_in_sese_p): New.
856 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
858 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
861 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
863 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
864 TREE_DATA_REF_H also implies SCEV_H.
866 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
868 * graphite-poly.c (print_scop_params): New.
869 (print_scop): Call print_scop_params.
870 (debug_scop_params): New.
871 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
873 2009-07-07 Li Feng <nemokingdom@gmail.com>
875 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
876 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
877 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
878 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
879 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
880 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
882 2009-07-07 Li Feng <nemokingdom@gmail.com>
884 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
885 for dependency checking part.
886 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
887 tests for dependency checking.
888 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
889 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
890 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
891 flag -fdump-tree-graphite-all for autopar testsuites.
893 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
895 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
896 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
897 canonicalize_loop_ivs): Moved...
898 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
900 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
902 * tree-parloops.c (try_create_reduction_list): Pass an extra
903 argument analyzed_reductions. Call analyze_reduction_list.
904 (gen_parallel_loop): Do not call analyze_reduction_list.
905 (parallelize_loops): Init and finalize analyzed_reductions.
907 2009-07-06 Li Feng <nemokingdom@gmail.com>
909 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
910 Added flag -fno-loop-strip-mine for autopar testcase.
912 2009-07-04 Li Feng <nemokingdom@gmail.com>
914 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
915 transformed scattering dimension instead of unmatch orignal when
916 calling dependence_polyhedron.
918 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
920 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
922 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
924 * graphite-poly.c (pbb_number_of_iterations): Check for returned
925 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
927 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
929 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
930 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
931 * graphite-poly.c (pbb_number_of_iterations): New.
932 * graphite-poly.h (pbb_number_of_iterations): Declared.
933 (pbb_iterator_dim, pbb_parameter_dim): New.
935 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
937 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
938 last commit on type of lower and upper bound of loops.
940 2009-06-29 Li Feng <nemokingdom@gmail.com>
942 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
943 graphite-dependences.h.
944 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
945 (mark_bb_with_pbb): New.
946 (get_stmtfor_depth): New.
947 (find_pbb_via_hash): New.
948 (dependency_in_loop_p): New.
949 (mark_loops_parallel): New.
950 (free_aux_in_new_loops): New.
951 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
952 bb with it's relevant pbb. Mark newly created loops. Remove mark
953 innermost loop parallel without checking.
954 (gloog): Add parameter BB_PBB_MAPPING.
955 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
956 (gloog): Change declaration.
957 (mark_loop_parallel): Make extern.
958 (free_aux_in_new_loops): Declare.
959 (bb_pbb_map_hash): New.
960 (eq_bb_pbb_map): New.
961 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
962 auto parallelization when flag_graphite_force_parallel is set.
963 (graphite_finalize): Added free_aux_in_new_loops.
964 * tree-parloops.c (parallelize_loops): Only generate parallel code for
965 the innermost loop that marked parallel. Use
966 flag_graphite_force_parallel instead of loop->can_be_parallel.
967 (loop_parallel_p): Move inner most checking out of function.
969 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
971 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
972 type of lower and upper bound of loops signed long int.
974 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
976 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
977 expression outside the loop.
979 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
981 * gcc.dg/graphite/interchange-8.c: New.
983 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
985 * gcc.dg/graphite/interchange-0.c: XFailed.
986 * gcc.dg/graphite/interchange-5.c: XFailed.
987 * gcc.dg/graphite/interchange-6.c: XFailed.
989 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
991 * graphite-interchange.c (compute_array_size_poly): The end of the
992 recursion should return 1.
994 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
996 * graphite-interchange.c (compute_array_size_cstr): Allow the
997 subscript multiplier to be -1.
998 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
999 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1000 data_container. Initializes PDR_DATA_CONTAINER.
1001 (print_pdr_access_layout): New.
1002 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1003 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1005 (PDR_DATA_CONTAINER): New.
1006 (new_poly_dr): Update declaration.
1007 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1008 (build_poly_dr): Call pdr_add_data_dimensions.
1010 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1012 * graphite-poly.h (struct poly_dr): Fix comment.
1013 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1014 (pdr_add_memory_accesses): New.
1015 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1017 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1019 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1020 (print_pbb): Add call to print_pdrs.
1021 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1023 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1024 Li Feng <nemokingdom@gmail.com>
1026 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1027 (dependency_between_pbbs_p): New.
1028 (lexicographically_gt_p): Assure !empty_p before polyhedron
1029 intersection assign.
1030 (build_lexicographically_gt_constraint): Correct lexicographically
1032 * graphite-dependences.h: New.
1033 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1035 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1037 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1038 (gloog): Print to dump_file the generated clast.
1039 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1040 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1042 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1044 * graphite-poly.c (extend_scattering): Increment
1045 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1047 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1049 * graphite-interchange.c (compute_array_size_poly): Added exit of
1050 recursion condition. Continue iterating even after the first equality.
1051 (compute_array_size): Same.
1053 2009-06-24 Li Feng <nemokingdom@gmail.com>
1055 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1056 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1057 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1058 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1059 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1061 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1063 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1064 only when the use verifies is_gimple_reg.
1066 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1068 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1069 Allocate scaldims after call to unify_scattering_dimensions.
1071 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1073 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1075 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1076 Albert Cohen <albert.cohen@inria.fr>
1078 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1079 variables for the strip mining.
1081 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1082 Pranav Garg <pranav.garg2107@gmail.com>
1084 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1085 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1086 (graphite-blocking.o): New rule.
1087 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1088 * graphite-blocking.c: New.
1089 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1090 flag_loop_strip_mine.
1091 (psct_scattering_dim_for_loop_depth): New.
1092 * graphite-poly.h (scop_do_strip_mine): Declared.
1093 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1094 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1095 flag_loop_strip_mine.
1097 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1099 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1100 a GMP value and a PPL coefficient at each iteration of a loop.
1102 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1104 * graphite-dependences.c (dependence_polyhedron): Do not use
1105 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1106 pbb_nb_scattering_transform.
1107 (graphite_legal_transform_dr): Same.
1108 * graphite-poly.c (extend_scattering): Same.
1109 (unify_scattering_dimensions): Same.
1110 (print_scattering_function): Same.
1111 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1112 PBB_NB_LOCAL_VARIABLES.
1113 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1114 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1115 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1116 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1117 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1118 (pbb_nb_scattering_transform): New.
1119 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1120 (psco_scattering_dim): Add assert on parameters.
1121 (psct_scattering_dim): Same.
1122 (psct_scattering_dim_for_loop_depth): Declared.
1123 (psct_local_var_dim): New.
1124 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1125 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1126 correct layout, call pbb_nb_local_vars.
1127 (psct_add_local_variable, psct_add_scattering_dimension): New.
1128 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1129 Initialize PBB_NB_SCATTERING_TRANSFORM.
1131 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1133 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1134 (set_coef): Renamed ppl_set_coef.
1135 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1137 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1139 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1140 test a boolean against 1.
1141 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1142 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1143 (pbb_do_interchange): Returns true when a transform has been performed.
1144 (scop_do_interchange): Same.
1145 * graphite-poly.c (apply_poly_transforms): Use the return value of
1146 scop_do_interchange.
1147 * graphite-poly.h (scop_do_interchange): Update declaration.
1149 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1151 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1153 * sese.c (sese_reset_aux_in_loops): New.
1154 * sese.h (sese_reset_aux_in_loops): New.
1156 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1158 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1159 multiplier and multiply the constant by the multiplier.
1160 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1161 (build_poly_dr): Do not use the multiplier to define the subscript.
1163 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1165 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1166 compiler's data reference. Initialize PDR_CDR.
1167 (print_pdr): Call dump_data_reference.
1168 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1169 Add compiler_dr field.
1170 (PDR_BB): Renamed PDR_PBB.
1172 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1173 GCC's data reference representation.
1174 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1175 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1177 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1179 * graphite-poly.c (print_scattering_function): Also print the layout.
1180 * graphite-poly.h (pbb_nb_local_vars): New.
1182 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1184 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1186 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1188 * graphite-poly.c (print_pdr, debug_pdr): New.
1189 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1190 (PDR_BASE): Removed.
1192 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1194 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1197 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1199 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1200 subscript identification column.
1201 (pbb_do_interchange): Print to dump_file that some loops "will be
1202 interchanged". Rely on that chain of characters in the testcases.
1203 * gcc.dg/graphite/interchange-0.c: New.
1204 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1205 interchange-*.c files and compile them with -floop-interchange.
1207 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1209 * graphite-interchange.c (interchange_profitable_p): Renamed
1210 pbb_interchange_profitable_p.
1212 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1213 Harsha Jagasia <harsha.jagasia@amd.com>
1214 Pranav Garg <pranav.garg2107@gmail.com>
1216 * graphite-interchange.c (interchange_profitable_p): Make static.
1217 (pbb_interchange_loop_depths, pbb_do_interchange,
1218 scop_do_interchange): New.
1219 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1220 for flag_loop_interchange.
1221 * graphite-poly.h (scop_do_interchange): Declared.
1222 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1223 flag_loop_interchange is used.
1225 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1227 * graphite-dependences.c (dependence_polyhedron): Update use of
1228 pbb_nb_scattering_dims.
1229 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1230 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1231 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1232 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1234 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1236 * graphite.c: Cleanup foo.
1238 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1240 * Merge from mainline (r143684:148293).
1241 * Disabled libpcp until it gets fixed.
1243 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1244 Harsha Jagasia <harsha.jagasia@amd.com>
1246 * graphite-interchange.c: New.
1247 * Makefile.in (graphite-interchange.o): New.
1248 * graphite-poly.h (interchange_profitable_p): Declared.
1249 * graphite-ppl.h (value_max): New.
1251 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1253 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1254 * graphite-poly.h: Fix some comments.
1258 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1261 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1262 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1263 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1264 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1265 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1266 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1267 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1268 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1269 * graphite-clast-to-gimple.c: Same.
1270 * graphite-dependences.c: Same.
1271 * graphite-poly.c: Same.
1272 * graphite-sese-to-poly.c: Same.
1274 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1276 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1277 expressions for an IV rename, as returned by clast_to_gcc_expression.
1278 (copy_renames): Rename new_name to expr.
1279 * sese.c (debug_rename_elt): Same.
1282 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1283 the information from the rename map.
1284 (rename_variables_in_stmt): Same.
1285 (add_loop_exit_phis): Rename new_name to expr.
1286 (insert_loop_close_phis): Same.
1287 (add_guard_exit_phis): Same. Call force_gimple_operand.
1288 * sese.h (struct rename_map_elt): Rename new_name to expr.
1289 (new_rename_map_elt): Same.
1291 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1293 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1294 * sese.c (set_rename): Make it extern.
1295 * sese.h (set_rename): Declared.
1297 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1299 * graphite-poly.c (extend_scattering): Free values.
1300 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1302 (ppl_print_powerset_matrix): Same.
1303 * graphite-scop-detection.c (free_scops_1): New.
1304 (limit_scops): Call free_scops_1.
1305 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1306 (build_poly_dr): Free PPL coefficients.
1307 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1309 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1311 * graphite-dependences.c: New.
1312 * graphite-data-ref.c: Removed.
1313 * graphite-data-ref.h: Removed.
1314 * Makefile.in (graphite-data-ref.o): Removed.
1315 (graphite-dependences.o): Added.
1316 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1317 * graphite-poly.c: Same.
1318 Move the data dependence testing to graphite-dependences.c.
1320 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1322 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1323 from graphite_cannot_represent_loop. Code refactored.
1324 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1326 2009-05-17 Li Feng <nemokingdom@gmail.com>
1328 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1329 Cover all the testcases (not only the filtered ones).
1331 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1333 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1334 unnecessary check. Update comments. Move check for REAL_TYPE here.
1335 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1336 done in (stmt_simple_for_scop_p).
1338 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1340 * graphite.c (print_global_statistics): New.
1341 (print_graphite_scop_statistic): New.
1342 (print_graphite_statistics): New.
1343 (graphite_initialize, graphite_transform_loops): Print statistics.
1344 * graphite-scop-detection (build_scops): Print statistics.
1345 (print_graphite_scop_statistics): New.
1346 (print_graphite_statistics): New.
1348 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1350 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1351 (debug_clast_name_index): Removed.
1352 (debug_clast_name_indexes_1): Removed.
1353 (debug_clast_name_indexes): Removed.
1354 (clast_name_index_elt_info): Removed.
1355 (eq_clast_name_indexes): Removed.
1356 (clast_name_to_index): Removed.
1357 (new_clast_name_index): Removed.
1358 (save_clast_name_index): Removed.
1359 (save_var_name): Moved...
1360 (init_sese_params_index): Removed.
1361 (clast_name_to_gcc): Remove use of name_tree.
1362 (initialize_cloog_names): Same.
1363 (gloog): Do not call init_sese_params_index.
1364 * graphite-sese-to-poly.c (save_var_name): ...here.
1365 (parameter_index_in_region): New.
1366 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1367 (parameter_index_in_region): Removed.
1368 (is_parameter): Remove use of name_tree.
1369 * sese.h (struct name_tree): Removed.
1370 (struct sese): Remove use of name_tree. New field params_names.
1371 (SESE_PARAMS_NAMES): New.
1372 (SESE_PARAMS): Remove duplicate.
1373 (parameter_index_in_region): Removed.
1374 (sese_nb_params): Remove use of name_tree.
1375 (struct clast_name_index): New.
1376 (new_clast_name_index): New.
1377 (clast_name_to_index): New.
1378 (save_clast_name_index): New.
1379 (debug_clast_name_index): New.
1380 (debug_clast_name_indexes_1): New.
1381 (debug_clast_name_indexes): New.
1382 (clast_name_index_elt_info): New.
1383 (eq_clast_name_indexes): New.
1385 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1387 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1388 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1389 (graphite_loop_normal_form): Do not pass region. Do not
1390 initialize SESE_OLDIVS.
1391 (build_graphite_loop_normal_form): Update call to
1392 graphite_loop_normal_form.
1393 * sese.c (debug_oldivs): Removed.
1394 (new_sese): Do not initialize SESE_OLDIVS.
1395 (free_sese): Do not free SESE_OLDIVS.
1396 (oldiv_for_loop): Removed.
1397 * sese.h (struct sese): Remove old_ivs.
1398 (SESE_OLDIVS): Removed.
1399 (oldiv_for_loop): Removed.
1401 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1403 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1404 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1405 replaced by a call to newivs_to_depth_to_newiv.
1406 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1407 (clast_to_gcc_expression_red): Same.
1408 (gcc_type_for_clast_expr): Same.
1409 (gcc_type_for_clast_eq): Same.
1410 (graphite_translate_clast_equation): Same.
1411 (graphite_create_guard_cond_expr): Same.
1412 (graphite_create_new_guard): Same.
1413 (graphite_create_new_loop): Same.
1414 (build_iv_mapping): Same.
1415 (translate_clast): Same.
1417 (loop_iv_stack_patch_for_consts): Removed. *
1418 sese.c (iv_stack_entry_is_constant): Removed.
1419 (iv_stack_entry_is_iv): Removed.
1420 (loop_iv_stack_push_iv): Removed.
1421 (loop_iv_stack_insert_constant): Removed.
1422 (loop_iv_stack_pop): Removed.
1423 (loop_iv_stack_get_iv): Removed.
1424 (loop_iv_stack_get_iv_from_name): Removed.
1425 (debug_loop_iv_stack): Removed.
1426 (free_loop_iv_stack): Removed.
1427 (loop_iv_stack_remove_constants): Removed. *
1428 sese.h (iv_stack_entry_kind): Removed.
1429 (iv_stack_entry_data_union): Removed.
1430 (iv_stack_entry_struct): Removed.
1431 (iv_stack_entry_p): Removed.
1432 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1433 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1434 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1435 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1436 (gbb_loop_at_index): Fix indenting.
1437 (gbb_loop_index): Removed.
1439 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1441 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1442 Call clast_name_to_index.
1444 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1446 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1447 do not pass params. Get params from SESE_PARAMS.
1448 (clast_to_gcc_expression): Same.
1449 (clast_to_gcc_expression_red): Same.
1450 (gcc_type_for_clast_eq): Same.
1451 (graphite_translate_clast_equation): Same.
1452 (graphite_create_new_loop): Same.
1453 * sese.c (rename_variables_in_stmt): Fix comment.
1455 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1457 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1459 Call save_clast_name_index.
1460 (translate_clast): Pass newivs_index.
1461 (gloog): Create and free newivs_index.
1463 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1465 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1466 (clast_name_index_p): New type.
1467 (debug_clast_name_index): New.
1468 (debug_clast_name_indexes_1): New.
1469 (debug_clast_name_indexes): New.
1470 (clast_name_index_elt_info): New.
1471 (eq_clast_name_indexes): New.
1472 (clast_name_to_index): New.
1473 (new_clast_name_index): New.
1474 (save_clast_name_index): New.
1475 (init_sese_params_index): New.
1476 (gloog): Call init_sese_params_index.
1477 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1478 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1479 (free_sese): Free SESE_PARAMS_INDEX.
1480 * sese.h (struct sese): Add params_index.
1481 (SESE_PARAMS_INDEX): New.
1483 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1485 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1486 (graphite_create_new_loop): Pass the newivs vector. Push the
1487 newly created IV to newivs.
1488 (translate_clast): Pass the newivs vector.
1489 (gloog): Create and destroy the newivs vector.
1491 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1493 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1494 (graphite_loop_normal_form): Initialize loop->aux with the unique
1495 IV that has been created.
1497 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1499 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1500 scev with parameters in the base part. They where forbidden
1503 2009-05-11 Li Feng <nemokingdom@gmail.com>
1505 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1506 compile options by file names.
1507 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1508 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1509 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1510 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1512 2009-05-08 Li Feng <nemokingdom@gmail.com>
1514 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1515 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1516 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1517 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1519 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1521 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1524 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1526 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1527 allow integer constant strides.
1528 (graphite_can_represent_expr): Depend on outermost_loop.
1529 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1530 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1531 build_scops_1): Same.
1532 (scopdet_basic_block_info): Same and insert layered SCoP
1534 (try_generate_gimple_bb): Cleanup.
1535 (build_scops): Enable data references.
1537 * testsuite/gcc.dg/graphite/id-5.c: New.
1538 * testsuite/gcc.dg/graphite/id-9.c: New.
1539 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1540 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1542 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1544 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1545 that we have not yet built for this SCoP.
1547 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1549 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1550 for complex numbers.
1552 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1554 * graphite-ppl.c: Fix build if cloog is not available.
1556 2009-05-04 Li Feng <nemokingdom@gmail.com>
1558 * tree-parloops.c (loop_parallel_p): Remove construction of
1559 NITER and REDUCTION_LIST.
1560 (try_get_loop_niter): New.
1561 (try_create_reduction_list): New.
1562 (parallelize_loops): Bypass the failed checkings in autopar
1563 when can_be_parallel in loop structure is set to true.
1565 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1567 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1568 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1570 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1572 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1573 Enable EQ_EXPR and NE_EXPR again.
1575 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1577 * graphite-scop-detection.c (graphite_can_represent_scev):
1578 Add check if scev is affine multivariate.
1579 (harmful_stmt_in_bb): Check if we can represent the conditions.
1580 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1582 * testsuite/gcc.dg/graphite/id-7.c: New.
1584 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1586 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1587 Check all bbs in region, not only the bbs that are represented in
1589 (build_poly_scop): Add newline.
1590 * testsuite/gcc.dg/graphite/id-8.c: New.
1592 2009-04-30 Li Feng <nemokingdom@gmail.com>
1594 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1595 when loop initialize.
1596 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1597 * common.opt: Declare flag_graphite_force_parallel.
1598 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1600 * graphite-poly.c (apply_poly_transforms): Introduce
1601 flag_graphite_force_parallel.
1602 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1603 * toplev.c (process_options): ditto and replace a not correctly
1606 2009-04-30 Li Feng <nemokingdom@gmail.com>
1608 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1609 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1610 to the redefinition.
1611 (compute_cloog_iv_types_1): ditto.
1612 (build_iv_mapping): ditto.
1613 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1615 (free_gimple_bb): Removed GBB_LOOPS related free part.
1616 (build_bb_loops): Removed.
1617 * sese.h (struct gimple_bb): Removed loops.
1618 (GBB_LOOPS): Removed.
1619 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1620 (gbb_loop_index): ditto.
1622 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1624 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1625 allow non constant strides.
1626 * testsuite/gcc.dg/graphite/scop-20.c: New.
1628 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1630 * graphite-scop-detection.c (dot_all_scops): Fix system call
1631 return value warning.
1634 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1636 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1637 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1639 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1641 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1642 build_pairwise_constraint, dr_equality_constraints,
1643 build_pairwise_scheduling_equality,
1644 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1645 build_lexicographically_gt_constraint, dependence_polyhedron,
1646 graphite_legal_transform_dr, graphite_legal_transform_bb,
1647 graphite_legal_transform): New.
1648 * graphite-poly.h (graphite_legal_transform): Declared.
1649 * graphite-sese-to-poly.c (build_poly_scop): Call to
1650 graphite_legal_transform is disabled for the moment.
1652 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1654 * graphite-poly.h (pbb_nb_scattering_dims): New.
1655 (pbb_nb_scattering): Use it.
1657 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1659 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1660 Pointset_Powerset version of ppl_insert_dimensions.
1661 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1663 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1665 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1667 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1669 * graphite-poly.h: Fix comment.
1671 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1673 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1675 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1677 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1680 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1682 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1683 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1686 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1688 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1689 handle EQ_EXPR and NE_EXPR.
1691 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1693 * graphite-poly.h (poly_dr): Fix comment.
1695 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1696 Tobias Grosser <grosser@fim.uni-passau.de>
1698 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1699 with a zero dimension polyhedron.
1700 (find_scop_parameters): Move the call to scop_set_nb_params here.
1701 (build_loop_iteration_domains): Store in loop->aux the iteration
1703 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1704 by any loop in scop.
1705 (build_poly_scop): Do not call scop_set_nb_params.
1707 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1708 Tobias Grosser <grosser@fim.uni-passau.de>
1710 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1711 add_condition_to_domain not GT_EXPR.
1713 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1715 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1716 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1717 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1718 upper_bound_assign to calculate unions.
1719 * testsuite/gcc.dg/graphite/id-6.c: New.
1721 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1723 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1724 handle abnormal edges.
1726 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1728 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1729 (free_poly_bb): Also free poly_drs.
1730 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1731 (poly_dr): Polyhedron to Pointset_Powerset.
1732 (pdr_accessp_nb_subscripts): Same.
1733 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1736 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1738 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1739 names into more meaningful names.
1741 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1743 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1744 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1746 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1748 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1750 * tree-parloops.c (rewrite_phi_with_iv): New.
1751 (rewrite_all_phi_nodes_with_iv): New.
1752 (canonicalize_loop_ivs): Call them.
1754 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1756 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1757 graphite_find_data_references_in_stmt.
1758 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1759 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1761 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1763 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1765 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1767 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1768 instead of bb_in_region.
1769 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1770 (build_sese_conditions): Use flag_bb_in_sese.
1771 * sese.c (register_bb_in_sese): Removed.
1772 (new_sese): Remove initialization of SESE_REGION_BBS.
1773 (free_sese): Do not free SESE_REGION_BBS.
1774 * sese.h (struct sese): Remove field region_basic_blocks.
1775 (SESE_REGION_BBS): Removed.
1776 (bb_in_sese_p): Implement in function of bb_in_region.
1778 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1780 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1783 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1785 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1787 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1788 (add_condition_to_domain): New.
1789 (add_condition_to_pbb): New.
1790 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1791 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1793 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1795 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1796 ppl_Pointset_Powerset.
1797 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1798 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1799 (pbb_nb_loops): Same.
1800 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1801 add_conditions_to_domain): Same.
1802 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1803 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1804 ppl_const_Polyhedron_t.
1805 (ppl_print_powerset_matrix): New.
1806 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1807 ppl_print_powerset_matrix): New.
1808 (ppl_print_polyhedron_matrix): Updated.
1810 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1812 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1814 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1816 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1817 (print_iteration_domains, debug_iteration_domain,
1818 debug_iteration_domains): New.
1819 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1820 debug_iteration_domains): Declared.
1821 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1824 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1825 Sebastian Pop <sebastian.pop@amd.com>
1827 * graphite-poly.h (print_iteration_domain): New.
1828 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1829 (build_sese_conditions_1, build_sese_conditions_after,
1830 build_sese_conditions_before): New.
1831 (build_sese_conditions): Rewritten.
1833 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1834 Tobias Grosser <grosser@fim.uni-passau.de>
1836 Cleanup of code generation liveouts.
1837 * graphite-clast-to-gimple.c (translate_clast): Use a single
1838 rename_map instead of one per translated statement.
1839 Do not use SESE_LIVEOUT_RENAMES.
1840 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1841 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1842 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1843 phi node of a reduction: when a loop contains a reduction used outside
1844 the loop, there should be a scalar close phi node on the exit block.
1845 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1846 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1847 (free_sese): Do not free them.
1848 (sese_build_liveouts_use): Do not use them.
1849 (sese_build_liveouts_bb): Same.
1850 (sese_build_liveouts): Same.
1851 (sese_insert_phis_for_liveouts): Same.
1852 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1853 (defined_in_loop_p): New.
1854 (alive_after_loop): New.
1855 (close_phi_not_yet_inserted_p): New.
1856 (struct alep, alep_p): New.
1857 (add_loop_exit_phis): Remove from the rename_map all the names defined
1858 in the code generated loop.
1859 (insert_loop_close_phis): Traverse the rename_map passed to it.
1860 Don't use SESE_LIVEOUT_RENAMES.
1861 (default_liveout_before_guard): Renamed default_before_guard.
1862 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1863 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1864 (register_sese_liveout_renames): Removed.
1865 (copy_bb_and_scalar_dependences): Do not call it.
1866 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1868 (SESE_LIVEOUT): Removed.
1869 (SESE_LIVEOUT_RENAMES): Removed.
1870 (SESE_REDUCTION_LIST): Removed.
1871 (sese_build_liveouts): Removed.
1872 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1873 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1874 (insert_guard_phis): Same.
1875 (rename_map_elt): Declare a VEC of them.
1876 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1877 trees not pointers to trees.
1879 Rewrite in canonical close SSA form:
1880 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1881 (limit_scops): Close the scop after the block containing the close phi
1883 (canonicalize_loop_closed_ssa): New.
1884 (canonicalize_loop_closed_ssa_form): New.
1885 (build_scops): Call canonicalize_loop_closed_ssa_form.
1887 * graphite-sese-to-poly.c: Fix typos.
1889 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1891 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1893 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1894 (print_pbb): Add conditions.
1896 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1897 Sebastian Pop <sebastian.pop@amd.com>
1899 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1900 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1901 (build_scop_bbs_1): New.
1902 (build_scop_bbs): Rewrite.
1903 * sese.h (bb_in_region): New.
1905 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1907 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1909 (print_scop): Style.
1910 * graphite-poly.h (poly_bb): Add drs vector.
1911 (PBB_DRS): Add accessor.
1912 * graphite-sese-to-poly.c (build_poly_dr): New.
1913 (build_pbb_drs, build_scop_drs): New.
1914 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1916 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1918 * tree-ssa-loop.c: Include forgotten toplev.h
1920 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1922 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1923 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1924 * testsuite/gcc.dg/graphite/pr37928.c: Same
1925 * testsuite/gcc.dg/graphite/pr38409.c: Same
1926 * testsuite/gcc.dg/graphite/pr38498.c: Same
1927 * testsuite/gcc.dg/graphite/pr38559.c: Same
1928 * testsuite/gcc.dg/graphite/pr39335.c: Same
1929 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1930 * testsuite/gfortran.dg/graphite/block-2.f: Same
1931 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1934 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1936 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1937 build_access_matrix, build_scop_data_accesses): Remove access function
1938 building. (We get a new version soon).
1939 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1940 * sese.h (nb_loops_around_loop_in_sese): Remove.
1941 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1943 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1944 Sebastian Pop <sebastian.pop@amd.com>
1946 * graphite-scop-detection.c (struct scopdet_info): Rename last
1948 (scopdet_basic_block_info, build_scops_1): Don't use
1949 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1951 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1952 Sebastian Pop <sebastian.pop@amd.com>
1954 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1955 * sese.c (sese_build_liveouts_use): Renamed from
1956 sese_build_livein_liveouts_use. Remove liveins.
1957 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1958 Call sese_build_liveouts_use.
1959 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1960 Call sese_build_liveouts_bb.
1961 (new_sese, free_sese): Remove liveins.
1962 (sese_add_exit_phis_var): Deleted.
1963 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1965 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1967 * sese.h (sese): Remove num_ver and livein.
1968 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1970 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1972 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1974 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1976 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1977 (build_scop_scattering): Do not use compare_prefix_loops any more.
1978 (nb_common_loops): New.
1980 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1982 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1983 (register_old_and_new_names): Renamed set_rename.
1985 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1987 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1988 of the decl from the previous commit.
1990 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1992 * graphite-scop-detection.c (dot_scop): New.
1993 * graphite-scop-detection.h (dot_scop): Declared.
1995 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1997 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1999 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2001 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2002 condition at the end of the loop.
2003 * graphite.c (graphite_initialize, graphite_finalize): Print to
2004 dump_file the compiled function.
2005 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2006 of create_empty_loop_on_edge.
2007 (translate_clast): Update the code generation of loops for the new
2009 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2011 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2013 Reverted the patch from 2009-03-19.
2015 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2017 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2019 (print_scop): Style.
2020 * graphite-poly.h (poly_bb): Add drs vector.
2021 (PBB_DRS): Add accessor.
2022 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2023 (build_access_matrix_with_af, build_access_matrix,
2024 build_scop_data_accesses): Delete.
2025 (build_poly_dr): New.
2026 (build_pbb_drs, build_scop_drs): New.
2027 (build_poly_scop): call build_scop_drs.
2029 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2031 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2032 once per basic block.
2034 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2036 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2037 (graphite_can_represent_expr): Renamed from loop_affine_expr
2039 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2040 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2041 (scopdet_basic_block_info): Actually define entry_block.
2042 (stmt_simple_memref_p): Moved here from ...
2044 * tree-data-ref.c (stmt_simple_memref_p): here.
2045 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2047 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2049 * testsuite/gcc.dg/graphite/id-4.c: New.
2051 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2053 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2054 (register_old_and_new_names): Update the content of the map.
2055 When there was already a rename_map_elt in the map at that
2057 (copy_bb_and_scalar_dependences): Do rename_variables after
2058 expand_scalar_variables.
2059 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2060 of the map. When there was already a rename_map_elt in the
2061 map at that location, free it.
2062 (translate_clast): Pass the rename_map. Do not initialize and free
2063 a rename_map per stmt_user.
2064 (gloog): Initialize and free one rename_map and pass it to
2067 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2069 * sese.c (expand_scalar_variables_stmt,
2070 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2072 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2073 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2074 the gimple_stmt_iterator of the statement to be expanded.
2075 * graphite-scop-detection.c (is_simple_operand): Do handle
2078 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2080 * graphite-scop-detection.c (is_simple_operand): Do not handle
2082 * testsuite/gcc.dg/graphite/id-2.c: New.
2084 * graphite-sese-to-poly.c (build_bb_loops,
2085 add_value_to_dim, scan_tree_for_params_right_scev,
2086 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2087 find_params_in_bb, build_loop_iteration_domains,
2088 add_conditions_to_domain): Remove subtract.
2090 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2092 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2093 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2094 pbb_loop_at_index -> gbb_loop_at_index.
2095 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2096 (debug_loop_vec): Delete.
2097 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2098 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2099 (PBB_LOOPS): Removed.
2100 (PBB_BLACK_BOX): Insert cast.
2101 (pbb_set_black_box): New setter.
2102 (pbb_loop_at_index, pbb_loop_index): Removed.
2103 (scop_set_region, scop_set_nb_params): New.
2104 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2105 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2106 (build_poly_scop): Use scop_set_nb_params.
2107 * sese.h (gimple_bb): Add LOOPS.
2108 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2110 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2112 Revert previous commit.
2114 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2116 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2117 (register_old_and_new_names): Update the content of the map.
2118 When there was already a rename_map_elt in the map at that
2120 (copy_bb_and_scalar_dependences): Do rename_variables after
2121 expand_scalar_variables.
2122 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2123 of the map. When there was already a rename_map_elt in the
2124 map at that location, free it.
2125 (translate_clast): Pass the rename_map. Do not initialize and free
2126 a rename_map per stmt_user.
2127 (gloog): Initialize and free one rename_map and pass it to
2130 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2132 Remove forgotten line in revert.
2134 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2136 Revert previous commit.
2138 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2140 * sese.c (register_old_and_new_names): Update the content
2141 of the map. When there was already a rename_map_elt in the
2142 map at that location, free it.
2143 (copy_bb_and_scalar_dependences): Do rename_variables after
2144 expand_scalar_variables.
2145 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2146 of the map. When there was already a rename_map_elt in the
2147 map at that location, free it.
2148 (translate_clast): Pass the rename_map. Do not initialize and free
2149 a rename_map per stmt_user.
2150 (gloog): Initialize and free one rename_map and pass it to
2153 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2155 * graphite-clast-to-gimple.c (translate_clast): context_loop
2158 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2159 Sebastian Pop <sebastian.pop@amd.com>
2161 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2162 of the use of ppl_Polyhedron_map_space_dimensions.
2164 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2165 Sebastian Pop <sebastian.pop@amd.com>
2167 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2168 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2169 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2170 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2171 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2172 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2173 pbb_nb_params): New.
2174 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2175 nb_loops_around_pbb): Adapt return types.
2177 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2179 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2180 graphite-clast-to-gimple.o, graphite-data-ref.o,
2181 graphite-scop-detection.o, graphite-poly.o): Add
2184 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2186 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2187 graphite-clast-to-gimple.o, graphite-data-ref.o,
2188 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2190 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2192 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2193 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2194 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2195 * testsuite/gcc.dg/graphite/block-0.c: Same.
2196 * testsuite/gcc.dg/graphite/block-1.c: Same.
2197 * testsuite/gcc.dg/graphite/block-2.c: Same.
2198 * testsuite/gcc.dg/graphite/block-3.c: Same.
2199 * testsuite/gcc.dg/graphite/block-4.c: Same.
2200 * testsuite/gcc.dg/graphite/block-5.c: Same.
2201 * testsuite/gcc.dg/graphite/block-6.c: Same.
2202 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2203 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2204 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2205 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2206 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2207 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2208 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2209 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2210 * opts.c: Remove -floop-block from -O2.
2211 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2212 -floop-strip-mine are used.
2214 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2215 Sebastian Pop <sebastian.pop@amd.com>
2217 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2219 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2220 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2221 strip_mine_profitable_p, is_interchange_valid,
2222 graphite_trans_bb_block, graphite_trans_loop_block,
2223 graphite_trans_scop_block): Temporary removed.
2224 (extend_scattering, unify_scattering_dimensions): New.
2225 (print_scattering_function, graphite_read_transforms):
2226 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2227 (graphite_generate_scattering_fns): Removed.
2228 (apply_poly_transforms): Cleanup.
2229 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2230 (schedule_to_scattering): Moved.
2231 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2232 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2233 (pbb_nb_scattering): New.
2234 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2235 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2237 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2239 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2240 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2241 -> PBB_TRANSFORMED_SCATTERING.
2242 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2243 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2244 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2245 (check_poly_representation): Do not return bool.
2246 (graphite_transform_loops): Reformat.
2247 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2249 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2251 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2252 debug_pbb_domain, debug_pbb, debug_scop): New.
2253 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2254 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2256 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2259 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2260 when the type precision of the induction variable should be
2261 larger than the type precision of nit.
2262 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2263 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2264 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2266 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2267 * testsuite/gcc.dg/graphite/pr39335.c: New.
2269 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2271 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2272 SSA_NAMES not struct reduction_info.
2274 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2276 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2278 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2279 Tobias Grosser <grosser@fim.uni-passau.de>
2281 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2282 (free_sese): Free SESE_REDUCTION_LIST.
2283 * sese.h (struct sese): Add field reduction_list.
2284 (SESE_REDUCTION_LIST): New.
2285 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2286 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2288 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2289 Tobias Grosser <grosser@fim.uni-passau.de>
2291 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2294 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2295 Tobias Grosser <grosser@fim.uni-passau.de>
2297 * tree-parloops.c (struct brli, build_reduction_list_info,
2298 analyze_reduction_list, gather_scalar_reductions): New.
2299 (loop_parallel_p): Build a reduction list containing only
2300 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2301 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2302 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2303 * tree-flow.h (gather_scalar_reductions): Declared.
2305 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2308 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2309 number_of_iterations_exit from a gcc_assert.
2311 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2312 Jan Sjodin <jan.sjodin@amd.com>
2314 * output.h (graphite_out_file, graphite_in_file): Declared.
2315 * toplev.c (graphite_out_file, graphite_in_file): New.
2316 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2317 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2318 Don't call schedule_to_scattering.
2319 * common.opt (fgraphite-write, fgraphite-read): New.
2320 * graphite-poly.c: Include output.h.
2321 (print_scattering_function, print_scattering_functions,
2322 debug_scattering_function, debug_scattering_functions,
2323 graphite_write_transforms, graphite_read_transforms,
2324 graphite_generate_scattering_fns): New.
2325 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2326 Call graphite_generate_scattering_fns, graphite_write_transforms,
2327 graphite_read_transforms.
2328 (new_poly_bb): Initialize PBB_SCATTERING.
2329 (free_poly_bb): Free PBB_SCATTERING.
2330 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2331 * graphite-poly.h (struct poly_bb): Add field scattering.
2332 (PBB_SCATTERING): New.
2333 (print_scattering_function, print_scattering_functions,
2334 debug_scattering_function, debug_scattering_functions): Declared.
2335 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2336 GMP values, not integers!
2337 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2338 ppl_read_polyhedron_matrix): New.
2339 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2340 debug_ppl_polyhedron_matrix,
2341 ppl_read_polyhedron_matrix): Declared.
2342 * Makefile.in (graphite-poly.o): Depends on output.h.
2344 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2345 Tobias Grosser <grosser@fim.uni-passau.de>
2348 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2349 scalar evolutions in the scop_entry->loop_father.
2351 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2352 Tobias Grosser <grosser@fim.uni-passau.de>
2354 * graphite.h (ref_nb_loops): Remove declaration.
2355 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2356 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2357 debug_gbb): Moved to sese.h.
2360 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2361 Tobias Grosser <grosser@fim.uni-passau.de>
2363 * graphite-data-ref.[ch]: Disable.
2365 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2366 Tobias Grosser <grosser@fim.uni-passau.de>
2368 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2369 scalar evolutions in the scop_entry->loop_father.
2371 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2373 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2374 (graphite_cannot_represent_loop_niter): Renamed
2375 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2376 (limit_scops): build_sese_loop_nests does not return a bool.
2377 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2378 * sese.c (nb_reductions_in_loop): ... from here.
2379 (graphite_loop_normal_form): ... from here.
2380 (sese_record_loop): Does not fail, so does not return a bool.
2381 (build_sese_loop_nests): Same.
2382 * sese.h (build_sese_loop_nests): Update declaration.
2383 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2384 (build_graphite_loop_normal_form): New.
2385 (gloog): Call build_graphite_loop_normal_form.
2386 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2387 build_sese_loop_nests.
2389 * testsuite/gcc.dg/graphite/id-1.c: New.
2391 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2392 Tobias Grosser <grosser@fim.uni-passau.de>
2394 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2395 The SCoP detection fix is sufficient.
2397 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2399 PR tree-optimization/39260
2400 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2401 the basic block contains a condition with a real type.
2402 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2404 * gcc.dg/graphite/pr39260.c: New.
2406 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2408 * graphite-poly.c: Inlcude params.h.
2409 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2411 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2412 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2414 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2415 Tobias Grosser <grosser@fim.uni-passau.de>
2417 * graphite-scop-detection.c (dot_all_scops_1,
2418 dot_all_scops): Moved here.
2419 * graphite-scop-detection.h (dot_all_scops): Declared here.
2420 * graphite.c (graphite_initialize, graphite_finalize): New.
2421 (graphite_transform_loops): Cleaned up.
2422 * sese.c (debug_oldivs): Moved here.
2423 * graphite-poly.c (graphite_apply_transformations): Renamed
2424 apply_poly_transforms.
2425 (debug_loop_vec): Moved here.
2426 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2427 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2428 find_scop_parameters, build_scop_iteration_domain,
2429 add_conditions_to_constraints, build_scop_canonical_schedules,
2430 build_scop_data_accesses): Now static.
2431 (build_poly_scop, check_poly_representation): New.
2433 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2435 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2436 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2437 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2438 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2439 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2440 scan_tree_for_params, struct irp_data, dx_record_params,
2441 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2442 build_loop_iteration_domains, add_conditions_to_domain,
2443 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2444 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2445 build_sese_conditions, add_conditions_to_constraints,
2446 build_scop_iteration_domain, build_access_matrix_with_af,
2447 build_access_matrix,
2448 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2450 * graphite-sese-to-poly.c: New.
2451 * graphite-sese-to-poly.h: New.
2453 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2455 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2457 * graphite.c: Split graphite code generation to a new file.
2458 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2459 max_precision_type, clast_to_gcc_expression_red,
2460 clast_to_gcc_expression, gcc_type_for_clast_expr,
2461 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2462 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2463 graphite_create_new_guard, clast_get_body_of_loop,
2464 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2465 graphite_create_new_loop, build_iv_mapping, copy_renames,
2466 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2467 compute_cloog_iv_types, free_scattering, save_var_name,
2468 initialize_cloog_names, build_scop_context, build_cloog_prog,
2469 set_cloog_options, debug_clast_stmt, scop_to_clast,
2470 print_generated_program, debug_generated_program,
2471 gloog): Moved to graphite-clast-to-gimple.c.
2473 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2475 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2476 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2477 loop_iv_stack_pop, loop_iv_stack_get_iv,
2478 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2479 free_loop_iv_stack, loop_iv_stack_remove_constants,
2480 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2481 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2482 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2483 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2484 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2485 get_vdef_before_sese, sese_adjust_vphi,
2486 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2487 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2488 is_iv, expand_scalar_variables_ssa_name,
2489 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2490 expand_scalar_variables, rename_variables, remove_condition,
2491 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2492 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2493 default_liveout_before_guard, add_guard_exit_phis,
2494 insert_guard_phis, register_old_and_new_names,
2495 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2496 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2497 if_region_set_false_region, create_if_region_on_edge,
2498 move_sese_in_condition): Moved to sese.c.
2500 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2501 if_region_exit, if_region_get_condition_block,
2502 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2503 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2504 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2505 ivtype_map_elt, new_ivtype_map_elt,
2506 recompute_all_dominators): Moved to sese.h.
2508 * graphite-clast-to-gimple.c: New.
2509 * graphite-clast-to-gimple.h: New.
2510 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2511 * sese.c: Modified as said above.
2514 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2516 * graphite.c: Split scop detection to a new file.
2517 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2518 move_sd_regions, loop_affine_expr, exclude_component_ref,
2519 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2520 graphite_cannot_represent_loop_niter, struct scopdet_info,
2521 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2522 find_single_entry_edge, find_single_exit_edge,
2523 create_single_entry_edge, sd_region_without_exit,
2524 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2525 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2526 Moved to graphite-scop-detection.c.
2528 * graphite-scop-detection.c: New.
2529 * graphite-scop-detection.h: New.
2530 * Makefile.in: Add new rule for graphite-scop-detection.o.
2532 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2533 tree-scalar-evolution.h.
2534 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2535 build_sese_loop_nests): Moved here from graphite.c.
2536 (param_index): Renamed parameter_index_in_region.
2538 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2539 Sebastian Pop <sebastian.pop@amd.com>
2541 * gcc.dg/graphite/block-0.c: Expected to fail now.
2542 * gcc.dg/graphite/block-1.c: Same.
2543 * gcc.dg/graphite/block-5.c: Same.
2544 * gcc.dg/graphite/block-6.c: Same.
2546 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2547 Sebastian Pop <sebastian.pop@amd.com>
2549 * graphite.h: Separate from graphite_bb_p the polyhedral
2550 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2551 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2552 graphite-data-ref.h.
2553 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2554 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2555 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2556 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2557 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2558 scop_nb_params): Moved to graphite-poly.h.
2559 * graphite-data-ref.c: Same.
2560 * graphite-data-ref.h: New.
2562 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2563 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2564 is_interchange_valid, graphite_trans_bb_block,
2565 graphite_trans_loop_block, scop_max_loop_depth,
2566 graphite_trans_scop_block, graphite_apply_transformations,
2567 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2569 * graphite-poly.h: New.
2570 * graphite-poly.c: New.
2571 * Makefile.in (OBJS-common): Add graphite-poly.o.
2572 (graphite-poly.o): New rule.
2573 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2576 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2577 Tobias Grosser <grosser@fim.uni-passau.de>
2579 * graphite.c: Replace gb -> gbb.
2581 * graphite-data-ref.c: Same.
2583 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2584 Tobias Grosser <grosser@fim.uni-passau.de>
2586 * Makefile.in (OBJS-commmon): Add sese.o.
2588 (graphite.o): Add sese.h.
2589 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2590 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2591 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2593 (block_before_scop): Add missing return.
2594 (new_scop, free_scop): Remove SESE data structures.
2595 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2596 find_scop_parameters, build_loop_iteration_domains,
2597 add_conditions_to_domain, register_scop_liveout_renames,
2598 copy_bb_and_scalar_dependences): Scop -> SESE.
2600 (add_conditions_to_domain): SCoP -> SESE and remove check
2601 (scop_contains_non_iv_scalar_phi_nodes): New.
2602 (build_scop_conditions_1, build_scop_conditions): Remove check for
2603 non iv scalar phi nodes.
2604 (print_scop_statistics): New.
2605 (graphite_transform_loops): Cleanup.
2607 * graphite.h: Move to sese & cleanup.
2611 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2612 Tobias Grosser <grosser@fim.uni-passau.de>
2614 * graphite.c (build_scop_conditions_1): Conditions are only
2615 at the end of a basic block.
2617 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2618 Tobias Grosser <grosser@fim.uni-passau>
2620 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2622 (GBB_ALPHA): Removed.
2624 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2625 Tobias Grosser <grosser@fim.uni-passau.de>
2627 * graphite-data-ref.c (graphite_test_dependence): Don't use
2628 GBB_DYNAMIC_SCHEDULE.
2629 * graphite.c (new_graphite_bb): Same.
2630 (free_graphite_bb): Same.
2631 (build_scop_dynamic_schedules): Removed.
2632 (graphite_transform_loops): Don't call it.
2633 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2634 (GBB_DYNAMIC_SCHEDULE): Removed.
2636 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2637 Tobias Grosser <grosser@fim.uni-passau.de>
2639 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2640 (print_graphite_bb): Same.
2641 (build_cloog_prog): Same.
2643 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2644 Tobias Grosser <grosser@fim.uni-passau.de>
2646 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2648 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2649 Tobias Grosser <grosser@fim.uni-passau.de>
2651 * graphite.c (build_scop_context): Don't use CloogMatrix.
2652 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2653 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2655 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2656 Tobias Grosser <grosser@fim.uni-passau.de>
2658 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2659 liveout_renames, add_params fields...
2660 (struct sese): ... here.
2661 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2662 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2664 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2665 Tobias Grosser <grosser@fim.uni-passau.de>
2667 * graphite.c (print_scop): Do not print the CLooG program.
2668 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2669 build_cloog_prog, gloog): Don't use SCOP_PROG.
2670 (find_transform): Renamed scop_to_clast.
2671 (print_generated_program, debug_generated_program): New.
2672 (graphite_transform_loops): Adapt to new interface.
2673 * graphite.h (struct scop): Remove program field.
2674 (SCOP_PROG): Removed.
2675 (print_generated_program, debug_generated_program): Declared.
2677 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2679 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2680 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2681 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2682 free_graphite_bb, build_scop_canonical_schedules,
2683 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2684 schedules are now represented using a ppl_Linear_Expression_t.
2685 * graphite.h (struct graphite_bb): Same.
2686 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2687 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2689 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2691 * graphite.c: Free local memory.
2692 * graphite-ppl.c: Same.
2694 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2696 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2697 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2698 swap_constraint_variables, scale_constraint_variable): Removed.
2699 (graphite_trans_bb_strip_mine): Remove pong.
2700 * graphite-ppl.c: Include missing header files.
2701 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2702 * graphite-ppl.h (ppl_strip_loop): Declared.
2703 * Makefile.in (graphite-ppl.o): Adjust dependences.
2705 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2707 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2708 (build_scop_iteration_domain): Same.
2710 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2712 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2714 (add_value_to_dim, scan_tree_for_params_right_scev,
2715 scan_tree_for_params_int): New.
2716 * graphite-ppl.c (oppose_constraint): New.
2717 (insert_constraint_into_matrix): Implement missing cases.
2718 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2720 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2722 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2723 use ppl_move_dimension.
2725 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2727 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2730 * graphite-ppl.c: Same.
2731 * graphite-ppl.h: Same.
2733 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2735 Revert last 3 commits.
2737 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2739 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2741 (add_value_to_dim, scan_tree_for_params_right_scev,
2742 scan_tree_for_params_int): New.
2743 * graphite-ppl.c (oppose_constraint): New.
2744 (insert_constraint_into_matrix): Implement missing cases.
2745 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2747 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2749 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2751 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2752 Tobias Grosser <grosser@fim.uni-passau.de>
2754 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2755 use ppl_move_dimension.
2756 * graphite-ppl.c (ppl_move_dimension): New.
2757 * graphite-ppl.h (ppl_move_dimension): Declared.
2759 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2761 * graphite.c: Do not include cloog/cloog.h.
2762 (print_graphite_bb): Remove ping pong, call PPL print function.
2764 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2766 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2767 (graphite.o): Add dependence on graphite-ppl.h.
2768 (graphite-ppl.o): New.
2769 (graphite-data-ref.c): Ping pong between PPL data structures
2771 * graphite-ppl.c: New.
2772 * graphite-ppl.h: New.
2773 * graphite.c: Include graphite-ppl.h.
2774 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2775 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2776 Ping pong between PPL data structures and matrices.
2777 (new_graphite_bb): Create a PPL constraint system.
2778 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2779 (build_loop_iteration_domains): Use PPL functions.
2780 * graphite.h: Include graphite-ppl.h. Fix comments.
2781 (graphite_bb): Use a ppl_Constraint_System_t instead of
2782 CloogMatrix for representing the domain.
2783 (scop): Remove static_schedule.
2784 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2786 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2788 * graphite.c: Fix some comments.
2790 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2793 * graphite.c (if_region_set_false_region): After moving a region
2794 in the false branch of a condition, remove the empty dummy
2796 (gloog): Remove wrong fix for PR38953.
2798 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2800 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2801 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2802 register_bb_in_sese, new_sese, free_sese): Moved.
2803 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2804 outermost_loop_in_scop, build_scop_iteration_domain,
2805 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2806 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2807 Use loop_in_sese_p instead of loop_in_scop_p.
2808 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2809 (free_scop): Do not free SCOP_BBS_B.
2810 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2811 ref_nb_loops): Moved here...
2812 * graphite.h (ref_nb_loops): ... from here.
2813 (struct scop): Remove bbs_b bitmap.
2814 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2815 * testsuite/gcc.dg/graphite/scop-19.c: New
2817 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2819 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2822 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2824 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2825 eq_loop_to_cloog_loop): Remove.
2826 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2827 * graphite.h (struct scop): Remove loop2cloog_loop.
2828 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2830 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2832 * opts.c (decode_options): Only add graphite options to O2
2833 if we compile with graphite enabled.
2835 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2837 * Merge from mainline (r143163:143684).
2839 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2841 * graphite.c (debug_value): Removed.
2842 * graphite.h (debug_value): Removed.
2844 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2846 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2847 after graphite: pass_copy_prop does not maintain a proper loop closed
2848 SSA form. pass_copy_prop should be fixed.
2850 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2852 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2854 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2856 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2857 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2858 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2861 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2863 * graphite.c (gloog): Return true when code gen succeeded.
2864 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2865 the code of the function did not changed. After cleanup_tree_cfg
2866 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2869 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2871 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2872 gimple_call_lhs is NULL.
2874 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2875 Tobias Grosser <tobi.grosser@amd.com>
2877 * graphite.c (graphite_trans_scop_block): Do not block single
2880 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2881 Tobias Grosser <tobi.grosser@amd.com>
2883 * graphite.c (build_scop_canonical_schedules): Start schedules at
2886 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2887 Tobias Grosser <tobi.grosser@amd.com>
2889 * graphite.c (compare_prefix_loops): New.
2890 (build_scop_canonical_schedules): Rewritten.
2891 (graphite_transform_loops): Move build_scop_canonical_schedules
2892 after build_scop_iteration_domain.
2894 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2895 Tobias Grosser <tobi.grosser@amd.com>
2897 * graphite.c (add_conditions_to_domain): Add the loops to
2898 the dimension of the iteration domain. Do copy the domain
2899 only when it exists.
2900 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2901 (add_conditions_to_constraints): New.
2902 (can_generate_code_stmt, can_generate_code): Removed.
2903 (gloog): Do not call can_generate_code.
2904 (graphite_transform_loops): Call add_conditions_to_constraints
2905 after building the iteration domain.
2907 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2908 Tobias Grosser <tobi.grosser@amd.com>
2909 Jan Sjodin <jan.sjodin@amd.com>
2911 * graphite.c (scan_tree_for_params): On substractions negate
2912 all the coefficients of the term.
2913 (clast_to_gcc_expression_red): New. Handle reduction expressions
2914 of more than two operands.
2915 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2916 (get_vdef_before_scop): Handle also the case of default definitions.
2918 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2921 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2922 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2923 (gloog): Do not call cleanup_tree_cfg.
2924 (graphite_transform_loops): Call cleanup_tree_cfg after all
2925 scops have been code generated.
2927 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2929 * passes.c (init_optimization_passes): Schedule after
2930 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2932 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2934 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2936 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2937 Set the type of an expression to the type of its assign statement.
2938 (expand_scalar_variables_expr): Do not pass loop_p.
2939 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2940 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2941 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2943 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2945 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2946 an expression to the gimple_expr_type of its assign statement.
2947 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2950 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2952 PR tree-optimization/38786
2953 * testsuite/gcc.dg/graphite/pr38786.c: New.
2954 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2955 the SSA_NAME case of expand_scalar_variables_expr.
2956 (expand_scalar_variables_expr): Also gather the scalar computation
2957 used to index the memory access.
2958 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2959 the gimple_stmt_iterator where it inserts new code.
2961 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2963 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2965 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2967 * opts.c (decode_options): Enable flag_graphite_identity and
2968 flag_loop_block in -O2 and above.
2970 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2972 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2973 Fix merge problem: replace with the file from trunk.
2975 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2977 * Merge from mainline (r141727:143163).
2979 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2980 Jan Sjodin <jan.sjodin@amd.com>
2982 PR tree-optimization/38559
2983 * testsuite/gcc.dg/graphite/pr38559.c: New.
2985 * graphite.c (debug_value, copy_constraint,
2986 swap_constraint_variables, scale_constraint_variable, ): New.
2987 (get_lower_bound, get_upper_bound): Removed.
2988 (graphite_trans_bb_strip_mine): Clean up this code that works
2989 only for constant number of iterations. Fully copy upper and
2990 lower bound constraints, not only the constant part of them.
2991 * graphite.h (debug_value): Declared.
2993 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2995 PR tree-optimization/38492
2996 PR tree-optimization/38498
2997 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2998 * tree-chrec.h (scev_is_linear_expression): Declared.
2999 * graphite.c (graphite_cannot_represent_loop_niter): New.
3000 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3001 (graphite_loop_normal_form): Use gcc_assert.
3002 (scan_tree_for_params): Use CASE_CONVERT.
3003 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3004 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3005 Use gcc_assert. Discard scops that contain unhandled cases.
3006 (build_scop_conditions): Return a boolean status for unhandled cases.
3007 (strip_mine_profitable_p): Print the loop number, not its depth.
3008 (is_interchange_valid): Pass the depth of the loop nest, don't
3009 recompute it wrongly.
3010 (graphite_trans_bb_block): Same.
3011 (graphite_trans_bb_block): Print tentative of loop blocking.
3012 (graphite_trans_scop_block): Do not print that the loop has been
3014 (graphite_transform_loops): Do not handle scops that contain condition
3017 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3019 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3020 * testsuite/gcc.dg/graphite/block-1.c: Same.
3021 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3023 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3024 * testsuite/gcc.dg/graphite/block-3.c: New.
3025 * testsuite/gcc.dg/graphite/pr38498.c: New.
3027 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3029 PR tree-optimization/38510
3030 * gcc.dg/graphite/pr38510.c: New.
3031 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3032 (translate_clast): Call recompute_all_dominators before
3034 (gloog): Call recompute_all_dominators before graphite_verify.
3036 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3038 PR tree-optimization/38492
3039 * graphite.c (rename_map_elt, debug_rename_elt,
3040 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3041 rename_map_elt_info, eq_rename_map_elts,
3042 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3043 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3044 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3045 (sese_build_livein_liveouts): New.
3046 (new_sese, free_sese): New.
3047 (new_scop): Call new_sese.
3048 (free_scop): Call free_sese.
3049 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3050 (register_old_new_names): Renamed register_old_and_new_names.
3051 (register_scop_liveout_renames, add_loop_exit_phis,
3052 insert_loop_close_phis, struct igp,
3053 default_liveout_before_guard, add_guard_exit_phis,
3054 insert_guard_phis, copy_renames): New.
3055 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3056 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3057 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3058 (scop_adjust_phis_for_liveouts): New.
3059 (gloog): Call scop_adjust_phis_for_liveouts.
3061 * graphite.h (struct sese): Documented. Added fields liveout,
3063 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3064 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3065 (struct scop): Added field liveout_renames.
3066 (SCOP_LIVEOUT_RENAMES): New.
3068 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3070 PR tree-optimization/38409
3071 * gcc.dg/graphite/pr38409.c: New.
3072 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3074 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3076 * graphite.c (gcc_type_for_cloog_iv): By default return
3078 (graphite_create_new_loop): Don't fold_convert the already
3079 fold_convert-ed expression.
3081 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3083 PR tree-optimization/38446
3084 * gcc.dg/graphite/pr38446.c: New.
3085 * graphite.c (register_bb_in_sese): New.
3086 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3087 looking at the bbs in the region.
3088 * graphite.h (sese): Add region_basic_blocks pointer set to
3089 structure and initialize at the time of defining new scop.
3091 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3093 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3094 (find_params_in_bb): Do not free data refs.
3095 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3097 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3099 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3100 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3101 * testsuite/gcc.dg/graphite/block-5.c: New.
3102 * testsuite/gcc.dg/graphite/block-6.c: New.
3103 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3104 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3105 * testsuite/gcc.dg/graphite/block-2.c: Same.
3107 * graphite.c (struct ivtype_map_elt): New.
3108 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3109 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3110 gcc_type_for_cloog_iv): New.
3111 (loop_iv_stack_patch_for_consts): Use the type of the induction
3112 variable from the original loop, except for the automatically
3113 generated loops, i.e., in the case of a strip-mined loop, in
3114 which case there is no original loop: in that case just use
3116 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3117 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3118 (clast_name_to_gcc): Accept params to be NULL.
3119 (clast_to_gcc_expression): Take an extra parameter for the type.
3120 Convert to that type all the expressions built by this function.
3121 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3122 (graphite_translate_clast_equation): Compute the type of the
3123 clast_equation before translating its LHS and RHS.
3124 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3125 (graphite_create_new_loop): Compute the type of the induction
3126 variable before translating the lower and upper bounds and before
3127 creating the induction variable.
3128 (rename_variables_from_edge, rename_phis_end_scop): New.
3129 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3130 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3131 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3132 compute_cloog_iv_types): New.
3133 (gloog): Call compute_cloog_iv_types before starting the
3134 translation of the clast.
3136 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3137 (GBB_CLOOG_IV_TYPES): New.
3138 (debug_ivtype_map): Declared.
3139 (oldiv_for_loop): New.
3141 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3144 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3145 (param_index): Assert if parameter is not know after parameter
3147 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3148 (find_scop_parameters): Mark, that we have finished parameter
3150 (graphite_transform_loops): Move condition detection before parameter
3152 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3153 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3155 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3157 * graphite.c (graphite_transform_loops): Always call find_transform ()
3158 in ENABLE_CHECKING. So we test these code paths, even if we do not
3161 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3163 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3164 (print_scop): Ditto.
3166 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3169 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3170 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3171 regions more than once.
3173 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3175 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3176 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3179 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3181 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3182 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3183 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3184 (max_precision_type): New.
3185 (value_clast): Removed.
3186 (clast_to_gcc_expression): Be more careful to types of expressions.
3187 Use max_precision_type and update use of gmp_cst_to_tree.
3188 (graphite_translate_clast_equation): Use max_precision_type.
3189 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3190 use the type of the condition.
3191 (graphite_create_new_loop): Do not use integer_type_node, use the
3192 max_precision_type of lb and ub.
3194 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3196 * graphite.c (build_scops_1): Initialize open_scop.exit
3199 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3201 * testsuite/gcc.dg/graphite/pr38084.c: New.
3202 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3203 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3204 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3205 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3206 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3208 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3209 Jan Sjodin <jan.sjodin@amd.com>
3210 Harsha Jagasia <harsha.jagasia@amd.com>
3222 * testsuite/gcc.dg/graphite/pr38073.c: New.
3223 * testsuite/gcc.dg/graphite/pr37928.c: New.
3224 * testsuite/gcc.dg/graphite/pr37883.c: New.
3225 * testsuite/gcc.dg/graphite/pr38125.c: New.
3226 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3227 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3228 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3230 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3231 the number of detected scops. Copy exact same test for loop
3233 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3234 loops to be blocked as reductions are not handled.
3235 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3237 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3238 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3240 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3241 * Makefile.in (graphite.o): Depend on value-prof.h.
3242 (graphite.o-warn): Removed -Wno-error.
3243 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3244 to be a NULL pointer. Call update_stmt. Return the newly created
3245 cannonical induction variable.
3247 * graphite.h (debug_rename_map): Declared. Fix some comments.
3249 * graphite.c: Reimplement the code generation from graphite to gimple.
3250 Include value-prof.h.
3251 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3252 (get_old_iv_from_ssa_name): Removed.
3253 (graphite_stmt_p): New.
3254 (new_graphite_bb): Test for useful statements before building a
3255 graphite statement for the basic block.
3256 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3257 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3259 (recompute_all_dominators, graphite_verify,
3260 nb_reductions_in_loop, graphite_loop_normal_form): New.
3261 (scop_record_loop): Call graphite_loop_normal_form.
3262 (build_scop_loop_nests): Iterate over all the blocks of the
3263 function instead of relying on the incomplete information from
3264 SCOP_BBS. Return the success of the operation.
3265 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3266 (add_bb_domains): Removed.
3267 (build_loop_iteration_domains): Don't call add_bb_domains.
3268 Add the iteration domain only to the basic blocks that have been
3269 translated to graphite.
3270 (build_scop_conditions_1): Add constraints only if the basic
3271 block have been translated to graphite.
3272 (build_scop_data_accesses): Completely disabled until data
3273 dependence is correctly implemented.
3274 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3275 (remove_all_edges_1, remove_all_edges): Removed.
3276 (get_new_name_from_old_name): New.
3277 (graphite_rename_variables_in_stmt): Renamed
3278 rename_variables_in_stmt. Call get_new_name_from_old_name.
3279 Use replace_exp and update_stmt.
3280 (is_old_iv): Renamed is_iv.
3281 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3282 Use replace_exp and update_stmt.
3283 (expand_scalar_variables_expr): Same. Use the map to get the
3284 new names for the renaming of induction variables and for the
3285 renaming of variables after a basic block has been copied.
3286 (expand_scalar_variables): Same.
3287 (graphite_rename_variables): Renamed rename_variables.
3288 (move_phi_nodes): Removed.
3289 (get_false_edge_from_guard_bb): New.
3290 (build_iv_mapping): Do not insert the induction variable of a
3291 loop in the renaming iv map if the basic block does not belong
3293 (register_old_new_names, graphite_copy_stmts_from_block,
3294 copy_bb_and_scalar_dependences): New.
3295 (translate_clast): Heavily reimplemented: copy basic blocks,
3296 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3297 At each translation step call graphite_verify ensuring the
3298 consistency of the SSA, loops and dominators information.
3299 (collect_virtual_phis, find_vdef_for_var_in_bb,
3300 find_vdef_for_var_1, find_vdef_for_var,
3301 patch_phis_for_virtual_defs): Removed huge hack.
3302 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3303 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3304 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3305 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3306 if_region_get_condition_block, if_region_set_false_region,
3307 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3308 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3309 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3310 rewrite_into_sese_closed_ssa): New.
3311 (gloog): Remove dead code. Early return if code cannot be
3312 generated. Call cleanup_tree_cfg once the scop has been code
3314 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3315 block loops with less than two loops.
3316 (graphite_apply_transformations): Remove the call to
3317 scop_remove_ignoreable_gbbs.
3318 (limit_scops): When build_scop_loop_nests fails, continue on
3319 the next scop. Fix open_scop.entry.
3320 (graphite_transform_loops): Call recompute_all_dominators: force the
3321 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3322 Call initialize_original_copy_tables and free_original_copy_tables
3323 to be able to copy basic blocks during code generation.
3324 When build_scop_loop_nests fails, continue on next scop.
3325 (value_clast): New union.
3326 (clast_to_gcc_expression): Fix type cast warning.
3328 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3330 * Merge from mainline (r140838:141727).
3332 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3336 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3338 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3342 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3343 exits and conditions.
3344 * testsuite/gcc.dg/graphite/pr37943.c: New.
3346 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3349 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3351 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3353 * doc/invoke.texi: Fix spaces.
3355 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3357 PR tree-optimization/37891
3358 Reverted last commit.
3359 * graphite.c (create_single_entry_edge): Set
3360 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3362 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3363 Mitul Thakkar <mitul.thakkar@amd.com>
3365 * graphite.c (create_single_entry_edge): Set
3366 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3368 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3370 * doc/invoke.texi: Add -fgraphite-identity.
3371 * graphite.c (graphite_apply_transformations): Check for
3372 -fgraphite-identity.
3373 * toplev.c (process_options): Add flag_graphite_identity.
3374 * tree-ssa-loop.c: Add flag_graphite_identity.
3376 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3378 Undo changes from 2008-10-02:
3379 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3380 operand type when copying the operand to a variable of different type.
3381 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3382 with the IV name after increment.
3384 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3385 Harsha Jagasia <harsha.jagasia@amd.com>
3387 PR tree-optimization/37828
3388 * testsuite/gcc.dg/graphite/pr37828.c: New.
3389 * graphite.c (graphite_trans_loop_block): Do not loop block
3390 single nested loops.
3392 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3393 Sebastian Pop <sebastian.pop@amd.com>
3395 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3396 rename_map_elt_info, eq_rename_map_elts): New.
3397 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3398 (expand_scalar_variables_expr): Change parameters.
3399 (expand_scalar_variables_stmt): Same.
3400 (expand_scalar_variables): Same.
3401 (graphite_rename_ivs): Rename graphite_rename_variables.
3402 (build_iv_mapping): New.
3403 (translate_clast): Call build_iv_mapping.
3404 * graphite.h (gbb_p): New name.
3406 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3408 PR tree-optimization/37684
3409 * gcc.dg/graphite/pr37684.c: New.
3410 * graphite.c (exclude_component_ref): New.
3411 (is_simple_operand): Call exclude_component_ref.
3413 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3414 Harsha Jagasia <harsha.jagasia@amd.com>
3416 PR tree-optimization/37485
3417 * gcc.dg/graphite/block-2.c: New
3418 * graphite.c (gmp_cst_to_tree): Moved.
3419 (iv_stack_entry_is_constant): New.
3420 (iv_stack_entry_is_iv): New.
3421 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3422 (loop_iv_stack_insert_constant): New.
3423 (loop_iv_stack_pop): Use new datatpype.
3424 (loop_iv_stack_get_iv): Same.
3425 (loop_iv_stack_get_iv_from_name): Same.
3426 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3427 (loop_iv_stack_patch_for_consts): New.
3428 (loop_iv_stack_remove_constants): New.
3429 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3430 (translate_clast): Call loop_iv_stack_patch_for_consts and
3431 loop_iv_stack_remove_constants.
3432 (gloog): Use new datatype. Redirect construction edge to end
3433 block to avoid accidental deletion.
3434 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3436 (union iv_stack_entry_data): New. Data in iv stack entry.
3437 (struct iv_stack_entry): New. Datatype for iv stack entries.
3439 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3441 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3442 operand type when copying the operand to a variable of different type.
3444 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3446 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3447 with the IV name after increment.
3449 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3451 * Merge from mainline (r140164:140838).
3453 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3455 * graphite-data-ref.c: New.
3456 * graphite.c (print_scop): Also dump the dependence graph.
3457 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3458 (new_scop): Initialize SCOP_DEP_GRAPH.
3459 (build_scop_dynamic_schedules): New.
3460 (build_access_matrix_with_af): Fixed column numbering.
3461 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3462 * graphite.h: Add ifndef/define guards against multiple inclusion.
3463 (struct scop): Add dep_graph field.
3464 (SCOP_DEP_GRAPH): Defined.
3465 (ref_nb_loops): Fixed and moved to other position.
3466 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3467 (nb_loops_around_loop_in_scop): New.
3468 (graphite_dump_dependence_graph): Declared.
3469 (graphite_build_rdg_all_levels): Declared.
3470 (graphite_test_dependence): Declared.
3471 * Makefile.in (graphite-data-ref.o): New target.
3473 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3475 * Merge from mainline (139870:140164).
3477 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3479 * Merge from mainline (138275:139870).
3480 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3481 the commits from trunk broke the niter detection.
3483 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3485 * graphite.c: Add more documentation. Fix formatting.
3486 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3487 loop_iv_stack_debug): Moved...
3488 (schedule_to_scattering): Move before use.
3489 (dot_all_scops): Include in "#if 0" the code for system
3492 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3493 loop_iv_stack_debug): ...here.
3495 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3497 * tree-phinodes.c (make_phi_node): Extern.
3498 (add_phi_node_to_bb): New.
3499 (create_phi_node): Call add_phi_node_to_bb.
3500 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3501 (remove_statement): Handle case where stored phi was updated
3502 and is no longer the same.
3503 * graphite.c (is_parameter): New.
3505 (expand_scalar_variables_expr): New.
3506 (expand_scalar_variables_stmt): New.
3507 (expand_scalar_variables): New.
3508 (move_phi_nodes): Create new phi instead of moving old one.
3509 (translate_clast): Call expand_scalar_variables.
3510 (find_vdef_for_var_in_bb): Also scan regular definitions.
3511 (skip_phi_defs): New.
3512 (collect_scop_exit_phi_args): New.
3513 (patch_scop_exit_phi_args): New.
3514 (gloog): Patch phis after scop.
3515 * tree-flow.h: (add_phi_node_to_bb): Declared.
3516 (make_phi_node): Declared.
3518 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3520 * graphite.c (end_scop): Split the entry of the scop when it
3521 is the header of the loop in which the scop is ending.
3522 (build_scops_1, limit_scops): Update uses of end_scop.
3524 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3526 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3527 SCOP_ENTRY or SCOP_EXIT.
3529 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3531 * graphite.c (get_construction_edge): Removed.
3532 (gloog): Construction edge is the scop entry edge.
3534 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3536 * graphite.c (can_generate_for_scop): Removed.
3537 (gloog): Do not call it.
3539 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite.c (new_scop): Entry of a scop is an edge.
3542 Initialize SESE region.
3543 (free_scop): Free SESE region.
3544 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3545 (split_difficult_bb): New, split from end_scop.
3546 (end_scop): Exit of a scop is an edge.
3547 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3548 not automatically updated and thus is always wrong.
3549 * graphite.h (struct sese): New.
3552 (struct scop): New field for a SESE region. Remove entry, exit.
3553 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3554 semantics as before. Moved comment around.
3556 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3557 Sebastian Pop <sebastian.pop@amd.com>
3559 * graphite.c (graphite_transform_loops): Always enable gloog
3560 and find_transform when ENABLE_CHECKING.
3562 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite.c (graphite_transform_loops): Move pretty printer
3565 of SCOPs before doing any transform. Remove call to print_scops
3566 and dot_all_scops_1.
3568 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3570 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3571 (print_graphite_bb): Same.
3573 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3575 * graphite.c (dot_all_scops_1): Cleanup.
3576 (move_scops): Fix comment.
3578 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3580 * graphite.c (build_scop_bbs): Revert commit 139355:
3582 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3583 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3585 * graphite.c (build_scop_bbs): Factor up code.
3587 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3589 * graphite.c (gloog): Update dominator info.
3591 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3593 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3595 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3597 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3599 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3600 (translate_clast): Correct formatting.
3601 * graphite.h (struct num_map): Removed.
3602 (struct graphite_bb): Remove num_map field.
3603 (GBB_INDEX_TO_NUM_MAP): Removed.
3605 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3607 * graphite.c (build_access_matrix_with_af): Fix comments.
3608 (build_scop_data_accesses): Same.
3610 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3612 * graphite.c (build_scop_data_accesses): Don't construct
3613 access matrices. Add a FIXME and an assert condition that
3614 should pass when the access matrices will be needed.
3616 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3618 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3620 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3621 Moved close by free_graphite_bb.
3622 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3623 (new_scop): Move close by free_scop.
3624 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3626 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3628 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3629 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3630 instead of recursive call.
3631 (graphite_translate_clast_equation): New.
3632 (graphite_create_guard_cond_expr): New.
3633 (graphite_create_new_guard): New.
3634 (get_stack_index_from_iv): Removed.
3635 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3636 (get_true_edge_from_guard_bb): New.
3637 (translate_clast): Handle stmt_guard in clast.
3638 (get_construction_edge): Allow construction edge detection for
3639 a scope entry with multiple predecessors if one predecessor is
3640 the immediate dominator of scope entry.
3641 (can_generate_code_stmt): Enable code generation for clast_guard.
3642 (gloog): Use correct context loop. Removed check for post dominators.
3643 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3645 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3647 * graphite.c (remove_dead_loops): Document better which
3650 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3652 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3654 (graphite.o): Also depends on pointer-set.h.
3656 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3658 * graphite.c (scop_record_loop): Fix compile warning.
3660 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3661 Sebastian Pop <sebastian.pop@amd.com>
3663 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3665 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3667 * graphite.c (build_graphite_bb): Initialize bb->aux to
3668 point to the graphite_bb_p.
3669 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3671 (add_bb_domains): Does not use the scop parameter.
3672 (graphite_transform_loops): Clean bb->aux at the end.
3674 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3675 Sebastian Pop <sebastian.pop@amd.com>
3677 * testsuite/lib/target-supports.exp
3678 (check_effective_target_fgraphite): New.
3680 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3681 check_effective_target_fgraphite returns false.
3682 Set dg-do-what-default to compile.
3683 (scan-graphite-dump-times): Removed.
3684 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3686 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3687 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3688 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3689 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3690 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3691 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3692 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3693 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3694 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3695 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3696 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3697 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3698 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3699 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3700 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3701 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3702 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3703 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3704 * testsuite/gcc.dg/graphite/block-0.c: Same.
3705 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3706 * testsuite/gcc.dg/graphite/block-1.c: Same.
3707 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3708 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3709 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3710 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3711 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3713 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3715 * graphite.c: Fix some XXX comments.
3716 (build_scop_dynamic_schedules): Removed.
3718 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3720 * graphite.h (scop_max_loop_depth): Moved...
3721 * graphite.c (scop_max_loop_depth): ...here.
3722 (remove_all_edges_1): New.
3723 (remove_all_edges): Factored code.
3724 (remove_cond_exprs): Check only the last statement for
3725 a GIMPLE_COND expression.
3727 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3729 * graphite.c (scan_tree_for_params): Early return when the
3730 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3731 (find_scop_parameters): Factor out code.
3732 (graphite_trans_bb_strip_mine): Remove dead code.
3734 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3736 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3737 graphite_trans_bb_move_loop): Factor asserts.
3738 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3739 Do not call calculate_dominance_info and estimate_bb_frequencies.
3741 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3743 * graphite.c (create_loops_mapping, free_loops_mapping,
3744 create_loops_mapping_num, debug_loop_mapping_1,
3745 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3746 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3747 graphite_loops_mapping_add_child_num,
3748 graphite_loops_mapping_insert_child,
3749 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3750 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3751 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3752 create_num_from_index, get_num_from_index,
3753 swap_loop_mapped_depth): Removed.
3754 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3755 (free_scop): Do not call free_loops_mapping.
3756 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3757 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3758 get_loop_mapped_depth.
3759 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3760 (graphite_trans_bb_strip_mine): Same.
3761 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3762 (struct scop): Remove field loops_mapping.
3764 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3765 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3767 * graphite.c (scop_record_loop): Factor out one level of the
3768 condition by early return.
3769 (build_scop_loop_nests): Format following FSF coding style.
3770 (build_scop_dynamic_schedules): Factor out code.
3771 (scopdet_bb_info): Reindent. Default case should not be reachable.
3773 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3774 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3776 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3777 assignments that are not handled as simple operands for now.
3779 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3780 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3782 * graphite.c (build_scop_bbs): Factor up code.
3784 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3785 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3787 * graphite.c (stmt_simple_for_scop_p): Factor code out
3789 (enum gbb_type): New. Group all the GBB_* types under it.
3790 (is_loop_exit): Moved...
3791 (end_scop): Enable BB spliting.
3792 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3793 * cfgloop.h (is_loop_exit): Declared.
3795 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3797 * doc/invoke.texi: Remove strides from examples containing
3798 DO loops when the strides are equal to 1.
3800 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3801 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3803 * graphite.c (graphite_trans_scop_block): Or the result with
3804 the result from graphite_trans_loop_block.
3805 * testsuite/gcc.dg/graphite/block-1.c: New.
3806 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3807 * testsuite/gfortran.dg/graphite/block-2.f: New.
3809 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3811 * graphite.c (graphite_transform_loops): Call cloog_initialize
3814 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3816 * tree-data-ref.c) (stmt_simple_memref_p): New.
3817 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3818 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3819 (is_simple_operand): Call stmt_simple_memref_p.
3821 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3822 using pointer arithmetic, as this is optimized by PRE and
3823 makes the code too difficult to analyze.
3825 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3827 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3829 * gdbinit.in (pgg): New.
3831 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3833 * graphite.c (graphite_trans_loop_block): Fix warning.
3835 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3837 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3839 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3841 * graphite.c (graphite_trans_bb_block): Remove check for
3842 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3843 Check if loop blocking is profitable for every loop, before applying
3845 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3846 if flag_loop_block is set.
3848 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3850 * graphite.c: Add some more documentation for the loop
3853 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3855 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3856 * graphite.c: Format on less than 80 columns.
3859 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3861 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3863 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3865 * doc/invoke.texi (floop-block, floop-strip-mine,
3866 floop-interchange): Update documentation with examples.
3868 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3870 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3872 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3874 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3876 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3877 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3878 * tree-scalar-evolution.c: Revert useless changes.
3879 * tree-phinodes.c: Same.
3882 * tree-vectorizer.h: Same.
3883 * tree-flow.h: Same.
3885 * common.opt (fgraphite): Update documentation.
3887 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3889 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3890 -floop-interchange): Add more text for explaining what each of these
3892 * tree-into-ssa.c (gimple_vec): Moved to...
3893 * graphite.c: Include gimple.h.
3894 (gimple_vec): Moved to...
3895 (del_loop_to_cloog_loop): Removed.
3896 (loop_affine_expr): Do not call create_data_ref when the
3897 operand is a constant.