1 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
3 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
4 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
6 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
8 * graphite-sese-to-poly.c (struct irp_data): Removed.
9 (idx_record_params): Removed.
10 (find_params_in_bb): Scan for parameters the access functions; don't
11 parse the tree representation.
13 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
15 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
16 passes at -O1 and below.
18 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
20 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
21 tree-scalar-evolution.h, and then tree-data-ref.h.
22 * graphite-clast-to-gimple.c: Same.
23 * graphite-dependences.c: Same.
24 * graphite-interchange.c: Same.
25 * graphite-poly.c: Same.
26 * graphite-scop-detection.c: Same.
27 * graphite-sese-to-poly.c: Same.
29 * lambda-code.c: Same.
30 * matrix-reorg.c: Same.
31 * tree-data-ref.c: Same.
32 * tree-if-conv.c: Same.
33 * tree-loop-distribu: Same.: Same.
34 * tree-loop-linear.c: Same.
35 * tree-parloops.c: Same.
36 * tree-predcom.c: Same.
37 * tree-vect-patterns.c: Same.
39 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
41 Partially revert the previous patch, except the following.
42 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
43 as parameters the operands of the not expression.
45 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
47 * tree-scalar-evolution.c (instantiate_scev_assign): New.
48 Do not call analyze_scalar_evolution on assignments.
49 (instantiate_scev_phi): Call analyze_scalar_evolution.
50 (instantiate_scev_name): Call instantiate_scev_assign and
52 (instantiate_scev_not): Adapted to pass as parameters the operands
53 of the not expression.
55 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
57 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
58 to pass as parameters the operands of the binary expression.
60 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
62 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
63 instantiate_scev_not. Handle NEGATE_EXPR.
64 (instantiate_scev_r): Handle NEGATE_EXPR.
66 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
68 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
70 (instantiate_scev_r): Move code in instantiate_scev_2
71 and instantiate_scev_1.
73 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
75 * tree-scalar-evolution.c (instantiate_scev_3): New.
76 (instantiate_scev_1): Move code in instantiate_scev_3.
78 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
80 * tree-scalar-evolution.c (instantiate_scev_poly): New.
81 (instantiate_scev_1): Move code in instantiate_scev_poly.
83 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
85 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
86 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
88 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
90 * tree-scalar-evolution.c (instantiate_scev_convert): New.
91 (instantiate_scev_1): Move code in instantiate_scev_convert.
93 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
95 * tree-scalar-evolution.c (instantiate_scev_binary): New.
96 (instantiate_scev_1): Move code in instantiate_scev_binary.
98 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
100 * tree-scalar-evolution.c (instantiate_scev_name): New.
101 (instantiate_scev_1): Move code in instantiate_scev_name.
103 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
105 * Merge from mainline (150992:151171).
107 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
109 * graphite-dependences.c (graphite_legal_transform_bb): Call
110 pbb_remove_duplicate_pdrs.
111 * graphite-poly.c (can_collapse_pdr): Removed.
112 (pdr_find_duplicate): Removed.
113 (can_collapse_pdrs): New.
114 (pbb_remove_duplicate_pdrs): New.
115 (new_poly_dr): Do not look for duplicates.
116 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
117 (PBB_PDR_DUPLICATES_REMOVED): New.
118 (pbb_remove_duplicate_pdrs): Declared.
120 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
122 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
123 the strides by multiplying by PDR_NB_REFS.
124 * graphite-poly.c (can_collapse_pdr): New.
125 (pdr_find_duplicate): New.
126 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
127 Initialize PDR_NB_REFS.
128 * graphite-poly.h (struct poly_dr): Add field nb_refs.
130 (new_poly_dr): Number of subscripts is a graphite_dim_t.
132 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
134 Revert one of the previous commits:
135 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
136 the computation of symmetric data dependence relations.
137 (dependency_between_pbbs_p): Same.
139 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
142 * graphite-poly.c (apply_poly_transforms): Remove legality test before
145 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
147 * graphite-dependences.c (pddr_original_scattering): Return NULL
148 for read-read dependence relations.
149 * graphite-poly.h (enum poly_dr_type): Fix comment.
152 (pdr_may_write_p): New.
154 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
156 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
157 (struct poly_dr): Same.
159 * graphite-poly.c (new_poly_dr): Same.
161 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
162 Sebastian Pop <sebastian.pop@amd.com>
164 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
165 pbb_strip_mine_time_depth. Changed the implementation so that
166 transformation is expressed as a transformation on
167 time (scatttering) dimensions. Also, ensures that the 2d+1
168 scheduling format is preserved.
169 (pbb_strip_mine_profitable_p): Profitability is based on the
170 iteration number of a given time (scattering) dimension,
171 and not on a original loop depth dimension.
172 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
173 (pbb_do_strip_mine): Call psct_dynamic_dim.
174 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
175 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
176 (pbb_nb_dynamic_scattering_transform): New.
177 (psct_dynamic_dim): New.
179 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
181 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
182 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
183 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
184 * graphite-interchange.c (build_linearized_memory_access): Same.
185 (memory_stride_in_loop): Same.
187 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
189 * graphite-dependences.c (pddr_original_scattering): New.
190 (graphite_legal_transform_dr): Call pddr_original_scattering.
193 * graphite-dependences.h (dot_deps): Declared.
194 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
195 (print_pdr): Print PDR_ID.
196 * graphite-poly.h (struct poly_dr): Add field id.
199 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
201 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
204 not delete the original dependence relation.
206 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
209 the computation of symmetric data dependence relations.
210 (dependency_between_pbbs_p): Same.
212 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
214 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
215 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
216 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
217 (free_poly_ddr): New.
218 (pddr_is_empty): New.
219 (dependence_polyhedron_1): Now returns a poly_ddr_p.
220 (dependence_polyhedron): Same. Remove useless gcc_assert.
222 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
223 (graphite_carried_dependence_level_k): Call pddr_is_empty.
224 * graphite-dependences.h (enum poly_dependence_kind): New.
225 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
226 (PDRP_SOURCE): Renamed PDDR_SOURCE.
227 (PDRP_SINK): Renamed PDDR_SINK.
228 (PDRP_DDP): Renamed PDDR_DDP.
230 (free_poly_ddr): Declared.
231 * graphite-poly.c (new_scop): Use the new hash function names.
232 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
234 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
236 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
238 * Merge from mainline (150764:150992).
240 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
242 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
243 bounds with LT_EXPR to make niter analysis more precise on code
244 generated by Graphite.
246 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
248 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
249 (graphite_legal_transform_bb): Same.
250 (poly_drs_may_alias_p): Same.
252 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
255 * graphite-ppl.c (ppl_max_for_le): Correct the use of
256 ppl_Pointset_Powerset_C_Polyhedron_maximize.
258 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
260 * graphite-poly.c (print_pbb): Print PBB index.
262 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
264 * Merge from mainline (r150672:150764).
266 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
268 * graphite-interchange.c (ppl_max_for_le): Moved...
269 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
270 * graphite-ppl.c (ppl_max_for_le): ... here.
271 * graphite-ppl.h (ppl_max_for_le): Declared.
273 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
275 * Merge from mainline (r150372:150672).
277 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
280 * sese.c (convert_for_phi_arg): New.
281 (add_guard_exit_phis): Use convert_for_phi_arg.
283 * testsuite/gfortran.dg/graphite/id-17.f: New.
285 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
287 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
288 unknown subscript upper bounds.
290 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
292 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
293 Pranav Garg <pranav.garg2107@gmail.com>
295 * graphite-interchange.c (gather_access_strides): Removed.
296 (ppl_max_for_le): New.
297 (build_linearized_memory_access): New.
298 (memory_stride_in_loop): New.
299 (pbb_interchange_profitable_p): Reimplemented.
300 * graphite-ppl.h (ppl_new_id_map): New.
301 (ppl_interchange): New.
303 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
305 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
307 * graphite-interchange.c (compute_subscript): Removed.
308 (compute_array_size_cstr): Removed.
309 (compute_array_size_poly): Removed.
310 (compute_array_size): Removed.
311 (gather_access_strides_poly): Removed.
312 (gather_access_strides): Empty.
314 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
316 * graphite-dependences.c (dependence_polyhedron_1): Replace
317 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
318 (graphite_legal_transform_dr): Same.
319 (graphite_carried_dependence_level_k): Same.
320 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
321 Initialize PDR_NB_SUBSCRIPTS.
322 (print_pdr_access_layout): Replace pdr_nb_subscripts with
324 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
325 (PDR_NB_SUBSCRIPTS): New.
326 (pdr_nb_subscripts): Removed.
327 (pdr_dim): Simplified.
328 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
329 with PDR_NB_SUBSCRIPTS.
331 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
333 * graphite-interchange.c (compute_array_size): Remove use of
335 * graphite-poly.c (new_poly_dr): Remove argument data_container.
336 Do not initialize PDR_DATA_CONTAINER.
337 (print_pdr): Do not print PDR_DATA_CONTAINER.
338 * graphite-poly.h (struct poly_dr): Remove data_container field.
339 (PDR_DATA_CONTAINER): Removed.
340 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
342 (build_poly_dr): Same.
344 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
346 * testsuite/gcc.dg/graphite/interchange-9.c: New.
348 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
349 Sebastian Pop <sebastian.pop@amd.com>
351 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
352 copy of the dependence polyhedron. Free the temporary objects.
353 (graphite_carried_dependence_level_k): Free unused objects before
356 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
357 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
358 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
359 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
360 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
362 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
364 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
365 Early return without analyzing the data dependences if no
366 transform has been done. Call restore_scattering if the transform
368 (graphite-interchange.c): Same.
369 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
370 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
371 (apply_poly_transforms): Do not gcc_assert that
372 the transform is legal.
373 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
374 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
375 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
376 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
377 * graphite-poly.h (struct poly_scattering): New.
378 (struct poly_bb): Add original, transformed, and saved fields.
379 Remove transformed_scattering, original_scattering, nb_local_variables,
380 and nb_scattering_transform fields.
381 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
382 (poly_scattering_new): New.
383 (poly_scattering_free): New.
384 (poly_scattering_copy): New.
385 (store_scattering_pbb): New.
386 (store_scattering): New.
387 (restore_scattering_pbb): New.
388 (restore_scattering): New.
389 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
390 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
392 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
394 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
397 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
399 * Makefile.in (graphite.o): Depends on PREDICT_H.
400 * graphite.c: Include predict.h.
401 (graphite_finalize): Call tree_estimate_probability.
402 * predict.c (predict_loops): Do not call scev_initialize and
404 (tree_estimate_probability_bb): New.
405 (tree_estimate_probability): Do not initialize loops: move that
406 code to the driver. Call tree_estimate_probability_bb.
407 (tree_estimate_probability_driver): New.
408 (pass_profile): Use tree_estimate_probability_driver.
409 * predict.h (tree_estimate_probability): Declared.
411 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
413 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
414 * graphite-dependences.c (graphite_legal_transform): Add time to
415 TV_GRAPHITE_DATA_DEPS.
416 (dependency_between_pbbs_p): Same.
417 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
419 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
421 * Merge from mainline (r149952:150372).
423 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
425 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
426 * graphite-blocking.c: Same.
427 * graphite-clast-to-gimple.c: Same.
428 * graphite-dependences.c: Same.
429 * graphite-poly.c: Same.
430 * graphite-poly.h: Same.
431 * graphite-ppl.c: Same.
432 * graphite-scop-detection.c: Same.
433 * graphite-sese-to-poly.c: Same.
436 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
438 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
439 (remove_simple_copy_phi): New.
440 (remove_invariant_phi): New.
441 (simple_copy_phi_p): New.
442 (reduction_phi_p): New.
443 (gsi_for_ssa_name_def): New.
444 (insert_out_of_ssa_copy): New.
445 (insert_out_of_ssa_copy_on_edge): New.
446 (create_zero_dim_array): New.
447 (scalar_close_phi_node_p): New.
448 (rewrite_close_phi_out_of_ssa): New.
449 (rewrite_phi_out_of_ssa): New.
450 (rewrite_reductions_out_of_ssa): New.
451 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
453 * testsuite/gcc.dg/graphite/id-11.c: New.
454 * testsuite/gcc.dg/graphite/id-15.c: New.
455 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
456 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
457 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
458 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
459 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
460 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
461 * testsuite/gfortran.dg/graphite/id-13.f: New.
462 * testsuite/gfortran.dg/graphite/id-5.f: New.
464 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
466 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
467 check that nb_reductions_in_loop is zero.
468 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
470 (nb_reductions_in_loop): Removed.
471 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
472 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
473 (bb_contains_non_iv_scalar_phi_nodes): Removed.
474 (scop_contains_non_iv_scalar_phi_nodes): Removed.
475 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
477 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
479 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
480 statements that have an empty iteration domain.
481 * testsuite/gfortran.dg/graphite/id-16.f: New.
483 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
485 * tree-scalar-evolution.c (instantiate_scev_1): Return
486 chrec_dont_know when the result is not above instantiate_below.
487 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
488 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
489 the tree has a known scalar evolution.
490 * testsuite/gfortran.dg/graphite/id-14.f: New.
491 * testsuite/gfortran.dg/graphite/id-15.f: New.
493 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
495 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
497 (rename_variables): Keep inserting renames after the ones already
500 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
502 * graphite-sese-to-poly.c (compare_bb_depths): New.
503 (graphite_sort_dominated_info): New.
504 (build_scop_bbs_1): Call graphite_sort_dominated_info.
505 (build_scop_scattering): Fix comment.
507 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
509 * graphite.c (graphite_finalize): Call print_loops instead of
510 dump_function_to_file.
511 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
512 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
513 loops generated in the graphite output file.
514 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
515 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
516 * testsuite/gfortran.dg/graphite/id-12.f: New.
518 2009-07-24 Li Feng <nemokingdom@gmail.com>
520 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
523 2009-07-24 Li Feng <nemokingdom@gmail.com>
524 Tobias Grosser <grosser@fim.uni-passau.de>
526 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
527 alias set number build alias in ACCESSES polyhedron.
528 (build_alias_set_for_drs): New.
529 (build_pbb_drs): Added build_alias_set_for_drs.
530 * graphite-dependences.c (poly_drs_may_alias_p): New.
531 (graphite_carried_dependence_level_k): Check alias information
532 before building polyhedron.
534 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
536 * Makefile.in (lambda-code.o): Fix formatting.
538 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
540 * Merge from mainline (r149350-149952)
542 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
544 * graphite-poly.c (apply_poly_transforms): Move strip_mine
545 before interchange to prepare for loop blocking.
547 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
549 * graphite-poly.c (apply_poly_transforms): Add checks after every
551 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
552 done in apply_poly_transforms.
554 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
556 * graphite-dependences.c (build_lexicographically_gt_constraint):
557 Replace RES parameter with *RES.
558 (dependence_polyhedron_1): Pass an address of the parameter RES
559 instead of value of RES.
561 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
563 * graphite.c (graphite_finalize): Fix comment.
564 (graphite_transform_loops): Reset scev info after code generation
567 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
569 * graphite.c (graphite_finalize): Call scev_reset.
571 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
573 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
574 GBB_CLOOG_IV_TYPES hash table twice.
575 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
576 (add_condition_to_domain): Clear GMP values.
578 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
580 * graphite-dependences.c: Fix formatting.
581 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
582 (pbb_number_of_iterations): Free ppl_Linear_Expression.
583 * graphite-sese-to-poly.c: Fix formatting.
584 * graphite.c (graphite_transform_loops): Create the hash table
585 after the early return.
587 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
589 * testsuite/gcc.dg/graphite/id-14.c: New.
590 * testsuite/gcc.dg/graphite/pr40157.c: New.
591 * testsuite/gfortran.dg/graphite/id-11.f: New.
593 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
595 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
596 (build_poly_scop): Return false when there are no pbbs within
597 loops to avoid to pass to cloog scops with no loops.
599 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
601 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
602 useless test "i % 2".
603 (build_pbb_scattering_polyhedrons): Fix formatting.
604 (build_poly_dr): Same.
605 * graphite.c (graphite_transform_loops): Restructure.
607 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
609 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
610 reduction_list parameter.
611 (rewrite_all_phi_nodes_with_iv): Same.
612 (canonicalize_loop_ivs): Same.
613 * tree-parloops.c (struct brli): Removed.
614 (build_reduction_list_info): Removed.
615 (build_new_reduction): New.
616 (analyze_reduction_list): Removed.
617 (gather_scalar_reductions): Find reductions instead of phi
618 nodes that can't be canonicalized.
619 (try_create_reduction_list): Remove reduction_list parameter.
620 (gen_parallel_loop): Same.
621 (parallelize_loops): Remove analyze_reductions variable,
622 initialization and free.
623 Change reduction_list htab initialization to reduction_info
624 elements instead of ssa names.
625 Call try_create_reduction_list and gen_parallel_loop without
626 analyzed_reduction argument.
627 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
628 canonicalize_loop_ivs with one less argument.
629 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
631 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
633 * graphite-dependences.c (new_poly_dr_pair): New.
634 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
635 (new_poly_dr_pair): New.
636 (eq_poly_dr_pair_p): New.
637 (hash_poly_dr_pair_p): New.
638 * graphite-dependences.h (struct poly_dr_pair): New.
639 (eq_poly_dr_pair_p): Declared.
640 (hash_poly_dr_pair_p): Declared.
641 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
642 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
643 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
644 * Makefile.in (graphite-poly.o): Add dependence on
645 graphite-dependences.h.
647 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
649 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
650 polynomials of degree > 1 pass to Graphite.
651 * tree-chrec.c (scev_is_linear_expression): Call
652 evolution_function_is_affine_multivariate_p.
653 * testsuite/gfortran.dg/graphite/id-10.f90: New.
655 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
657 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
658 Instantiate scevs varying in outer loops.
659 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
661 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
663 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
664 redundant constraint.
666 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
668 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
669 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
670 based on the file names as in the C testsuite.
671 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
672 * testsuite/gfortran.dg/graphite/block-2.f: Same.
673 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
674 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
675 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
676 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
677 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
678 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
679 * testsuite/gfortran.dg/graphite/id-6.f: Same.
680 * testsuite/gfortran.dg/graphite/id-9.f: Same.
681 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
682 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
683 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
685 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
687 * sese.c (expand_scalar_variables_call): New.
688 (expand_scalar_variables_ssa_name): Handle calls in expander.
690 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
692 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
693 Expect to see the pattern twice.
694 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
695 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
696 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
698 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
700 * testsuite/gcc.dg/graphite/id-10.c: New.
701 * testsuite/gcc.dg/graphite/id-12.c: New.
702 * testsuite/gfortran.dg/graphite/id-7.f: New.
703 * testsuite/gfortran.dg/graphite/id-8.f: New.
705 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
707 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
710 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
712 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
714 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
716 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
718 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
720 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
721 building PDR subscripts.
723 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
725 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
726 computation of array sizes.
728 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
730 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
732 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
734 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
735 build_pairwise_constraint, dr_equality_constraints,
736 build_pairwise_scheduling_equality,
737 build_pairwise_scheduling_inequality, lexicographically_gt_p,
738 build_lexicographically_gt_constraint, dependence_polyhedron,
739 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
740 Move from NNC_Polyhedron to C_Polyhedron.
741 * graphite-interchange.c (compute_array_size_poly,
742 gather_access_strides): Dito.
743 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
744 free_scop, pbb_number_of_iterations): Dito.
745 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
746 pbb_dim_iter_domain, struct scop): Dito.
747 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
748 new_Cloog_Domain_from_ppl_Polyhedron,
749 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
750 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
751 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
752 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
753 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
754 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
755 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
756 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
757 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
758 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
759 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
760 build_scop_iteration_domain, build_poly_dr): Dito
762 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
764 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
766 * testsuite/gcc.dg/graphite/run-id-1.c: New.
768 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
770 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
771 positivity constraint on the symbolic number of iterations.
773 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
775 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
777 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
778 Tobias Grosser <grosser@fim.uni-passau.de>
780 * graphite-clast-to-gimple.c (build_scop_context): Removed.
781 (build_cloog_prog): Directly use SCOP_CONTEXT.
782 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
783 (free_scop): Free SCOP_CONTEXT.
784 (print_scop_context): New.
785 (print_scop): Call print_scop_context.
786 (debug_scop_context): New.
787 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
788 (struct scop): Added field context.
790 * graphite-sese-to-poly.c (add_param_constraints): New.
791 (build_scop_context): New.
792 (build_poly_scop): Call build_scop_context.
794 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
796 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
797 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
798 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
799 * graphite-ppl.h: Include double-int.h and tree.h.
800 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
801 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
802 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
803 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
805 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
807 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
808 POINTER_PLUS_EXPR for pointer types.
809 (clast_to_gcc_expression): Same.
811 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
813 * graphite-poly.c (print_scattering_function): Early return when
814 PBB_TRANSFORMED_SCATTERING is not initialized.
815 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
817 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
819 * tree-parloops.c (analyze_reduction_list): Remove unused variable
822 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
824 * tree-parloops.c (analyze_reduction_list): Change return
826 (try_create_reduction_list): Move the call to
827 analyze_reduction_list to the beginining.
828 Call reduction_phi with analyzed_reductions as argument
829 instead of reduction_list.
831 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
833 * Merge from mainline (r148296:149346)
835 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
837 * graphite-scop-detection.c (graphite_can_represent_init): New.
838 (graphite_can_represent_scev): Call graphite_can_represent_init:
839 check that the initial value does not contain multiplications of
841 (stmt_has_simple_data_refs_p): New.
842 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
843 (is_simple_operand): Fix formatting.
844 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
846 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
848 * testsuite/gcc.dg/graphite/id-13.c: New.
849 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
850 analyze_scalar_evolution, use scalar_evolution_in_region.
851 (scan_tree_for_params_right_scev): Add extra assert.
852 (parameter_index_in_region_1): Split from parameter_index_in_region.
853 (idx_record_params): Use scalar_evolution_in_region.
854 (find_params_in_bb): Same.
855 (find_scop_parameters): Same.
856 (build_loop_iteration_domains): Same.
857 (create_linear_expr_from_tree): Same.
858 * sese.c (scalar_evolution_in_region): New.
859 * sese.h (scalar_evolution_in_region): Declared.
860 (defined_in_sese_p): New.
861 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
863 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
866 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
868 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
869 TREE_DATA_REF_H also implies SCEV_H.
871 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
873 * graphite-poly.c (print_scop_params): New.
874 (print_scop): Call print_scop_params.
875 (debug_scop_params): New.
876 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
878 2009-07-07 Li Feng <nemokingdom@gmail.com>
880 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
881 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
882 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
883 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
884 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
885 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
887 2009-07-07 Li Feng <nemokingdom@gmail.com>
889 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
890 for dependency checking part.
891 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
892 tests for dependency checking.
893 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
894 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
895 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
896 flag -fdump-tree-graphite-all for autopar testsuites.
898 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
900 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
901 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
902 canonicalize_loop_ivs): Moved...
903 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
905 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
907 * tree-parloops.c (try_create_reduction_list): Pass an extra
908 argument analyzed_reductions. Call analyze_reduction_list.
909 (gen_parallel_loop): Do not call analyze_reduction_list.
910 (parallelize_loops): Init and finalize analyzed_reductions.
912 2009-07-06 Li Feng <nemokingdom@gmail.com>
914 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
915 Added flag -fno-loop-strip-mine for autopar testcase.
917 2009-07-04 Li Feng <nemokingdom@gmail.com>
919 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
920 transformed scattering dimension instead of unmatch orignal when
921 calling dependence_polyhedron.
923 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
925 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
927 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
929 * graphite-poly.c (pbb_number_of_iterations): Check for returned
930 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
932 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
934 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
935 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
936 * graphite-poly.c (pbb_number_of_iterations): New.
937 * graphite-poly.h (pbb_number_of_iterations): Declared.
938 (pbb_iterator_dim, pbb_parameter_dim): New.
940 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
942 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
943 last commit on type of lower and upper bound of loops.
945 2009-06-29 Li Feng <nemokingdom@gmail.com>
947 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
948 graphite-dependences.h.
949 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
950 (mark_bb_with_pbb): New.
951 (get_stmtfor_depth): New.
952 (find_pbb_via_hash): New.
953 (dependency_in_loop_p): New.
954 (mark_loops_parallel): New.
955 (free_aux_in_new_loops): New.
956 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
957 bb with it's relevant pbb. Mark newly created loops. Remove mark
958 innermost loop parallel without checking.
959 (gloog): Add parameter BB_PBB_MAPPING.
960 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
961 (gloog): Change declaration.
962 (mark_loop_parallel): Make extern.
963 (free_aux_in_new_loops): Declare.
964 (bb_pbb_map_hash): New.
965 (eq_bb_pbb_map): New.
966 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
967 auto parallelization when flag_graphite_force_parallel is set.
968 (graphite_finalize): Added free_aux_in_new_loops.
969 * tree-parloops.c (parallelize_loops): Only generate parallel code for
970 the innermost loop that marked parallel. Use
971 flag_graphite_force_parallel instead of loop->can_be_parallel.
972 (loop_parallel_p): Move inner most checking out of function.
974 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
976 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
977 type of lower and upper bound of loops signed long int.
979 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
981 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
982 expression outside the loop.
984 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
986 * gcc.dg/graphite/interchange-8.c: New.
988 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
990 * gcc.dg/graphite/interchange-0.c: XFailed.
991 * gcc.dg/graphite/interchange-5.c: XFailed.
992 * gcc.dg/graphite/interchange-6.c: XFailed.
994 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
996 * graphite-interchange.c (compute_array_size_poly): The end of the
997 recursion should return 1.
999 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1001 * graphite-interchange.c (compute_array_size_cstr): Allow the
1002 subscript multiplier to be -1.
1003 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1004 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1005 data_container. Initializes PDR_DATA_CONTAINER.
1006 (print_pdr_access_layout): New.
1007 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1008 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1010 (PDR_DATA_CONTAINER): New.
1011 (new_poly_dr): Update declaration.
1012 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1013 (build_poly_dr): Call pdr_add_data_dimensions.
1015 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1017 * graphite-poly.h (struct poly_dr): Fix comment.
1018 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1019 (pdr_add_memory_accesses): New.
1020 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1022 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1024 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1025 (print_pbb): Add call to print_pdrs.
1026 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1028 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1029 Li Feng <nemokingdom@gmail.com>
1031 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1032 (dependency_between_pbbs_p): New.
1033 (lexicographically_gt_p): Assure !empty_p before polyhedron
1034 intersection assign.
1035 (build_lexicographically_gt_constraint): Correct lexicographically
1037 * graphite-dependences.h: New.
1038 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1040 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1042 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1043 (gloog): Print to dump_file the generated clast.
1044 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1045 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1047 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1049 * graphite-poly.c (extend_scattering): Increment
1050 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1052 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1054 * graphite-interchange.c (compute_array_size_poly): Added exit of
1055 recursion condition. Continue iterating even after the first equality.
1056 (compute_array_size): Same.
1058 2009-06-24 Li Feng <nemokingdom@gmail.com>
1060 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1061 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1062 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1063 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1064 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1066 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1068 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1069 only when the use verifies is_gimple_reg.
1071 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1073 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1074 Allocate scaldims after call to unify_scattering_dimensions.
1076 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1078 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1080 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1081 Albert Cohen <albert.cohen@inria.fr>
1083 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1084 variables for the strip mining.
1086 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1087 Pranav Garg <pranav.garg2107@gmail.com>
1089 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1090 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1091 (graphite-blocking.o): New rule.
1092 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1093 * graphite-blocking.c: New.
1094 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1095 flag_loop_strip_mine.
1096 (psct_scattering_dim_for_loop_depth): New.
1097 * graphite-poly.h (scop_do_strip_mine): Declared.
1098 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1099 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1100 flag_loop_strip_mine.
1102 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1104 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1105 a GMP value and a PPL coefficient at each iteration of a loop.
1107 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1109 * graphite-dependences.c (dependence_polyhedron): Do not use
1110 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1111 pbb_nb_scattering_transform.
1112 (graphite_legal_transform_dr): Same.
1113 * graphite-poly.c (extend_scattering): Same.
1114 (unify_scattering_dimensions): Same.
1115 (print_scattering_function): Same.
1116 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1117 PBB_NB_LOCAL_VARIABLES.
1118 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1119 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1120 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1121 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1122 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1123 (pbb_nb_scattering_transform): New.
1124 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1125 (psco_scattering_dim): Add assert on parameters.
1126 (psct_scattering_dim): Same.
1127 (psct_scattering_dim_for_loop_depth): Declared.
1128 (psct_local_var_dim): New.
1129 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1130 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1131 correct layout, call pbb_nb_local_vars.
1132 (psct_add_local_variable, psct_add_scattering_dimension): New.
1133 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1134 Initialize PBB_NB_SCATTERING_TRANSFORM.
1136 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1138 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1139 (set_coef): Renamed ppl_set_coef.
1140 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1142 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1144 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1145 test a boolean against 1.
1146 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1147 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1148 (pbb_do_interchange): Returns true when a transform has been performed.
1149 (scop_do_interchange): Same.
1150 * graphite-poly.c (apply_poly_transforms): Use the return value of
1151 scop_do_interchange.
1152 * graphite-poly.h (scop_do_interchange): Update declaration.
1154 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1156 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1158 * sese.c (sese_reset_aux_in_loops): New.
1159 * sese.h (sese_reset_aux_in_loops): New.
1161 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1163 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1164 multiplier and multiply the constant by the multiplier.
1165 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1166 (build_poly_dr): Do not use the multiplier to define the subscript.
1168 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1170 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1171 compiler's data reference. Initialize PDR_CDR.
1172 (print_pdr): Call dump_data_reference.
1173 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1174 Add compiler_dr field.
1175 (PDR_BB): Renamed PDR_PBB.
1177 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1178 GCC's data reference representation.
1179 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1180 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1182 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1184 * graphite-poly.c (print_scattering_function): Also print the layout.
1185 * graphite-poly.h (pbb_nb_local_vars): New.
1187 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1189 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1191 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1193 * graphite-poly.c (print_pdr, debug_pdr): New.
1194 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1195 (PDR_BASE): Removed.
1197 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1199 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1202 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1204 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1205 subscript identification column.
1206 (pbb_do_interchange): Print to dump_file that some loops "will be
1207 interchanged". Rely on that chain of characters in the testcases.
1208 * gcc.dg/graphite/interchange-0.c: New.
1209 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1210 interchange-*.c files and compile them with -floop-interchange.
1212 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1214 * graphite-interchange.c (interchange_profitable_p): Renamed
1215 pbb_interchange_profitable_p.
1217 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1218 Harsha Jagasia <harsha.jagasia@amd.com>
1219 Pranav Garg <pranav.garg2107@gmail.com>
1221 * graphite-interchange.c (interchange_profitable_p): Make static.
1222 (pbb_interchange_loop_depths, pbb_do_interchange,
1223 scop_do_interchange): New.
1224 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1225 for flag_loop_interchange.
1226 * graphite-poly.h (scop_do_interchange): Declared.
1227 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1228 flag_loop_interchange is used.
1230 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1232 * graphite-dependences.c (dependence_polyhedron): Update use of
1233 pbb_nb_scattering_dims.
1234 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1235 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1236 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1237 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1239 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1241 * graphite.c: Cleanup foo.
1243 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1245 * Merge from mainline (r143684:148293).
1246 * Disabled libpcp until it gets fixed.
1248 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1249 Harsha Jagasia <harsha.jagasia@amd.com>
1251 * graphite-interchange.c: New.
1252 * Makefile.in (graphite-interchange.o): New.
1253 * graphite-poly.h (interchange_profitable_p): Declared.
1254 * graphite-ppl.h (value_max): New.
1256 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1258 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1259 * graphite-poly.h: Fix some comments.
1263 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1266 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1267 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1268 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1269 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1270 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1271 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1272 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1273 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1274 * graphite-clast-to-gimple.c: Same.
1275 * graphite-dependences.c: Same.
1276 * graphite-poly.c: Same.
1277 * graphite-sese-to-poly.c: Same.
1279 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1281 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1282 expressions for an IV rename, as returned by clast_to_gcc_expression.
1283 (copy_renames): Rename new_name to expr.
1284 * sese.c (debug_rename_elt): Same.
1287 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1288 the information from the rename map.
1289 (rename_variables_in_stmt): Same.
1290 (add_loop_exit_phis): Rename new_name to expr.
1291 (insert_loop_close_phis): Same.
1292 (add_guard_exit_phis): Same. Call force_gimple_operand.
1293 * sese.h (struct rename_map_elt): Rename new_name to expr.
1294 (new_rename_map_elt): Same.
1296 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1298 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1299 * sese.c (set_rename): Make it extern.
1300 * sese.h (set_rename): Declared.
1302 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1304 * graphite-poly.c (extend_scattering): Free values.
1305 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1307 (ppl_print_powerset_matrix): Same.
1308 * graphite-scop-detection.c (free_scops_1): New.
1309 (limit_scops): Call free_scops_1.
1310 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1311 (build_poly_dr): Free PPL coefficients.
1312 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1314 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1316 * graphite-dependences.c: New.
1317 * graphite-data-ref.c: Removed.
1318 * graphite-data-ref.h: Removed.
1319 * Makefile.in (graphite-data-ref.o): Removed.
1320 (graphite-dependences.o): Added.
1321 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1322 * graphite-poly.c: Same.
1323 Move the data dependence testing to graphite-dependences.c.
1325 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1327 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1328 from graphite_cannot_represent_loop. Code refactored.
1329 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1331 2009-05-17 Li Feng <nemokingdom@gmail.com>
1333 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1334 Cover all the testcases (not only the filtered ones).
1336 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1338 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1339 unnecessary check. Update comments. Move check for REAL_TYPE here.
1340 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1341 done in (stmt_simple_for_scop_p).
1343 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1345 * graphite.c (print_global_statistics): New.
1346 (print_graphite_scop_statistic): New.
1347 (print_graphite_statistics): New.
1348 (graphite_initialize, graphite_transform_loops): Print statistics.
1349 * graphite-scop-detection (build_scops): Print statistics.
1350 (print_graphite_scop_statistics): New.
1351 (print_graphite_statistics): New.
1353 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1355 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1356 (debug_clast_name_index): Removed.
1357 (debug_clast_name_indexes_1): Removed.
1358 (debug_clast_name_indexes): Removed.
1359 (clast_name_index_elt_info): Removed.
1360 (eq_clast_name_indexes): Removed.
1361 (clast_name_to_index): Removed.
1362 (new_clast_name_index): Removed.
1363 (save_clast_name_index): Removed.
1364 (save_var_name): Moved...
1365 (init_sese_params_index): Removed.
1366 (clast_name_to_gcc): Remove use of name_tree.
1367 (initialize_cloog_names): Same.
1368 (gloog): Do not call init_sese_params_index.
1369 * graphite-sese-to-poly.c (save_var_name): ...here.
1370 (parameter_index_in_region): New.
1371 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1372 (parameter_index_in_region): Removed.
1373 (is_parameter): Remove use of name_tree.
1374 * sese.h (struct name_tree): Removed.
1375 (struct sese): Remove use of name_tree. New field params_names.
1376 (SESE_PARAMS_NAMES): New.
1377 (SESE_PARAMS): Remove duplicate.
1378 (parameter_index_in_region): Removed.
1379 (sese_nb_params): Remove use of name_tree.
1380 (struct clast_name_index): New.
1381 (new_clast_name_index): New.
1382 (clast_name_to_index): New.
1383 (save_clast_name_index): New.
1384 (debug_clast_name_index): New.
1385 (debug_clast_name_indexes_1): New.
1386 (debug_clast_name_indexes): New.
1387 (clast_name_index_elt_info): New.
1388 (eq_clast_name_indexes): New.
1390 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1392 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1393 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1394 (graphite_loop_normal_form): Do not pass region. Do not
1395 initialize SESE_OLDIVS.
1396 (build_graphite_loop_normal_form): Update call to
1397 graphite_loop_normal_form.
1398 * sese.c (debug_oldivs): Removed.
1399 (new_sese): Do not initialize SESE_OLDIVS.
1400 (free_sese): Do not free SESE_OLDIVS.
1401 (oldiv_for_loop): Removed.
1402 * sese.h (struct sese): Remove old_ivs.
1403 (SESE_OLDIVS): Removed.
1404 (oldiv_for_loop): Removed.
1406 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1408 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1409 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1410 replaced by a call to newivs_to_depth_to_newiv.
1411 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1412 (clast_to_gcc_expression_red): Same.
1413 (gcc_type_for_clast_expr): Same.
1414 (gcc_type_for_clast_eq): Same.
1415 (graphite_translate_clast_equation): Same.
1416 (graphite_create_guard_cond_expr): Same.
1417 (graphite_create_new_guard): Same.
1418 (graphite_create_new_loop): Same.
1419 (build_iv_mapping): Same.
1420 (translate_clast): Same.
1422 (loop_iv_stack_patch_for_consts): Removed. *
1423 sese.c (iv_stack_entry_is_constant): Removed.
1424 (iv_stack_entry_is_iv): Removed.
1425 (loop_iv_stack_push_iv): Removed.
1426 (loop_iv_stack_insert_constant): Removed.
1427 (loop_iv_stack_pop): Removed.
1428 (loop_iv_stack_get_iv): Removed.
1429 (loop_iv_stack_get_iv_from_name): Removed.
1430 (debug_loop_iv_stack): Removed.
1431 (free_loop_iv_stack): Removed.
1432 (loop_iv_stack_remove_constants): Removed. *
1433 sese.h (iv_stack_entry_kind): Removed.
1434 (iv_stack_entry_data_union): Removed.
1435 (iv_stack_entry_struct): Removed.
1436 (iv_stack_entry_p): Removed.
1437 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1438 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1439 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1440 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1441 (gbb_loop_at_index): Fix indenting.
1442 (gbb_loop_index): Removed.
1444 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1446 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1447 Call clast_name_to_index.
1449 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1451 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1452 do not pass params. Get params from SESE_PARAMS.
1453 (clast_to_gcc_expression): Same.
1454 (clast_to_gcc_expression_red): Same.
1455 (gcc_type_for_clast_eq): Same.
1456 (graphite_translate_clast_equation): Same.
1457 (graphite_create_new_loop): Same.
1458 * sese.c (rename_variables_in_stmt): Fix comment.
1460 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1462 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1464 Call save_clast_name_index.
1465 (translate_clast): Pass newivs_index.
1466 (gloog): Create and free newivs_index.
1468 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1470 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1471 (clast_name_index_p): New type.
1472 (debug_clast_name_index): New.
1473 (debug_clast_name_indexes_1): New.
1474 (debug_clast_name_indexes): New.
1475 (clast_name_index_elt_info): New.
1476 (eq_clast_name_indexes): New.
1477 (clast_name_to_index): New.
1478 (new_clast_name_index): New.
1479 (save_clast_name_index): New.
1480 (init_sese_params_index): New.
1481 (gloog): Call init_sese_params_index.
1482 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1483 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1484 (free_sese): Free SESE_PARAMS_INDEX.
1485 * sese.h (struct sese): Add params_index.
1486 (SESE_PARAMS_INDEX): New.
1488 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1490 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1491 (graphite_create_new_loop): Pass the newivs vector. Push the
1492 newly created IV to newivs.
1493 (translate_clast): Pass the newivs vector.
1494 (gloog): Create and destroy the newivs vector.
1496 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1498 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1499 (graphite_loop_normal_form): Initialize loop->aux with the unique
1500 IV that has been created.
1502 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1504 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1505 scev with parameters in the base part. They where forbidden
1508 2009-05-11 Li Feng <nemokingdom@gmail.com>
1510 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1511 compile options by file names.
1512 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1513 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1514 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1515 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1517 2009-05-08 Li Feng <nemokingdom@gmail.com>
1519 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1520 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1521 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1522 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1524 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1526 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1529 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1531 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1532 allow integer constant strides.
1533 (graphite_can_represent_expr): Depend on outermost_loop.
1534 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1535 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1536 build_scops_1): Same.
1537 (scopdet_basic_block_info): Same and insert layered SCoP
1539 (try_generate_gimple_bb): Cleanup.
1540 (build_scops): Enable data references.
1542 * testsuite/gcc.dg/graphite/id-5.c: New.
1543 * testsuite/gcc.dg/graphite/id-9.c: New.
1544 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1545 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1547 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1549 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1550 that we have not yet built for this SCoP.
1552 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1554 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1555 for complex numbers.
1557 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1559 * graphite-ppl.c: Fix build if cloog is not available.
1561 2009-05-04 Li Feng <nemokingdom@gmail.com>
1563 * tree-parloops.c (loop_parallel_p): Remove construction of
1564 NITER and REDUCTION_LIST.
1565 (try_get_loop_niter): New.
1566 (try_create_reduction_list): New.
1567 (parallelize_loops): Bypass the failed checkings in autopar
1568 when can_be_parallel in loop structure is set to true.
1570 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1572 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1573 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1575 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1577 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1578 Enable EQ_EXPR and NE_EXPR again.
1580 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1582 * graphite-scop-detection.c (graphite_can_represent_scev):
1583 Add check if scev is affine multivariate.
1584 (harmful_stmt_in_bb): Check if we can represent the conditions.
1585 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1587 * testsuite/gcc.dg/graphite/id-7.c: New.
1589 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1591 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1592 Check all bbs in region, not only the bbs that are represented in
1594 (build_poly_scop): Add newline.
1595 * testsuite/gcc.dg/graphite/id-8.c: New.
1597 2009-04-30 Li Feng <nemokingdom@gmail.com>
1599 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1600 when loop initialize.
1601 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1602 * common.opt: Declare flag_graphite_force_parallel.
1603 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1605 * graphite-poly.c (apply_poly_transforms): Introduce
1606 flag_graphite_force_parallel.
1607 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1608 * toplev.c (process_options): ditto and replace a not correctly
1611 2009-04-30 Li Feng <nemokingdom@gmail.com>
1613 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1614 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1615 to the redefinition.
1616 (compute_cloog_iv_types_1): ditto.
1617 (build_iv_mapping): ditto.
1618 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1620 (free_gimple_bb): Removed GBB_LOOPS related free part.
1621 (build_bb_loops): Removed.
1622 * sese.h (struct gimple_bb): Removed loops.
1623 (GBB_LOOPS): Removed.
1624 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1625 (gbb_loop_index): ditto.
1627 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1629 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1630 allow non constant strides.
1631 * testsuite/gcc.dg/graphite/scop-20.c: New.
1633 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1635 * graphite-scop-detection.c (dot_all_scops): Fix system call
1636 return value warning.
1639 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1641 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1642 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1644 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1646 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1647 build_pairwise_constraint, dr_equality_constraints,
1648 build_pairwise_scheduling_equality,
1649 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1650 build_lexicographically_gt_constraint, dependence_polyhedron,
1651 graphite_legal_transform_dr, graphite_legal_transform_bb,
1652 graphite_legal_transform): New.
1653 * graphite-poly.h (graphite_legal_transform): Declared.
1654 * graphite-sese-to-poly.c (build_poly_scop): Call to
1655 graphite_legal_transform is disabled for the moment.
1657 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1659 * graphite-poly.h (pbb_nb_scattering_dims): New.
1660 (pbb_nb_scattering): Use it.
1662 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1664 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1665 Pointset_Powerset version of ppl_insert_dimensions.
1666 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1668 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1670 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1672 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1674 * graphite-poly.h: Fix comment.
1676 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1678 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1680 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1682 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1685 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1687 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1688 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1691 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1693 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1694 handle EQ_EXPR and NE_EXPR.
1696 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1698 * graphite-poly.h (poly_dr): Fix comment.
1700 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1701 Tobias Grosser <grosser@fim.uni-passau.de>
1703 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1704 with a zero dimension polyhedron.
1705 (find_scop_parameters): Move the call to scop_set_nb_params here.
1706 (build_loop_iteration_domains): Store in loop->aux the iteration
1708 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1709 by any loop in scop.
1710 (build_poly_scop): Do not call scop_set_nb_params.
1712 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1713 Tobias Grosser <grosser@fim.uni-passau.de>
1715 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1716 add_condition_to_domain not GT_EXPR.
1718 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1720 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1721 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1722 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1723 upper_bound_assign to calculate unions.
1724 * testsuite/gcc.dg/graphite/id-6.c: New.
1726 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1728 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1729 handle abnormal edges.
1731 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1733 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1734 (free_poly_bb): Also free poly_drs.
1735 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1736 (poly_dr): Polyhedron to Pointset_Powerset.
1737 (pdr_accessp_nb_subscripts): Same.
1738 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1741 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1743 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1744 names into more meaningful names.
1746 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1748 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1749 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1751 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1753 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1755 * tree-parloops.c (rewrite_phi_with_iv): New.
1756 (rewrite_all_phi_nodes_with_iv): New.
1757 (canonicalize_loop_ivs): Call them.
1759 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1761 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1762 graphite_find_data_references_in_stmt.
1763 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1764 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1766 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1768 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1770 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1772 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1773 instead of bb_in_region.
1774 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1775 (build_sese_conditions): Use flag_bb_in_sese.
1776 * sese.c (register_bb_in_sese): Removed.
1777 (new_sese): Remove initialization of SESE_REGION_BBS.
1778 (free_sese): Do not free SESE_REGION_BBS.
1779 * sese.h (struct sese): Remove field region_basic_blocks.
1780 (SESE_REGION_BBS): Removed.
1781 (bb_in_sese_p): Implement in function of bb_in_region.
1783 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1785 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1788 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1790 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1792 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1793 (add_condition_to_domain): New.
1794 (add_condition_to_pbb): New.
1795 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1796 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1798 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1800 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1801 ppl_Pointset_Powerset.
1802 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1803 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1804 (pbb_nb_loops): Same.
1805 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1806 add_conditions_to_domain): Same.
1807 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1808 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1809 ppl_const_Polyhedron_t.
1810 (ppl_print_powerset_matrix): New.
1811 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1812 ppl_print_powerset_matrix): New.
1813 (ppl_print_polyhedron_matrix): Updated.
1815 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1817 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1819 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1821 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1822 (print_iteration_domains, debug_iteration_domain,
1823 debug_iteration_domains): New.
1824 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1825 debug_iteration_domains): Declared.
1826 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1829 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1830 Sebastian Pop <sebastian.pop@amd.com>
1832 * graphite-poly.h (print_iteration_domain): New.
1833 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1834 (build_sese_conditions_1, build_sese_conditions_after,
1835 build_sese_conditions_before): New.
1836 (build_sese_conditions): Rewritten.
1838 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1839 Tobias Grosser <grosser@fim.uni-passau.de>
1841 Cleanup of code generation liveouts.
1842 * graphite-clast-to-gimple.c (translate_clast): Use a single
1843 rename_map instead of one per translated statement.
1844 Do not use SESE_LIVEOUT_RENAMES.
1845 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1846 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1847 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1848 phi node of a reduction: when a loop contains a reduction used outside
1849 the loop, there should be a scalar close phi node on the exit block.
1850 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1851 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1852 (free_sese): Do not free them.
1853 (sese_build_liveouts_use): Do not use them.
1854 (sese_build_liveouts_bb): Same.
1855 (sese_build_liveouts): Same.
1856 (sese_insert_phis_for_liveouts): Same.
1857 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1858 (defined_in_loop_p): New.
1859 (alive_after_loop): New.
1860 (close_phi_not_yet_inserted_p): New.
1861 (struct alep, alep_p): New.
1862 (add_loop_exit_phis): Remove from the rename_map all the names defined
1863 in the code generated loop.
1864 (insert_loop_close_phis): Traverse the rename_map passed to it.
1865 Don't use SESE_LIVEOUT_RENAMES.
1866 (default_liveout_before_guard): Renamed default_before_guard.
1867 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1868 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1869 (register_sese_liveout_renames): Removed.
1870 (copy_bb_and_scalar_dependences): Do not call it.
1871 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1873 (SESE_LIVEOUT): Removed.
1874 (SESE_LIVEOUT_RENAMES): Removed.
1875 (SESE_REDUCTION_LIST): Removed.
1876 (sese_build_liveouts): Removed.
1877 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1878 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1879 (insert_guard_phis): Same.
1880 (rename_map_elt): Declare a VEC of them.
1881 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1882 trees not pointers to trees.
1884 Rewrite in canonical close SSA form:
1885 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1886 (limit_scops): Close the scop after the block containing the close phi
1888 (canonicalize_loop_closed_ssa): New.
1889 (canonicalize_loop_closed_ssa_form): New.
1890 (build_scops): Call canonicalize_loop_closed_ssa_form.
1892 * graphite-sese-to-poly.c: Fix typos.
1894 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1896 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1898 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1899 (print_pbb): Add conditions.
1901 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1902 Sebastian Pop <sebastian.pop@amd.com>
1904 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1905 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1906 (build_scop_bbs_1): New.
1907 (build_scop_bbs): Rewrite.
1908 * sese.h (bb_in_region): New.
1910 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1912 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1914 (print_scop): Style.
1915 * graphite-poly.h (poly_bb): Add drs vector.
1916 (PBB_DRS): Add accessor.
1917 * graphite-sese-to-poly.c (build_poly_dr): New.
1918 (build_pbb_drs, build_scop_drs): New.
1919 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1921 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1923 * tree-ssa-loop.c: Include forgotten toplev.h
1925 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1927 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1928 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1929 * testsuite/gcc.dg/graphite/pr37928.c: Same
1930 * testsuite/gcc.dg/graphite/pr38409.c: Same
1931 * testsuite/gcc.dg/graphite/pr38498.c: Same
1932 * testsuite/gcc.dg/graphite/pr38559.c: Same
1933 * testsuite/gcc.dg/graphite/pr39335.c: Same
1934 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1935 * testsuite/gfortran.dg/graphite/block-2.f: Same
1936 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1939 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1941 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1942 build_access_matrix, build_scop_data_accesses): Remove access function
1943 building. (We get a new version soon).
1944 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1945 * sese.h (nb_loops_around_loop_in_sese): Remove.
1946 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1948 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1949 Sebastian Pop <sebastian.pop@amd.com>
1951 * graphite-scop-detection.c (struct scopdet_info): Rename last
1953 (scopdet_basic_block_info, build_scops_1): Don't use
1954 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1956 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1957 Sebastian Pop <sebastian.pop@amd.com>
1959 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1960 * sese.c (sese_build_liveouts_use): Renamed from
1961 sese_build_livein_liveouts_use. Remove liveins.
1962 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1963 Call sese_build_liveouts_use.
1964 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1965 Call sese_build_liveouts_bb.
1966 (new_sese, free_sese): Remove liveins.
1967 (sese_add_exit_phis_var): Deleted.
1968 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1970 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1972 * sese.h (sese): Remove num_ver and livein.
1973 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1975 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1977 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1979 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1981 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1982 (build_scop_scattering): Do not use compare_prefix_loops any more.
1983 (nb_common_loops): New.
1985 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1987 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1988 (register_old_and_new_names): Renamed set_rename.
1990 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1992 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1993 of the decl from the previous commit.
1995 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1997 * graphite-scop-detection.c (dot_scop): New.
1998 * graphite-scop-detection.h (dot_scop): Declared.
2000 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2002 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2004 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2006 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2007 condition at the end of the loop.
2008 * graphite.c (graphite_initialize, graphite_finalize): Print to
2009 dump_file the compiled function.
2010 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2011 of create_empty_loop_on_edge.
2012 (translate_clast): Update the code generation of loops for the new
2014 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2016 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2018 Reverted the patch from 2009-03-19.
2020 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2022 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2024 (print_scop): Style.
2025 * graphite-poly.h (poly_bb): Add drs vector.
2026 (PBB_DRS): Add accessor.
2027 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2028 (build_access_matrix_with_af, build_access_matrix,
2029 build_scop_data_accesses): Delete.
2030 (build_poly_dr): New.
2031 (build_pbb_drs, build_scop_drs): New.
2032 (build_poly_scop): call build_scop_drs.
2034 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2036 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2037 once per basic block.
2039 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2041 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2042 (graphite_can_represent_expr): Renamed from loop_affine_expr
2044 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2045 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2046 (scopdet_basic_block_info): Actually define entry_block.
2047 (stmt_simple_memref_p): Moved here from ...
2049 * tree-data-ref.c (stmt_simple_memref_p): here.
2050 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2052 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2054 * testsuite/gcc.dg/graphite/id-4.c: New.
2056 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2058 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2059 (register_old_and_new_names): Update the content of the map.
2060 When there was already a rename_map_elt in the map at that
2062 (copy_bb_and_scalar_dependences): Do rename_variables after
2063 expand_scalar_variables.
2064 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2065 of the map. When there was already a rename_map_elt in the
2066 map at that location, free it.
2067 (translate_clast): Pass the rename_map. Do not initialize and free
2068 a rename_map per stmt_user.
2069 (gloog): Initialize and free one rename_map and pass it to
2072 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2074 * sese.c (expand_scalar_variables_stmt,
2075 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2077 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2078 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2079 the gimple_stmt_iterator of the statement to be expanded.
2080 * graphite-scop-detection.c (is_simple_operand): Do handle
2083 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2085 * graphite-scop-detection.c (is_simple_operand): Do not handle
2087 * testsuite/gcc.dg/graphite/id-2.c: New.
2089 * graphite-sese-to-poly.c (build_bb_loops,
2090 add_value_to_dim, scan_tree_for_params_right_scev,
2091 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2092 find_params_in_bb, build_loop_iteration_domains,
2093 add_conditions_to_domain): Remove subtract.
2095 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2097 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2098 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2099 pbb_loop_at_index -> gbb_loop_at_index.
2100 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2101 (debug_loop_vec): Delete.
2102 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2103 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2104 (PBB_LOOPS): Removed.
2105 (PBB_BLACK_BOX): Insert cast.
2106 (pbb_set_black_box): New setter.
2107 (pbb_loop_at_index, pbb_loop_index): Removed.
2108 (scop_set_region, scop_set_nb_params): New.
2109 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2110 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2111 (build_poly_scop): Use scop_set_nb_params.
2112 * sese.h (gimple_bb): Add LOOPS.
2113 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2115 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2117 Revert previous commit.
2119 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2121 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2122 (register_old_and_new_names): Update the content of the map.
2123 When there was already a rename_map_elt in the map at that
2125 (copy_bb_and_scalar_dependences): Do rename_variables after
2126 expand_scalar_variables.
2127 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2128 of the map. When there was already a rename_map_elt in the
2129 map at that location, free it.
2130 (translate_clast): Pass the rename_map. Do not initialize and free
2131 a rename_map per stmt_user.
2132 (gloog): Initialize and free one rename_map and pass it to
2135 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2137 Remove forgotten line in revert.
2139 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2141 Revert previous commit.
2143 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2145 * sese.c (register_old_and_new_names): 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 (copy_bb_and_scalar_dependences): Do rename_variables after
2149 expand_scalar_variables.
2150 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2151 of the map. When there was already a rename_map_elt in the
2152 map at that location, free it.
2153 (translate_clast): Pass the rename_map. Do not initialize and free
2154 a rename_map per stmt_user.
2155 (gloog): Initialize and free one rename_map and pass it to
2158 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2160 * graphite-clast-to-gimple.c (translate_clast): context_loop
2163 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2164 Sebastian Pop <sebastian.pop@amd.com>
2166 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2167 of the use of ppl_Polyhedron_map_space_dimensions.
2169 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2170 Sebastian Pop <sebastian.pop@amd.com>
2172 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2173 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2174 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2175 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2176 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2177 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2178 pbb_nb_params): New.
2179 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2180 nb_loops_around_pbb): Adapt return types.
2182 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2184 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2185 graphite-clast-to-gimple.o, graphite-data-ref.o,
2186 graphite-scop-detection.o, graphite-poly.o): Add
2189 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2191 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2192 graphite-clast-to-gimple.o, graphite-data-ref.o,
2193 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2195 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2197 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2198 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2199 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2200 * testsuite/gcc.dg/graphite/block-0.c: Same.
2201 * testsuite/gcc.dg/graphite/block-1.c: Same.
2202 * testsuite/gcc.dg/graphite/block-2.c: Same.
2203 * testsuite/gcc.dg/graphite/block-3.c: Same.
2204 * testsuite/gcc.dg/graphite/block-4.c: Same.
2205 * testsuite/gcc.dg/graphite/block-5.c: Same.
2206 * testsuite/gcc.dg/graphite/block-6.c: Same.
2207 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2208 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2209 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2210 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2211 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2212 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2213 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2214 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2215 * opts.c: Remove -floop-block from -O2.
2216 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2217 -floop-strip-mine are used.
2219 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2220 Sebastian Pop <sebastian.pop@amd.com>
2222 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2224 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2225 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2226 strip_mine_profitable_p, is_interchange_valid,
2227 graphite_trans_bb_block, graphite_trans_loop_block,
2228 graphite_trans_scop_block): Temporary removed.
2229 (extend_scattering, unify_scattering_dimensions): New.
2230 (print_scattering_function, graphite_read_transforms):
2231 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2232 (graphite_generate_scattering_fns): Removed.
2233 (apply_poly_transforms): Cleanup.
2234 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2235 (schedule_to_scattering): Moved.
2236 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2237 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2238 (pbb_nb_scattering): New.
2239 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2240 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2242 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2244 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2245 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2246 -> PBB_TRANSFORMED_SCATTERING.
2247 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2248 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2249 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2250 (check_poly_representation): Do not return bool.
2251 (graphite_transform_loops): Reformat.
2252 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2254 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2256 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2257 debug_pbb_domain, debug_pbb, debug_scop): New.
2258 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2259 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2261 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2264 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2265 when the type precision of the induction variable should be
2266 larger than the type precision of nit.
2267 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2268 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2269 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2271 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2272 * testsuite/gcc.dg/graphite/pr39335.c: New.
2274 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2276 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2277 SSA_NAMES not struct reduction_info.
2279 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2281 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2283 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2284 Tobias Grosser <grosser@fim.uni-passau.de>
2286 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2287 (free_sese): Free SESE_REDUCTION_LIST.
2288 * sese.h (struct sese): Add field reduction_list.
2289 (SESE_REDUCTION_LIST): New.
2290 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2291 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2293 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2294 Tobias Grosser <grosser@fim.uni-passau.de>
2296 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2299 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2300 Tobias Grosser <grosser@fim.uni-passau.de>
2302 * tree-parloops.c (struct brli, build_reduction_list_info,
2303 analyze_reduction_list, gather_scalar_reductions): New.
2304 (loop_parallel_p): Build a reduction list containing only
2305 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2306 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2307 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2308 * tree-flow.h (gather_scalar_reductions): Declared.
2310 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2313 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2314 number_of_iterations_exit from a gcc_assert.
2316 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2317 Jan Sjodin <jan.sjodin@amd.com>
2319 * output.h (graphite_out_file, graphite_in_file): Declared.
2320 * toplev.c (graphite_out_file, graphite_in_file): New.
2321 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2322 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2323 Don't call schedule_to_scattering.
2324 * common.opt (fgraphite-write, fgraphite-read): New.
2325 * graphite-poly.c: Include output.h.
2326 (print_scattering_function, print_scattering_functions,
2327 debug_scattering_function, debug_scattering_functions,
2328 graphite_write_transforms, graphite_read_transforms,
2329 graphite_generate_scattering_fns): New.
2330 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2331 Call graphite_generate_scattering_fns, graphite_write_transforms,
2332 graphite_read_transforms.
2333 (new_poly_bb): Initialize PBB_SCATTERING.
2334 (free_poly_bb): Free PBB_SCATTERING.
2335 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2336 * graphite-poly.h (struct poly_bb): Add field scattering.
2337 (PBB_SCATTERING): New.
2338 (print_scattering_function, print_scattering_functions,
2339 debug_scattering_function, debug_scattering_functions): Declared.
2340 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2341 GMP values, not integers!
2342 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2343 ppl_read_polyhedron_matrix): New.
2344 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2345 debug_ppl_polyhedron_matrix,
2346 ppl_read_polyhedron_matrix): Declared.
2347 * Makefile.in (graphite-poly.o): Depends on output.h.
2349 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2350 Tobias Grosser <grosser@fim.uni-passau.de>
2353 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2354 scalar evolutions in the scop_entry->loop_father.
2356 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2357 Tobias Grosser <grosser@fim.uni-passau.de>
2359 * graphite.h (ref_nb_loops): Remove declaration.
2360 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2361 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2362 debug_gbb): Moved to sese.h.
2365 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2366 Tobias Grosser <grosser@fim.uni-passau.de>
2368 * graphite-data-ref.[ch]: Disable.
2370 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2371 Tobias Grosser <grosser@fim.uni-passau.de>
2373 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2374 scalar evolutions in the scop_entry->loop_father.
2376 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2378 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2379 (graphite_cannot_represent_loop_niter): Renamed
2380 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2381 (limit_scops): build_sese_loop_nests does not return a bool.
2382 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2383 * sese.c (nb_reductions_in_loop): ... from here.
2384 (graphite_loop_normal_form): ... from here.
2385 (sese_record_loop): Does not fail, so does not return a bool.
2386 (build_sese_loop_nests): Same.
2387 * sese.h (build_sese_loop_nests): Update declaration.
2388 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2389 (build_graphite_loop_normal_form): New.
2390 (gloog): Call build_graphite_loop_normal_form.
2391 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2392 build_sese_loop_nests.
2394 * testsuite/gcc.dg/graphite/id-1.c: New.
2396 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2397 Tobias Grosser <grosser@fim.uni-passau.de>
2399 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2400 The SCoP detection fix is sufficient.
2402 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2404 PR tree-optimization/39260
2405 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2406 the basic block contains a condition with a real type.
2407 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2409 * gcc.dg/graphite/pr39260.c: New.
2411 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2413 * graphite-poly.c: Inlcude params.h.
2414 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2416 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2417 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2419 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2420 Tobias Grosser <grosser@fim.uni-passau.de>
2422 * graphite-scop-detection.c (dot_all_scops_1,
2423 dot_all_scops): Moved here.
2424 * graphite-scop-detection.h (dot_all_scops): Declared here.
2425 * graphite.c (graphite_initialize, graphite_finalize): New.
2426 (graphite_transform_loops): Cleaned up.
2427 * sese.c (debug_oldivs): Moved here.
2428 * graphite-poly.c (graphite_apply_transformations): Renamed
2429 apply_poly_transforms.
2430 (debug_loop_vec): Moved here.
2431 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2432 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2433 find_scop_parameters, build_scop_iteration_domain,
2434 add_conditions_to_constraints, build_scop_canonical_schedules,
2435 build_scop_data_accesses): Now static.
2436 (build_poly_scop, check_poly_representation): New.
2438 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2440 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2441 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2442 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2443 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2444 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2445 scan_tree_for_params, struct irp_data, dx_record_params,
2446 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2447 build_loop_iteration_domains, add_conditions_to_domain,
2448 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2449 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2450 build_sese_conditions, add_conditions_to_constraints,
2451 build_scop_iteration_domain, build_access_matrix_with_af,
2452 build_access_matrix,
2453 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2455 * graphite-sese-to-poly.c: New.
2456 * graphite-sese-to-poly.h: New.
2458 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2460 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2462 * graphite.c: Split graphite code generation to a new file.
2463 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2464 max_precision_type, clast_to_gcc_expression_red,
2465 clast_to_gcc_expression, gcc_type_for_clast_expr,
2466 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2467 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2468 graphite_create_new_guard, clast_get_body_of_loop,
2469 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2470 graphite_create_new_loop, build_iv_mapping, copy_renames,
2471 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2472 compute_cloog_iv_types, free_scattering, save_var_name,
2473 initialize_cloog_names, build_scop_context, build_cloog_prog,
2474 set_cloog_options, debug_clast_stmt, scop_to_clast,
2475 print_generated_program, debug_generated_program,
2476 gloog): Moved to graphite-clast-to-gimple.c.
2478 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2480 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2481 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2482 loop_iv_stack_pop, loop_iv_stack_get_iv,
2483 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2484 free_loop_iv_stack, loop_iv_stack_remove_constants,
2485 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2486 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2487 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2488 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2489 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2490 get_vdef_before_sese, sese_adjust_vphi,
2491 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2492 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2493 is_iv, expand_scalar_variables_ssa_name,
2494 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2495 expand_scalar_variables, rename_variables, remove_condition,
2496 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2497 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2498 default_liveout_before_guard, add_guard_exit_phis,
2499 insert_guard_phis, register_old_and_new_names,
2500 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2501 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2502 if_region_set_false_region, create_if_region_on_edge,
2503 move_sese_in_condition): Moved to sese.c.
2505 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2506 if_region_exit, if_region_get_condition_block,
2507 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2508 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2509 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2510 ivtype_map_elt, new_ivtype_map_elt,
2511 recompute_all_dominators): Moved to sese.h.
2513 * graphite-clast-to-gimple.c: New.
2514 * graphite-clast-to-gimple.h: New.
2515 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2516 * sese.c: Modified as said above.
2519 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2521 * graphite.c: Split scop detection to a new file.
2522 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2523 move_sd_regions, loop_affine_expr, exclude_component_ref,
2524 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2525 graphite_cannot_represent_loop_niter, struct scopdet_info,
2526 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2527 find_single_entry_edge, find_single_exit_edge,
2528 create_single_entry_edge, sd_region_without_exit,
2529 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2530 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2531 Moved to graphite-scop-detection.c.
2533 * graphite-scop-detection.c: New.
2534 * graphite-scop-detection.h: New.
2535 * Makefile.in: Add new rule for graphite-scop-detection.o.
2537 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2538 tree-scalar-evolution.h.
2539 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2540 build_sese_loop_nests): Moved here from graphite.c.
2541 (param_index): Renamed parameter_index_in_region.
2543 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2544 Sebastian Pop <sebastian.pop@amd.com>
2546 * gcc.dg/graphite/block-0.c: Expected to fail now.
2547 * gcc.dg/graphite/block-1.c: Same.
2548 * gcc.dg/graphite/block-5.c: Same.
2549 * gcc.dg/graphite/block-6.c: Same.
2551 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2552 Sebastian Pop <sebastian.pop@amd.com>
2554 * graphite.h: Separate from graphite_bb_p the polyhedral
2555 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2556 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2557 graphite-data-ref.h.
2558 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2559 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2560 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2561 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2562 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2563 scop_nb_params): Moved to graphite-poly.h.
2564 * graphite-data-ref.c: Same.
2565 * graphite-data-ref.h: New.
2567 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2568 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2569 is_interchange_valid, graphite_trans_bb_block,
2570 graphite_trans_loop_block, scop_max_loop_depth,
2571 graphite_trans_scop_block, graphite_apply_transformations,
2572 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2574 * graphite-poly.h: New.
2575 * graphite-poly.c: New.
2576 * Makefile.in (OBJS-common): Add graphite-poly.o.
2577 (graphite-poly.o): New rule.
2578 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2581 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2582 Tobias Grosser <grosser@fim.uni-passau.de>
2584 * graphite.c: Replace gb -> gbb.
2586 * graphite-data-ref.c: Same.
2588 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2589 Tobias Grosser <grosser@fim.uni-passau.de>
2591 * Makefile.in (OBJS-commmon): Add sese.o.
2593 (graphite.o): Add sese.h.
2594 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2595 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2596 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2598 (block_before_scop): Add missing return.
2599 (new_scop, free_scop): Remove SESE data structures.
2600 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2601 find_scop_parameters, build_loop_iteration_domains,
2602 add_conditions_to_domain, register_scop_liveout_renames,
2603 copy_bb_and_scalar_dependences): Scop -> SESE.
2605 (add_conditions_to_domain): SCoP -> SESE and remove check
2606 (scop_contains_non_iv_scalar_phi_nodes): New.
2607 (build_scop_conditions_1, build_scop_conditions): Remove check for
2608 non iv scalar phi nodes.
2609 (print_scop_statistics): New.
2610 (graphite_transform_loops): Cleanup.
2612 * graphite.h: Move to sese & cleanup.
2616 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2617 Tobias Grosser <grosser@fim.uni-passau.de>
2619 * graphite.c (build_scop_conditions_1): Conditions are only
2620 at the end of a basic block.
2622 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2623 Tobias Grosser <grosser@fim.uni-passau>
2625 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2627 (GBB_ALPHA): Removed.
2629 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2630 Tobias Grosser <grosser@fim.uni-passau.de>
2632 * graphite-data-ref.c (graphite_test_dependence): Don't use
2633 GBB_DYNAMIC_SCHEDULE.
2634 * graphite.c (new_graphite_bb): Same.
2635 (free_graphite_bb): Same.
2636 (build_scop_dynamic_schedules): Removed.
2637 (graphite_transform_loops): Don't call it.
2638 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2639 (GBB_DYNAMIC_SCHEDULE): Removed.
2641 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2642 Tobias Grosser <grosser@fim.uni-passau.de>
2644 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2645 (print_graphite_bb): Same.
2646 (build_cloog_prog): Same.
2648 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2649 Tobias Grosser <grosser@fim.uni-passau.de>
2651 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2653 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2654 Tobias Grosser <grosser@fim.uni-passau.de>
2656 * graphite.c (build_scop_context): Don't use CloogMatrix.
2657 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2658 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2660 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2661 Tobias Grosser <grosser@fim.uni-passau.de>
2663 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2664 liveout_renames, add_params fields...
2665 (struct sese): ... here.
2666 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2667 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2669 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2670 Tobias Grosser <grosser@fim.uni-passau.de>
2672 * graphite.c (print_scop): Do not print the CLooG program.
2673 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2674 build_cloog_prog, gloog): Don't use SCOP_PROG.
2675 (find_transform): Renamed scop_to_clast.
2676 (print_generated_program, debug_generated_program): New.
2677 (graphite_transform_loops): Adapt to new interface.
2678 * graphite.h (struct scop): Remove program field.
2679 (SCOP_PROG): Removed.
2680 (print_generated_program, debug_generated_program): Declared.
2682 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2684 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2685 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2686 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2687 free_graphite_bb, build_scop_canonical_schedules,
2688 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2689 schedules are now represented using a ppl_Linear_Expression_t.
2690 * graphite.h (struct graphite_bb): Same.
2691 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2692 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2694 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2696 * graphite.c: Free local memory.
2697 * graphite-ppl.c: Same.
2699 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2701 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2702 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2703 swap_constraint_variables, scale_constraint_variable): Removed.
2704 (graphite_trans_bb_strip_mine): Remove pong.
2705 * graphite-ppl.c: Include missing header files.
2706 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2707 * graphite-ppl.h (ppl_strip_loop): Declared.
2708 * Makefile.in (graphite-ppl.o): Adjust dependences.
2710 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2712 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2713 (build_scop_iteration_domain): Same.
2715 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2717 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2719 (add_value_to_dim, scan_tree_for_params_right_scev,
2720 scan_tree_for_params_int): New.
2721 * graphite-ppl.c (oppose_constraint): New.
2722 (insert_constraint_into_matrix): Implement missing cases.
2723 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2725 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2727 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2728 use ppl_move_dimension.
2730 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2732 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2735 * graphite-ppl.c: Same.
2736 * graphite-ppl.h: Same.
2738 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2740 Revert last 3 commits.
2742 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2744 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2746 (add_value_to_dim, scan_tree_for_params_right_scev,
2747 scan_tree_for_params_int): New.
2748 * graphite-ppl.c (oppose_constraint): New.
2749 (insert_constraint_into_matrix): Implement missing cases.
2750 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2752 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2754 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2756 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2757 Tobias Grosser <grosser@fim.uni-passau.de>
2759 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2760 use ppl_move_dimension.
2761 * graphite-ppl.c (ppl_move_dimension): New.
2762 * graphite-ppl.h (ppl_move_dimension): Declared.
2764 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2766 * graphite.c: Do not include cloog/cloog.h.
2767 (print_graphite_bb): Remove ping pong, call PPL print function.
2769 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2771 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2772 (graphite.o): Add dependence on graphite-ppl.h.
2773 (graphite-ppl.o): New.
2774 (graphite-data-ref.c): Ping pong between PPL data structures
2776 * graphite-ppl.c: New.
2777 * graphite-ppl.h: New.
2778 * graphite.c: Include graphite-ppl.h.
2779 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2780 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2781 Ping pong between PPL data structures and matrices.
2782 (new_graphite_bb): Create a PPL constraint system.
2783 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2784 (build_loop_iteration_domains): Use PPL functions.
2785 * graphite.h: Include graphite-ppl.h. Fix comments.
2786 (graphite_bb): Use a ppl_Constraint_System_t instead of
2787 CloogMatrix for representing the domain.
2788 (scop): Remove static_schedule.
2789 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2791 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2793 * graphite.c: Fix some comments.
2795 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2798 * graphite.c (if_region_set_false_region): After moving a region
2799 in the false branch of a condition, remove the empty dummy
2801 (gloog): Remove wrong fix for PR38953.
2803 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2805 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2806 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2807 register_bb_in_sese, new_sese, free_sese): Moved.
2808 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2809 outermost_loop_in_scop, build_scop_iteration_domain,
2810 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2811 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2812 Use loop_in_sese_p instead of loop_in_scop_p.
2813 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2814 (free_scop): Do not free SCOP_BBS_B.
2815 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2816 ref_nb_loops): Moved here...
2817 * graphite.h (ref_nb_loops): ... from here.
2818 (struct scop): Remove bbs_b bitmap.
2819 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2820 * testsuite/gcc.dg/graphite/scop-19.c: New
2822 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2824 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2827 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2829 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2830 eq_loop_to_cloog_loop): Remove.
2831 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2832 * graphite.h (struct scop): Remove loop2cloog_loop.
2833 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2835 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2837 * opts.c (decode_options): Only add graphite options to O2
2838 if we compile with graphite enabled.
2840 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2842 * Merge from mainline (r143163:143684).
2844 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2846 * graphite.c (debug_value): Removed.
2847 * graphite.h (debug_value): Removed.
2849 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2851 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2852 after graphite: pass_copy_prop does not maintain a proper loop closed
2853 SSA form. pass_copy_prop should be fixed.
2855 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2857 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2859 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2861 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2862 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2863 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2866 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite.c (gloog): Return true when code gen succeeded.
2869 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2870 the code of the function did not changed. After cleanup_tree_cfg
2871 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2874 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2876 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2877 gimple_call_lhs is NULL.
2879 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2880 Tobias Grosser <tobi.grosser@amd.com>
2882 * graphite.c (graphite_trans_scop_block): Do not block single
2885 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2886 Tobias Grosser <tobi.grosser@amd.com>
2888 * graphite.c (build_scop_canonical_schedules): Start schedules at
2891 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2892 Tobias Grosser <tobi.grosser@amd.com>
2894 * graphite.c (compare_prefix_loops): New.
2895 (build_scop_canonical_schedules): Rewritten.
2896 (graphite_transform_loops): Move build_scop_canonical_schedules
2897 after build_scop_iteration_domain.
2899 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2900 Tobias Grosser <tobi.grosser@amd.com>
2902 * graphite.c (add_conditions_to_domain): Add the loops to
2903 the dimension of the iteration domain. Do copy the domain
2904 only when it exists.
2905 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2906 (add_conditions_to_constraints): New.
2907 (can_generate_code_stmt, can_generate_code): Removed.
2908 (gloog): Do not call can_generate_code.
2909 (graphite_transform_loops): Call add_conditions_to_constraints
2910 after building the iteration domain.
2912 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2913 Tobias Grosser <tobi.grosser@amd.com>
2914 Jan Sjodin <jan.sjodin@amd.com>
2916 * graphite.c (scan_tree_for_params): On substractions negate
2917 all the coefficients of the term.
2918 (clast_to_gcc_expression_red): New. Handle reduction expressions
2919 of more than two operands.
2920 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2921 (get_vdef_before_scop): Handle also the case of default definitions.
2923 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2926 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2927 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2928 (gloog): Do not call cleanup_tree_cfg.
2929 (graphite_transform_loops): Call cleanup_tree_cfg after all
2930 scops have been code generated.
2932 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2934 * passes.c (init_optimization_passes): Schedule after
2935 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2937 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2939 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2941 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2942 Set the type of an expression to the type of its assign statement.
2943 (expand_scalar_variables_expr): Do not pass loop_p.
2944 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2945 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2946 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2948 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2950 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2951 an expression to the gimple_expr_type of its assign statement.
2952 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2955 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2957 PR tree-optimization/38786
2958 * testsuite/gcc.dg/graphite/pr38786.c: New.
2959 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2960 the SSA_NAME case of expand_scalar_variables_expr.
2961 (expand_scalar_variables_expr): Also gather the scalar computation
2962 used to index the memory access.
2963 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2964 the gimple_stmt_iterator where it inserts new code.
2966 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2968 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2970 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2972 * opts.c (decode_options): Enable flag_graphite_identity and
2973 flag_loop_block in -O2 and above.
2975 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2977 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2978 Fix merge problem: replace with the file from trunk.
2980 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2982 * Merge from mainline (r141727:143163).
2984 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2985 Jan Sjodin <jan.sjodin@amd.com>
2987 PR tree-optimization/38559
2988 * testsuite/gcc.dg/graphite/pr38559.c: New.
2990 * graphite.c (debug_value, copy_constraint,
2991 swap_constraint_variables, scale_constraint_variable, ): New.
2992 (get_lower_bound, get_upper_bound): Removed.
2993 (graphite_trans_bb_strip_mine): Clean up this code that works
2994 only for constant number of iterations. Fully copy upper and
2995 lower bound constraints, not only the constant part of them.
2996 * graphite.h (debug_value): Declared.
2998 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3000 PR tree-optimization/38492
3001 PR tree-optimization/38498
3002 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3003 * tree-chrec.h (scev_is_linear_expression): Declared.
3004 * graphite.c (graphite_cannot_represent_loop_niter): New.
3005 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3006 (graphite_loop_normal_form): Use gcc_assert.
3007 (scan_tree_for_params): Use CASE_CONVERT.
3008 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3009 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3010 Use gcc_assert. Discard scops that contain unhandled cases.
3011 (build_scop_conditions): Return a boolean status for unhandled cases.
3012 (strip_mine_profitable_p): Print the loop number, not its depth.
3013 (is_interchange_valid): Pass the depth of the loop nest, don't
3014 recompute it wrongly.
3015 (graphite_trans_bb_block): Same.
3016 (graphite_trans_bb_block): Print tentative of loop blocking.
3017 (graphite_trans_scop_block): Do not print that the loop has been
3019 (graphite_transform_loops): Do not handle scops that contain condition
3022 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3024 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3025 * testsuite/gcc.dg/graphite/block-1.c: Same.
3026 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3028 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3029 * testsuite/gcc.dg/graphite/block-3.c: New.
3030 * testsuite/gcc.dg/graphite/pr38498.c: New.
3032 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3034 PR tree-optimization/38510
3035 * gcc.dg/graphite/pr38510.c: New.
3036 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3037 (translate_clast): Call recompute_all_dominators before
3039 (gloog): Call recompute_all_dominators before graphite_verify.
3041 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3043 PR tree-optimization/38492
3044 * graphite.c (rename_map_elt, debug_rename_elt,
3045 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3046 rename_map_elt_info, eq_rename_map_elts,
3047 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3048 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3049 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3050 (sese_build_livein_liveouts): New.
3051 (new_sese, free_sese): New.
3052 (new_scop): Call new_sese.
3053 (free_scop): Call free_sese.
3054 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3055 (register_old_new_names): Renamed register_old_and_new_names.
3056 (register_scop_liveout_renames, add_loop_exit_phis,
3057 insert_loop_close_phis, struct igp,
3058 default_liveout_before_guard, add_guard_exit_phis,
3059 insert_guard_phis, copy_renames): New.
3060 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3061 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3062 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3063 (scop_adjust_phis_for_liveouts): New.
3064 (gloog): Call scop_adjust_phis_for_liveouts.
3066 * graphite.h (struct sese): Documented. Added fields liveout,
3068 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3069 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3070 (struct scop): Added field liveout_renames.
3071 (SCOP_LIVEOUT_RENAMES): New.
3073 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3075 PR tree-optimization/38409
3076 * gcc.dg/graphite/pr38409.c: New.
3077 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3079 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3081 * graphite.c (gcc_type_for_cloog_iv): By default return
3083 (graphite_create_new_loop): Don't fold_convert the already
3084 fold_convert-ed expression.
3086 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3088 PR tree-optimization/38446
3089 * gcc.dg/graphite/pr38446.c: New.
3090 * graphite.c (register_bb_in_sese): New.
3091 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3092 looking at the bbs in the region.
3093 * graphite.h (sese): Add region_basic_blocks pointer set to
3094 structure and initialize at the time of defining new scop.
3096 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3098 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3099 (find_params_in_bb): Do not free data refs.
3100 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3102 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3104 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3105 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3106 * testsuite/gcc.dg/graphite/block-5.c: New.
3107 * testsuite/gcc.dg/graphite/block-6.c: New.
3108 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3109 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3110 * testsuite/gcc.dg/graphite/block-2.c: Same.
3112 * graphite.c (struct ivtype_map_elt): New.
3113 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3114 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3115 gcc_type_for_cloog_iv): New.
3116 (loop_iv_stack_patch_for_consts): Use the type of the induction
3117 variable from the original loop, except for the automatically
3118 generated loops, i.e., in the case of a strip-mined loop, in
3119 which case there is no original loop: in that case just use
3121 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3122 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3123 (clast_name_to_gcc): Accept params to be NULL.
3124 (clast_to_gcc_expression): Take an extra parameter for the type.
3125 Convert to that type all the expressions built by this function.
3126 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3127 (graphite_translate_clast_equation): Compute the type of the
3128 clast_equation before translating its LHS and RHS.
3129 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3130 (graphite_create_new_loop): Compute the type of the induction
3131 variable before translating the lower and upper bounds and before
3132 creating the induction variable.
3133 (rename_variables_from_edge, rename_phis_end_scop): New.
3134 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3135 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3136 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3137 compute_cloog_iv_types): New.
3138 (gloog): Call compute_cloog_iv_types before starting the
3139 translation of the clast.
3141 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3142 (GBB_CLOOG_IV_TYPES): New.
3143 (debug_ivtype_map): Declared.
3144 (oldiv_for_loop): New.
3146 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3149 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3150 (param_index): Assert if parameter is not know after parameter
3152 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3153 (find_scop_parameters): Mark, that we have finished parameter
3155 (graphite_transform_loops): Move condition detection before parameter
3157 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3158 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3160 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3162 * graphite.c (graphite_transform_loops): Always call find_transform ()
3163 in ENABLE_CHECKING. So we test these code paths, even if we do not
3166 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3168 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3169 (print_scop): Ditto.
3171 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3174 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3175 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3176 regions more than once.
3178 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3180 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3181 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3184 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3186 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3187 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3188 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3189 (max_precision_type): New.
3190 (value_clast): Removed.
3191 (clast_to_gcc_expression): Be more careful to types of expressions.
3192 Use max_precision_type and update use of gmp_cst_to_tree.
3193 (graphite_translate_clast_equation): Use max_precision_type.
3194 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3195 use the type of the condition.
3196 (graphite_create_new_loop): Do not use integer_type_node, use the
3197 max_precision_type of lb and ub.
3199 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3201 * graphite.c (build_scops_1): Initialize open_scop.exit
3204 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3206 * testsuite/gcc.dg/graphite/pr38084.c: New.
3207 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3208 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3209 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3210 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3211 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3213 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3214 Jan Sjodin <jan.sjodin@amd.com>
3215 Harsha Jagasia <harsha.jagasia@amd.com>
3227 * testsuite/gcc.dg/graphite/pr38073.c: New.
3228 * testsuite/gcc.dg/graphite/pr37928.c: New.
3229 * testsuite/gcc.dg/graphite/pr37883.c: New.
3230 * testsuite/gcc.dg/graphite/pr38125.c: New.
3231 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3232 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3233 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3235 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3236 the number of detected scops. Copy exact same test for loop
3238 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3239 loops to be blocked as reductions are not handled.
3240 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3242 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3243 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3245 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3246 * Makefile.in (graphite.o): Depend on value-prof.h.
3247 (graphite.o-warn): Removed -Wno-error.
3248 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3249 to be a NULL pointer. Call update_stmt. Return the newly created
3250 cannonical induction variable.
3252 * graphite.h (debug_rename_map): Declared. Fix some comments.
3254 * graphite.c: Reimplement the code generation from graphite to gimple.
3255 Include value-prof.h.
3256 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3257 (get_old_iv_from_ssa_name): Removed.
3258 (graphite_stmt_p): New.
3259 (new_graphite_bb): Test for useful statements before building a
3260 graphite statement for the basic block.
3261 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3262 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3264 (recompute_all_dominators, graphite_verify,
3265 nb_reductions_in_loop, graphite_loop_normal_form): New.
3266 (scop_record_loop): Call graphite_loop_normal_form.
3267 (build_scop_loop_nests): Iterate over all the blocks of the
3268 function instead of relying on the incomplete information from
3269 SCOP_BBS. Return the success of the operation.
3270 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3271 (add_bb_domains): Removed.
3272 (build_loop_iteration_domains): Don't call add_bb_domains.
3273 Add the iteration domain only to the basic blocks that have been
3274 translated to graphite.
3275 (build_scop_conditions_1): Add constraints only if the basic
3276 block have been translated to graphite.
3277 (build_scop_data_accesses): Completely disabled until data
3278 dependence is correctly implemented.
3279 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3280 (remove_all_edges_1, remove_all_edges): Removed.
3281 (get_new_name_from_old_name): New.
3282 (graphite_rename_variables_in_stmt): Renamed
3283 rename_variables_in_stmt. Call get_new_name_from_old_name.
3284 Use replace_exp and update_stmt.
3285 (is_old_iv): Renamed is_iv.
3286 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3287 Use replace_exp and update_stmt.
3288 (expand_scalar_variables_expr): Same. Use the map to get the
3289 new names for the renaming of induction variables and for the
3290 renaming of variables after a basic block has been copied.
3291 (expand_scalar_variables): Same.
3292 (graphite_rename_variables): Renamed rename_variables.
3293 (move_phi_nodes): Removed.
3294 (get_false_edge_from_guard_bb): New.
3295 (build_iv_mapping): Do not insert the induction variable of a
3296 loop in the renaming iv map if the basic block does not belong
3298 (register_old_new_names, graphite_copy_stmts_from_block,
3299 copy_bb_and_scalar_dependences): New.
3300 (translate_clast): Heavily reimplemented: copy basic blocks,
3301 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3302 At each translation step call graphite_verify ensuring the
3303 consistency of the SSA, loops and dominators information.
3304 (collect_virtual_phis, find_vdef_for_var_in_bb,
3305 find_vdef_for_var_1, find_vdef_for_var,
3306 patch_phis_for_virtual_defs): Removed huge hack.
3307 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3308 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3309 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3310 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3311 if_region_get_condition_block, if_region_set_false_region,
3312 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3313 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3314 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3315 rewrite_into_sese_closed_ssa): New.
3316 (gloog): Remove dead code. Early return if code cannot be
3317 generated. Call cleanup_tree_cfg once the scop has been code
3319 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3320 block loops with less than two loops.
3321 (graphite_apply_transformations): Remove the call to
3322 scop_remove_ignoreable_gbbs.
3323 (limit_scops): When build_scop_loop_nests fails, continue on
3324 the next scop. Fix open_scop.entry.
3325 (graphite_transform_loops): Call recompute_all_dominators: force the
3326 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3327 Call initialize_original_copy_tables and free_original_copy_tables
3328 to be able to copy basic blocks during code generation.
3329 When build_scop_loop_nests fails, continue on next scop.
3330 (value_clast): New union.
3331 (clast_to_gcc_expression): Fix type cast warning.
3333 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3335 * Merge from mainline (r140838:141727).
3337 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3341 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3343 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3347 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3348 exits and conditions.
3349 * testsuite/gcc.dg/graphite/pr37943.c: New.
3351 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3354 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3356 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3358 * doc/invoke.texi: Fix spaces.
3360 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3362 PR tree-optimization/37891
3363 Reverted last commit.
3364 * graphite.c (create_single_entry_edge): Set
3365 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3367 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3368 Mitul Thakkar <mitul.thakkar@amd.com>
3370 * graphite.c (create_single_entry_edge): Set
3371 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3373 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3375 * doc/invoke.texi: Add -fgraphite-identity.
3376 * graphite.c (graphite_apply_transformations): Check for
3377 -fgraphite-identity.
3378 * toplev.c (process_options): Add flag_graphite_identity.
3379 * tree-ssa-loop.c: Add flag_graphite_identity.
3381 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3383 Undo changes from 2008-10-02:
3384 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3385 operand type when copying the operand to a variable of different type.
3386 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3387 with the IV name after increment.
3389 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3390 Harsha Jagasia <harsha.jagasia@amd.com>
3392 PR tree-optimization/37828
3393 * testsuite/gcc.dg/graphite/pr37828.c: New.
3394 * graphite.c (graphite_trans_loop_block): Do not loop block
3395 single nested loops.
3397 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3398 Sebastian Pop <sebastian.pop@amd.com>
3400 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3401 rename_map_elt_info, eq_rename_map_elts): New.
3402 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3403 (expand_scalar_variables_expr): Change parameters.
3404 (expand_scalar_variables_stmt): Same.
3405 (expand_scalar_variables): Same.
3406 (graphite_rename_ivs): Rename graphite_rename_variables.
3407 (build_iv_mapping): New.
3408 (translate_clast): Call build_iv_mapping.
3409 * graphite.h (gbb_p): New name.
3411 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3413 PR tree-optimization/37684
3414 * gcc.dg/graphite/pr37684.c: New.
3415 * graphite.c (exclude_component_ref): New.
3416 (is_simple_operand): Call exclude_component_ref.
3418 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3419 Harsha Jagasia <harsha.jagasia@amd.com>
3421 PR tree-optimization/37485
3422 * gcc.dg/graphite/block-2.c: New
3423 * graphite.c (gmp_cst_to_tree): Moved.
3424 (iv_stack_entry_is_constant): New.
3425 (iv_stack_entry_is_iv): New.
3426 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3427 (loop_iv_stack_insert_constant): New.
3428 (loop_iv_stack_pop): Use new datatpype.
3429 (loop_iv_stack_get_iv): Same.
3430 (loop_iv_stack_get_iv_from_name): Same.
3431 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3432 (loop_iv_stack_patch_for_consts): New.
3433 (loop_iv_stack_remove_constants): New.
3434 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3435 (translate_clast): Call loop_iv_stack_patch_for_consts and
3436 loop_iv_stack_remove_constants.
3437 (gloog): Use new datatype. Redirect construction edge to end
3438 block to avoid accidental deletion.
3439 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3441 (union iv_stack_entry_data): New. Data in iv stack entry.
3442 (struct iv_stack_entry): New. Datatype for iv stack entries.
3444 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3446 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3447 operand type when copying the operand to a variable of different type.
3449 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3451 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3452 with the IV name after increment.
3454 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3456 * Merge from mainline (r140164:140838).
3458 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3460 * graphite-data-ref.c: New.
3461 * graphite.c (print_scop): Also dump the dependence graph.
3462 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3463 (new_scop): Initialize SCOP_DEP_GRAPH.
3464 (build_scop_dynamic_schedules): New.
3465 (build_access_matrix_with_af): Fixed column numbering.
3466 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3467 * graphite.h: Add ifndef/define guards against multiple inclusion.
3468 (struct scop): Add dep_graph field.
3469 (SCOP_DEP_GRAPH): Defined.
3470 (ref_nb_loops): Fixed and moved to other position.
3471 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3472 (nb_loops_around_loop_in_scop): New.
3473 (graphite_dump_dependence_graph): Declared.
3474 (graphite_build_rdg_all_levels): Declared.
3475 (graphite_test_dependence): Declared.
3476 * Makefile.in (graphite-data-ref.o): New target.
3478 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3480 * Merge from mainline (139870:140164).
3482 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3484 * Merge from mainline (138275:139870).
3485 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3486 the commits from trunk broke the niter detection.
3488 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3490 * graphite.c: Add more documentation. Fix formatting.
3491 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3492 loop_iv_stack_debug): Moved...
3493 (schedule_to_scattering): Move before use.
3494 (dot_all_scops): Include in "#if 0" the code for system
3497 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3498 loop_iv_stack_debug): ...here.
3500 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3502 * tree-phinodes.c (make_phi_node): Extern.
3503 (add_phi_node_to_bb): New.
3504 (create_phi_node): Call add_phi_node_to_bb.
3505 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3506 (remove_statement): Handle case where stored phi was updated
3507 and is no longer the same.
3508 * graphite.c (is_parameter): New.
3510 (expand_scalar_variables_expr): New.
3511 (expand_scalar_variables_stmt): New.
3512 (expand_scalar_variables): New.
3513 (move_phi_nodes): Create new phi instead of moving old one.
3514 (translate_clast): Call expand_scalar_variables.
3515 (find_vdef_for_var_in_bb): Also scan regular definitions.
3516 (skip_phi_defs): New.
3517 (collect_scop_exit_phi_args): New.
3518 (patch_scop_exit_phi_args): New.
3519 (gloog): Patch phis after scop.
3520 * tree-flow.h: (add_phi_node_to_bb): Declared.
3521 (make_phi_node): Declared.
3523 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3525 * graphite.c (end_scop): Split the entry of the scop when it
3526 is the header of the loop in which the scop is ending.
3527 (build_scops_1, limit_scops): Update uses of end_scop.
3529 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3531 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3532 SCOP_ENTRY or SCOP_EXIT.
3534 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3536 * graphite.c (get_construction_edge): Removed.
3537 (gloog): Construction edge is the scop entry edge.
3539 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3541 * graphite.c (can_generate_for_scop): Removed.
3542 (gloog): Do not call it.
3544 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3546 * graphite.c (new_scop): Entry of a scop is an edge.
3547 Initialize SESE region.
3548 (free_scop): Free SESE region.
3549 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3550 (split_difficult_bb): New, split from end_scop.
3551 (end_scop): Exit of a scop is an edge.
3552 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3553 not automatically updated and thus is always wrong.
3554 * graphite.h (struct sese): New.
3557 (struct scop): New field for a SESE region. Remove entry, exit.
3558 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3559 semantics as before. Moved comment around.
3561 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3562 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite.c (graphite_transform_loops): Always enable gloog
3565 and find_transform when ENABLE_CHECKING.
3567 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3569 * graphite.c (graphite_transform_loops): Move pretty printer
3570 of SCOPs before doing any transform. Remove call to print_scops
3571 and dot_all_scops_1.
3573 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3575 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3576 (print_graphite_bb): Same.
3578 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3580 * graphite.c (dot_all_scops_1): Cleanup.
3581 (move_scops): Fix comment.
3583 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3585 * graphite.c (build_scop_bbs): Revert commit 139355:
3587 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3588 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3590 * graphite.c (build_scop_bbs): Factor up code.
3592 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3594 * graphite.c (gloog): Update dominator info.
3596 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3598 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3600 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3602 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3604 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3605 (translate_clast): Correct formatting.
3606 * graphite.h (struct num_map): Removed.
3607 (struct graphite_bb): Remove num_map field.
3608 (GBB_INDEX_TO_NUM_MAP): Removed.
3610 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3612 * graphite.c (build_access_matrix_with_af): Fix comments.
3613 (build_scop_data_accesses): Same.
3615 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3617 * graphite.c (build_scop_data_accesses): Don't construct
3618 access matrices. Add a FIXME and an assert condition that
3619 should pass when the access matrices will be needed.
3621 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3623 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3625 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3626 Moved close by free_graphite_bb.
3627 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3628 (new_scop): Move close by free_scop.
3629 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3631 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3633 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3634 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3635 instead of recursive call.
3636 (graphite_translate_clast_equation): New.
3637 (graphite_create_guard_cond_expr): New.
3638 (graphite_create_new_guard): New.
3639 (get_stack_index_from_iv): Removed.
3640 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3641 (get_true_edge_from_guard_bb): New.
3642 (translate_clast): Handle stmt_guard in clast.
3643 (get_construction_edge): Allow construction edge detection for
3644 a scope entry with multiple predecessors if one predecessor is
3645 the immediate dominator of scope entry.
3646 (can_generate_code_stmt): Enable code generation for clast_guard.
3647 (gloog): Use correct context loop. Removed check for post dominators.
3648 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3650 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3652 * graphite.c (remove_dead_loops): Document better which
3655 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3657 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3659 (graphite.o): Also depends on pointer-set.h.
3661 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3663 * graphite.c (scop_record_loop): Fix compile warning.
3665 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3666 Sebastian Pop <sebastian.pop@amd.com>
3668 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3670 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3672 * graphite.c (build_graphite_bb): Initialize bb->aux to
3673 point to the graphite_bb_p.
3674 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3676 (add_bb_domains): Does not use the scop parameter.
3677 (graphite_transform_loops): Clean bb->aux at the end.
3679 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3680 Sebastian Pop <sebastian.pop@amd.com>
3682 * testsuite/lib/target-supports.exp
3683 (check_effective_target_fgraphite): New.
3685 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3686 check_effective_target_fgraphite returns false.
3687 Set dg-do-what-default to compile.
3688 (scan-graphite-dump-times): Removed.
3689 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3691 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3692 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3693 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3694 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3695 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3696 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3697 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3698 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3699 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3700 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3701 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3702 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3703 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3704 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3705 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3706 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3707 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3708 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3709 * testsuite/gcc.dg/graphite/block-0.c: Same.
3710 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3711 * testsuite/gcc.dg/graphite/block-1.c: Same.
3712 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3713 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3714 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3715 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3716 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3718 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3720 * graphite.c: Fix some XXX comments.
3721 (build_scop_dynamic_schedules): Removed.
3723 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3725 * graphite.h (scop_max_loop_depth): Moved...
3726 * graphite.c (scop_max_loop_depth): ...here.
3727 (remove_all_edges_1): New.
3728 (remove_all_edges): Factored code.
3729 (remove_cond_exprs): Check only the last statement for
3730 a GIMPLE_COND expression.
3732 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3734 * graphite.c (scan_tree_for_params): Early return when the
3735 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3736 (find_scop_parameters): Factor out code.
3737 (graphite_trans_bb_strip_mine): Remove dead code.
3739 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3741 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3742 graphite_trans_bb_move_loop): Factor asserts.
3743 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3744 Do not call calculate_dominance_info and estimate_bb_frequencies.
3746 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3748 * graphite.c (create_loops_mapping, free_loops_mapping,
3749 create_loops_mapping_num, debug_loop_mapping_1,
3750 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3751 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3752 graphite_loops_mapping_add_child_num,
3753 graphite_loops_mapping_insert_child,
3754 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3755 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3756 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3757 create_num_from_index, get_num_from_index,
3758 swap_loop_mapped_depth): Removed.
3759 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3760 (free_scop): Do not call free_loops_mapping.
3761 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3762 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3763 get_loop_mapped_depth.
3764 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3765 (graphite_trans_bb_strip_mine): Same.
3766 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3767 (struct scop): Remove field loops_mapping.
3769 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3770 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3772 * graphite.c (scop_record_loop): Factor out one level of the
3773 condition by early return.
3774 (build_scop_loop_nests): Format following FSF coding style.
3775 (build_scop_dynamic_schedules): Factor out code.
3776 (scopdet_bb_info): Reindent. Default case should not be reachable.
3778 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3779 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3781 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3782 assignments that are not handled as simple operands for now.
3784 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3785 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3787 * graphite.c (build_scop_bbs): Factor up code.
3789 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3790 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3792 * graphite.c (stmt_simple_for_scop_p): Factor code out
3794 (enum gbb_type): New. Group all the GBB_* types under it.
3795 (is_loop_exit): Moved...
3796 (end_scop): Enable BB spliting.
3797 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3798 * cfgloop.h (is_loop_exit): Declared.
3800 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3802 * doc/invoke.texi: Remove strides from examples containing
3803 DO loops when the strides are equal to 1.
3805 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3806 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3808 * graphite.c (graphite_trans_scop_block): Or the result with
3809 the result from graphite_trans_loop_block.
3810 * testsuite/gcc.dg/graphite/block-1.c: New.
3811 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3812 * testsuite/gfortran.dg/graphite/block-2.f: New.
3814 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3816 * graphite.c (graphite_transform_loops): Call cloog_initialize
3819 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3821 * tree-data-ref.c) (stmt_simple_memref_p): New.
3822 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3823 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3824 (is_simple_operand): Call stmt_simple_memref_p.
3826 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3827 using pointer arithmetic, as this is optimized by PRE and
3828 makes the code too difficult to analyze.
3830 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3832 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3834 * gdbinit.in (pgg): New.
3836 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3838 * graphite.c (graphite_trans_loop_block): Fix warning.
3840 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3842 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3844 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3846 * graphite.c (graphite_trans_bb_block): Remove check for
3847 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3848 Check if loop blocking is profitable for every loop, before applying
3850 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3851 if flag_loop_block is set.
3853 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3855 * graphite.c: Add some more documentation for the loop
3858 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3860 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3861 * graphite.c: Format on less than 80 columns.
3864 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3866 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3868 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3870 * doc/invoke.texi (floop-block, floop-strip-mine,
3871 floop-interchange): Update documentation with examples.
3873 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3875 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3877 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3879 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3881 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3882 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3883 * tree-scalar-evolution.c: Revert useless changes.
3884 * tree-phinodes.c: Same.
3887 * tree-vectorizer.h: Same.
3888 * tree-flow.h: Same.
3890 * common.opt (fgraphite): Update documentation.
3892 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3894 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3895 -floop-interchange): Add more text for explaining what each of these
3897 * tree-into-ssa.c (gimple_vec): Moved to...
3898 * graphite.c: Include gimple.h.