1 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
5 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
7 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
8 so don't pass a pointer to it.
9 (build_alias_set_for_drs): Same.
10 (build_base_obj_set_for_drs): Same.
11 (build_scop_drs): Same.
13 2009-09-26 Li Feng <nemokingdom@gmail.com>
15 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
16 the alias graph of data references.
18 2009-09-25 Li Feng <nemokingdom@gmail.com>
20 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
21 (build_scop_drs): When debugging, write the alias graph to file,
22 otherwise, should be disabled.
24 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
26 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
27 (is_simple_operand): Remove call to stmt_simple_memref_p.
28 (stmt_simple_for_scop_p): Update call to is_simple_operand.
30 2009-09-17 David Edelsohn <edelsohn@gnu.org>
32 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
33 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
34 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
35 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
36 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
38 2009-09-17 Li Feng <nemokingdom@gmail.com>
41 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
42 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
43 (graphite_carried_dependence_level_k): Ditto.
44 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
45 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
46 (new_poly_dr): Adjust declaration.
47 * graphite-sese-to-poly.c (free_data_refs_aux): New.
48 (free_gimple_bb): Added free_data_refs_aux.
49 (build_poly_dr): Add dr_base_object_set.
50 (partition_drs_to_sets): New.
51 (dr_same_base_object_p): New.
52 (build_alias_set_for_drs): New.
53 (build_base_object_set_for_drs): New.
54 (build_scop_drs): Add build_base_obj_set_for_drs.
55 * graphite-sese-to-poly.h: Added #define for alias set number index and
56 base object set index.
57 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
58 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
60 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
62 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
63 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
65 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
67 * graphite-sese-to-poly.c (struct irp_data): Removed.
68 (idx_record_params): Removed.
69 (find_params_in_bb): Scan for parameters the access functions; don't
70 parse the tree representation.
72 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
74 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
75 passes at -O1 and below.
77 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
79 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
80 tree-scalar-evolution.h, and then tree-data-ref.h.
81 * graphite-clast-to-gimple.c: Same.
82 * graphite-dependences.c: Same.
83 * graphite-interchange.c: Same.
84 * graphite-poly.c: Same.
85 * graphite-scop-detection.c: Same.
86 * graphite-sese-to-poly.c: Same.
88 * lambda-code.c: Same.
89 * matrix-reorg.c: Same.
90 * tree-data-ref.c: Same.
91 * tree-if-conv.c: Same.
92 * tree-loop-distribu: Same.: Same.
93 * tree-loop-linear.c: Same.
94 * tree-parloops.c: Same.
95 * tree-predcom.c: Same.
96 * tree-vect-patterns.c: Same.
98 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
100 Partially revert the previous patch, except the following.
101 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
102 as parameters the operands of the not expression.
104 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
106 * tree-scalar-evolution.c (instantiate_scev_assign): New.
107 Do not call analyze_scalar_evolution on assignments.
108 (instantiate_scev_phi): Call analyze_scalar_evolution.
109 (instantiate_scev_name): Call instantiate_scev_assign and
110 instantiate_scev_phi.
111 (instantiate_scev_not): Adapted to pass as parameters the operands
112 of the not expression.
114 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
116 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
117 to pass as parameters the operands of the binary expression.
119 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
121 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
122 instantiate_scev_not. Handle NEGATE_EXPR.
123 (instantiate_scev_r): Handle NEGATE_EXPR.
125 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
127 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
129 (instantiate_scev_r): Move code in instantiate_scev_2
130 and instantiate_scev_1.
132 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
134 * tree-scalar-evolution.c (instantiate_scev_3): New.
135 (instantiate_scev_1): Move code in instantiate_scev_3.
137 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
139 * tree-scalar-evolution.c (instantiate_scev_poly): New.
140 (instantiate_scev_1): Move code in instantiate_scev_poly.
142 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
144 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
145 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
147 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
149 * tree-scalar-evolution.c (instantiate_scev_convert): New.
150 (instantiate_scev_1): Move code in instantiate_scev_convert.
152 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
154 * tree-scalar-evolution.c (instantiate_scev_binary): New.
155 (instantiate_scev_1): Move code in instantiate_scev_binary.
157 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
159 * tree-scalar-evolution.c (instantiate_scev_name): New.
160 (instantiate_scev_1): Move code in instantiate_scev_name.
162 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
164 * Merge from mainline (150992:151171).
166 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
168 * graphite-dependences.c (graphite_legal_transform_bb): Call
169 pbb_remove_duplicate_pdrs.
170 * graphite-poly.c (can_collapse_pdr): Removed.
171 (pdr_find_duplicate): Removed.
172 (can_collapse_pdrs): New.
173 (pbb_remove_duplicate_pdrs): New.
174 (new_poly_dr): Do not look for duplicates.
175 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
176 (PBB_PDR_DUPLICATES_REMOVED): New.
177 (pbb_remove_duplicate_pdrs): Declared.
179 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
181 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
182 the strides by multiplying by PDR_NB_REFS.
183 * graphite-poly.c (can_collapse_pdr): New.
184 (pdr_find_duplicate): New.
185 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
186 Initialize PDR_NB_REFS.
187 * graphite-poly.h (struct poly_dr): Add field nb_refs.
189 (new_poly_dr): Number of subscripts is a graphite_dim_t.
191 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
193 Revert one of the previous commits:
194 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
195 the computation of symmetric data dependence relations.
196 (dependency_between_pbbs_p): Same.
198 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
201 * graphite-poly.c (apply_poly_transforms): Remove legality test before
204 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
206 * graphite-dependences.c (pddr_original_scattering): Return NULL
207 for read-read dependence relations.
208 * graphite-poly.h (enum poly_dr_type): Fix comment.
211 (pdr_may_write_p): New.
213 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
216 (struct poly_dr): Same.
218 * graphite-poly.c (new_poly_dr): Same.
220 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
221 Sebastian Pop <sebastian.pop@amd.com>
223 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
224 pbb_strip_mine_time_depth. Changed the implementation so that
225 transformation is expressed as a transformation on
226 time (scatttering) dimensions. Also, ensures that the 2d+1
227 scheduling format is preserved.
228 (pbb_strip_mine_profitable_p): Profitability is based on the
229 iteration number of a given time (scattering) dimension,
230 and not on a original loop depth dimension.
231 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
232 (pbb_do_strip_mine): Call psct_dynamic_dim.
233 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
234 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
235 (pbb_nb_dynamic_scattering_transform): New.
236 (psct_dynamic_dim): New.
238 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
240 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
241 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
242 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
243 * graphite-interchange.c (build_linearized_memory_access): Same.
244 (memory_stride_in_loop): Same.
246 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
248 * graphite-dependences.c (pddr_original_scattering): New.
249 (graphite_legal_transform_dr): Call pddr_original_scattering.
252 * graphite-dependences.h (dot_deps): Declared.
253 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
254 (print_pdr): Print PDR_ID.
255 * graphite-poly.h (struct poly_dr): Add field id.
258 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
260 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
262 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
263 not delete the original dependence relation.
265 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
267 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
268 the computation of symmetric data dependence relations.
269 (dependency_between_pbbs_p): Same.
271 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
273 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
274 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
275 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
276 (free_poly_ddr): New.
277 (pddr_is_empty): New.
278 (dependence_polyhedron_1): Now returns a poly_ddr_p.
279 (dependence_polyhedron): Same. Remove useless gcc_assert.
281 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
282 (graphite_carried_dependence_level_k): Call pddr_is_empty.
283 * graphite-dependences.h (enum poly_dependence_kind): New.
284 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
285 (PDRP_SOURCE): Renamed PDDR_SOURCE.
286 (PDRP_SINK): Renamed PDDR_SINK.
287 (PDRP_DDP): Renamed PDDR_DDP.
289 (free_poly_ddr): Declared.
290 * graphite-poly.c (new_scop): Use the new hash function names.
291 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
293 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
295 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
297 * Merge from mainline (150764:150992).
299 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
301 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
302 bounds with LT_EXPR to make niter analysis more precise on code
303 generated by Graphite.
305 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
307 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
308 (graphite_legal_transform_bb): Same.
309 (poly_drs_may_alias_p): Same.
311 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
314 * graphite-ppl.c (ppl_max_for_le): Correct the use of
315 ppl_Pointset_Powerset_C_Polyhedron_maximize.
317 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
319 * graphite-poly.c (print_pbb): Print PBB index.
321 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
323 * Merge from mainline (r150672:150764).
325 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
327 * graphite-interchange.c (ppl_max_for_le): Moved...
328 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
329 * graphite-ppl.c (ppl_max_for_le): ... here.
330 * graphite-ppl.h (ppl_max_for_le): Declared.
332 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
334 * Merge from mainline (r150372:150672).
336 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
339 * sese.c (convert_for_phi_arg): New.
340 (add_guard_exit_phis): Use convert_for_phi_arg.
342 * testsuite/gfortran.dg/graphite/id-17.f: New.
344 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
346 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
347 unknown subscript upper bounds.
349 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
351 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
352 Pranav Garg <pranav.garg2107@gmail.com>
354 * graphite-interchange.c (gather_access_strides): Removed.
355 (ppl_max_for_le): New.
356 (build_linearized_memory_access): New.
357 (memory_stride_in_loop): New.
358 (pbb_interchange_profitable_p): Reimplemented.
359 * graphite-ppl.h (ppl_new_id_map): New.
360 (ppl_interchange): New.
362 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
364 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
366 * graphite-interchange.c (compute_subscript): Removed.
367 (compute_array_size_cstr): Removed.
368 (compute_array_size_poly): Removed.
369 (compute_array_size): Removed.
370 (gather_access_strides_poly): Removed.
371 (gather_access_strides): Empty.
373 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
375 * graphite-dependences.c (dependence_polyhedron_1): Replace
376 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
377 (graphite_legal_transform_dr): Same.
378 (graphite_carried_dependence_level_k): Same.
379 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
380 Initialize PDR_NB_SUBSCRIPTS.
381 (print_pdr_access_layout): Replace pdr_nb_subscripts with
383 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
384 (PDR_NB_SUBSCRIPTS): New.
385 (pdr_nb_subscripts): Removed.
386 (pdr_dim): Simplified.
387 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
388 with PDR_NB_SUBSCRIPTS.
390 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
392 * graphite-interchange.c (compute_array_size): Remove use of
394 * graphite-poly.c (new_poly_dr): Remove argument data_container.
395 Do not initialize PDR_DATA_CONTAINER.
396 (print_pdr): Do not print PDR_DATA_CONTAINER.
397 * graphite-poly.h (struct poly_dr): Remove data_container field.
398 (PDR_DATA_CONTAINER): Removed.
399 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
401 (build_poly_dr): Same.
403 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
405 * testsuite/gcc.dg/graphite/interchange-9.c: New.
407 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
408 Sebastian Pop <sebastian.pop@amd.com>
410 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
411 copy of the dependence polyhedron. Free the temporary objects.
412 (graphite_carried_dependence_level_k): Free unused objects before
415 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
416 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
417 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
418 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
419 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
421 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
423 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
424 Early return without analyzing the data dependences if no
425 transform has been done. Call restore_scattering if the transform
427 (graphite-interchange.c): Same.
428 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
429 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
430 (apply_poly_transforms): Do not gcc_assert that
431 the transform is legal.
432 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
433 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
434 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
435 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
436 * graphite-poly.h (struct poly_scattering): New.
437 (struct poly_bb): Add original, transformed, and saved fields.
438 Remove transformed_scattering, original_scattering, nb_local_variables,
439 and nb_scattering_transform fields.
440 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
441 (poly_scattering_new): New.
442 (poly_scattering_free): New.
443 (poly_scattering_copy): New.
444 (store_scattering_pbb): New.
445 (store_scattering): New.
446 (restore_scattering_pbb): New.
447 (restore_scattering): New.
448 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
449 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
451 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
453 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
456 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
458 * Makefile.in (graphite.o): Depends on PREDICT_H.
459 * graphite.c: Include predict.h.
460 (graphite_finalize): Call tree_estimate_probability.
461 * predict.c (predict_loops): Do not call scev_initialize and
463 (tree_estimate_probability_bb): New.
464 (tree_estimate_probability): Do not initialize loops: move that
465 code to the driver. Call tree_estimate_probability_bb.
466 (tree_estimate_probability_driver): New.
467 (pass_profile): Use tree_estimate_probability_driver.
468 * predict.h (tree_estimate_probability): Declared.
470 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
472 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
473 * graphite-dependences.c (graphite_legal_transform): Add time to
474 TV_GRAPHITE_DATA_DEPS.
475 (dependency_between_pbbs_p): Same.
476 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
478 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
480 * Merge from mainline (r149952:150372).
482 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
484 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
485 * graphite-blocking.c: Same.
486 * graphite-clast-to-gimple.c: Same.
487 * graphite-dependences.c: Same.
488 * graphite-poly.c: Same.
489 * graphite-poly.h: Same.
490 * graphite-ppl.c: Same.
491 * graphite-scop-detection.c: Same.
492 * graphite-sese-to-poly.c: Same.
495 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
497 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
498 (remove_simple_copy_phi): New.
499 (remove_invariant_phi): New.
500 (simple_copy_phi_p): New.
501 (reduction_phi_p): New.
502 (gsi_for_ssa_name_def): New.
503 (insert_out_of_ssa_copy): New.
504 (insert_out_of_ssa_copy_on_edge): New.
505 (create_zero_dim_array): New.
506 (scalar_close_phi_node_p): New.
507 (rewrite_close_phi_out_of_ssa): New.
508 (rewrite_phi_out_of_ssa): New.
509 (rewrite_reductions_out_of_ssa): New.
510 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
512 * testsuite/gcc.dg/graphite/id-11.c: New.
513 * testsuite/gcc.dg/graphite/id-15.c: New.
514 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
515 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
516 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
517 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
518 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
519 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
520 * testsuite/gfortran.dg/graphite/id-13.f: New.
521 * testsuite/gfortran.dg/graphite/id-5.f: New.
523 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
525 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
526 check that nb_reductions_in_loop is zero.
527 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
529 (nb_reductions_in_loop): Removed.
530 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
531 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
532 (bb_contains_non_iv_scalar_phi_nodes): Removed.
533 (scop_contains_non_iv_scalar_phi_nodes): Removed.
534 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
536 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
538 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
539 statements that have an empty iteration domain.
540 * testsuite/gfortran.dg/graphite/id-16.f: New.
542 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
544 * tree-scalar-evolution.c (instantiate_scev_1): Return
545 chrec_dont_know when the result is not above instantiate_below.
546 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
547 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
548 the tree has a known scalar evolution.
549 * testsuite/gfortran.dg/graphite/id-14.f: New.
550 * testsuite/gfortran.dg/graphite/id-15.f: New.
552 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
554 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
556 (rename_variables): Keep inserting renames after the ones already
559 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
561 * graphite-sese-to-poly.c (compare_bb_depths): New.
562 (graphite_sort_dominated_info): New.
563 (build_scop_bbs_1): Call graphite_sort_dominated_info.
564 (build_scop_scattering): Fix comment.
566 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
568 * graphite.c (graphite_finalize): Call print_loops instead of
569 dump_function_to_file.
570 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
571 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
572 loops generated in the graphite output file.
573 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
574 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
575 * testsuite/gfortran.dg/graphite/id-12.f: New.
577 2009-07-24 Li Feng <nemokingdom@gmail.com>
579 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
582 2009-07-24 Li Feng <nemokingdom@gmail.com>
583 Tobias Grosser <grosser@fim.uni-passau.de>
585 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
586 alias set number build alias in ACCESSES polyhedron.
587 (build_alias_set_for_drs): New.
588 (build_pbb_drs): Added build_alias_set_for_drs.
589 * graphite-dependences.c (poly_drs_may_alias_p): New.
590 (graphite_carried_dependence_level_k): Check alias information
591 before building polyhedron.
593 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
595 * Makefile.in (lambda-code.o): Fix formatting.
597 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
599 * Merge from mainline (r149350-149952)
601 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
603 * graphite-poly.c (apply_poly_transforms): Move strip_mine
604 before interchange to prepare for loop blocking.
606 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
608 * graphite-poly.c (apply_poly_transforms): Add checks after every
610 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
611 done in apply_poly_transforms.
613 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
615 * graphite-dependences.c (build_lexicographically_gt_constraint):
616 Replace RES parameter with *RES.
617 (dependence_polyhedron_1): Pass an address of the parameter RES
618 instead of value of RES.
620 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
622 * graphite.c (graphite_finalize): Fix comment.
623 (graphite_transform_loops): Reset scev info after code generation
626 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
628 * graphite.c (graphite_finalize): Call scev_reset.
630 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
632 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
633 GBB_CLOOG_IV_TYPES hash table twice.
634 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
635 (add_condition_to_domain): Clear GMP values.
637 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
639 * graphite-dependences.c: Fix formatting.
640 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
641 (pbb_number_of_iterations): Free ppl_Linear_Expression.
642 * graphite-sese-to-poly.c: Fix formatting.
643 * graphite.c (graphite_transform_loops): Create the hash table
644 after the early return.
646 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
648 * testsuite/gcc.dg/graphite/id-14.c: New.
649 * testsuite/gcc.dg/graphite/pr40157.c: New.
650 * testsuite/gfortran.dg/graphite/id-11.f: New.
652 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
654 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
655 (build_poly_scop): Return false when there are no pbbs within
656 loops to avoid to pass to cloog scops with no loops.
658 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
660 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
661 useless test "i % 2".
662 (build_pbb_scattering_polyhedrons): Fix formatting.
663 (build_poly_dr): Same.
664 * graphite.c (graphite_transform_loops): Restructure.
666 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
668 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
669 reduction_list parameter.
670 (rewrite_all_phi_nodes_with_iv): Same.
671 (canonicalize_loop_ivs): Same.
672 * tree-parloops.c (struct brli): Removed.
673 (build_reduction_list_info): Removed.
674 (build_new_reduction): New.
675 (analyze_reduction_list): Removed.
676 (gather_scalar_reductions): Find reductions instead of phi
677 nodes that can't be canonicalized.
678 (try_create_reduction_list): Remove reduction_list parameter.
679 (gen_parallel_loop): Same.
680 (parallelize_loops): Remove analyze_reductions variable,
681 initialization and free.
682 Change reduction_list htab initialization to reduction_info
683 elements instead of ssa names.
684 Call try_create_reduction_list and gen_parallel_loop without
685 analyzed_reduction argument.
686 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
687 canonicalize_loop_ivs with one less argument.
688 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
690 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
692 * graphite-dependences.c (new_poly_dr_pair): New.
693 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
694 (new_poly_dr_pair): New.
695 (eq_poly_dr_pair_p): New.
696 (hash_poly_dr_pair_p): New.
697 * graphite-dependences.h (struct poly_dr_pair): New.
698 (eq_poly_dr_pair_p): Declared.
699 (hash_poly_dr_pair_p): Declared.
700 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
701 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
702 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
703 * Makefile.in (graphite-poly.o): Add dependence on
704 graphite-dependences.h.
706 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
708 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
709 polynomials of degree > 1 pass to Graphite.
710 * tree-chrec.c (scev_is_linear_expression): Call
711 evolution_function_is_affine_multivariate_p.
712 * testsuite/gfortran.dg/graphite/id-10.f90: New.
714 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
716 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
717 Instantiate scevs varying in outer loops.
718 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
720 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
722 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
723 redundant constraint.
725 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
727 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
728 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
729 based on the file names as in the C testsuite.
730 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
731 * testsuite/gfortran.dg/graphite/block-2.f: Same.
732 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
733 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
734 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
735 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
736 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
737 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
738 * testsuite/gfortran.dg/graphite/id-6.f: Same.
739 * testsuite/gfortran.dg/graphite/id-9.f: Same.
740 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
741 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
742 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
744 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
746 * sese.c (expand_scalar_variables_call): New.
747 (expand_scalar_variables_ssa_name): Handle calls in expander.
749 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
751 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
752 Expect to see the pattern twice.
753 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
754 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
755 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
757 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
759 * testsuite/gcc.dg/graphite/id-10.c: New.
760 * testsuite/gcc.dg/graphite/id-12.c: New.
761 * testsuite/gfortran.dg/graphite/id-7.f: New.
762 * testsuite/gfortran.dg/graphite/id-8.f: New.
764 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
766 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
769 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
771 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
773 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
775 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
777 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
779 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
780 building PDR subscripts.
782 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
784 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
785 computation of array sizes.
787 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
789 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
791 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
793 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
794 build_pairwise_constraint, dr_equality_constraints,
795 build_pairwise_scheduling_equality,
796 build_pairwise_scheduling_inequality, lexicographically_gt_p,
797 build_lexicographically_gt_constraint, dependence_polyhedron,
798 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
799 Move from NNC_Polyhedron to C_Polyhedron.
800 * graphite-interchange.c (compute_array_size_poly,
801 gather_access_strides): Dito.
802 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
803 free_scop, pbb_number_of_iterations): Dito.
804 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
805 pbb_dim_iter_domain, struct scop): Dito.
806 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
807 new_Cloog_Domain_from_ppl_Polyhedron,
808 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
809 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
810 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
811 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
812 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
813 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
814 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
815 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
816 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
817 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
818 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
819 build_scop_iteration_domain, build_poly_dr): Dito
821 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
823 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
825 * testsuite/gcc.dg/graphite/run-id-1.c: New.
827 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
829 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
830 positivity constraint on the symbolic number of iterations.
832 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
834 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
836 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
837 Tobias Grosser <grosser@fim.uni-passau.de>
839 * graphite-clast-to-gimple.c (build_scop_context): Removed.
840 (build_cloog_prog): Directly use SCOP_CONTEXT.
841 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
842 (free_scop): Free SCOP_CONTEXT.
843 (print_scop_context): New.
844 (print_scop): Call print_scop_context.
845 (debug_scop_context): New.
846 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
847 (struct scop): Added field context.
849 * graphite-sese-to-poly.c (add_param_constraints): New.
850 (build_scop_context): New.
851 (build_poly_scop): Call build_scop_context.
853 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
855 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
856 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
857 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
858 * graphite-ppl.h: Include double-int.h and tree.h.
859 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
860 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
861 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
862 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
864 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
866 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
867 POINTER_PLUS_EXPR for pointer types.
868 (clast_to_gcc_expression): Same.
870 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
872 * graphite-poly.c (print_scattering_function): Early return when
873 PBB_TRANSFORMED_SCATTERING is not initialized.
874 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
876 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
878 * tree-parloops.c (analyze_reduction_list): Remove unused variable
881 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
883 * tree-parloops.c (analyze_reduction_list): Change return
885 (try_create_reduction_list): Move the call to
886 analyze_reduction_list to the beginining.
887 Call reduction_phi with analyzed_reductions as argument
888 instead of reduction_list.
890 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
892 * Merge from mainline (r148296:149346)
894 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
896 * graphite-scop-detection.c (graphite_can_represent_init): New.
897 (graphite_can_represent_scev): Call graphite_can_represent_init:
898 check that the initial value does not contain multiplications of
900 (stmt_has_simple_data_refs_p): New.
901 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
902 (is_simple_operand): Fix formatting.
903 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
905 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
907 * testsuite/gcc.dg/graphite/id-13.c: New.
908 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
909 analyze_scalar_evolution, use scalar_evolution_in_region.
910 (scan_tree_for_params_right_scev): Add extra assert.
911 (parameter_index_in_region_1): Split from parameter_index_in_region.
912 (idx_record_params): Use scalar_evolution_in_region.
913 (find_params_in_bb): Same.
914 (find_scop_parameters): Same.
915 (build_loop_iteration_domains): Same.
916 (create_linear_expr_from_tree): Same.
917 * sese.c (scalar_evolution_in_region): New.
918 * sese.h (scalar_evolution_in_region): Declared.
919 (defined_in_sese_p): New.
920 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
922 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
925 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
927 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
928 TREE_DATA_REF_H also implies SCEV_H.
930 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
932 * graphite-poly.c (print_scop_params): New.
933 (print_scop): Call print_scop_params.
934 (debug_scop_params): New.
935 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
937 2009-07-07 Li Feng <nemokingdom@gmail.com>
939 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
940 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
941 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
942 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
943 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
944 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
946 2009-07-07 Li Feng <nemokingdom@gmail.com>
948 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
949 for dependency checking part.
950 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
951 tests for dependency checking.
952 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
953 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
954 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
955 flag -fdump-tree-graphite-all for autopar testsuites.
957 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
959 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
960 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
961 canonicalize_loop_ivs): Moved...
962 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
964 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
966 * tree-parloops.c (try_create_reduction_list): Pass an extra
967 argument analyzed_reductions. Call analyze_reduction_list.
968 (gen_parallel_loop): Do not call analyze_reduction_list.
969 (parallelize_loops): Init and finalize analyzed_reductions.
971 2009-07-06 Li Feng <nemokingdom@gmail.com>
973 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
974 Added flag -fno-loop-strip-mine for autopar testcase.
976 2009-07-04 Li Feng <nemokingdom@gmail.com>
978 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
979 transformed scattering dimension instead of unmatch orignal when
980 calling dependence_polyhedron.
982 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
984 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
986 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
988 * graphite-poly.c (pbb_number_of_iterations): Check for returned
989 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
991 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
993 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
994 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
995 * graphite-poly.c (pbb_number_of_iterations): New.
996 * graphite-poly.h (pbb_number_of_iterations): Declared.
997 (pbb_iterator_dim, pbb_parameter_dim): New.
999 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1001 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1002 last commit on type of lower and upper bound of loops.
1004 2009-06-29 Li Feng <nemokingdom@gmail.com>
1006 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1007 graphite-dependences.h.
1008 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1009 (mark_bb_with_pbb): New.
1010 (get_stmtfor_depth): New.
1011 (find_pbb_via_hash): New.
1012 (dependency_in_loop_p): New.
1013 (mark_loops_parallel): New.
1014 (free_aux_in_new_loops): New.
1015 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1016 bb with it's relevant pbb. Mark newly created loops. Remove mark
1017 innermost loop parallel without checking.
1018 (gloog): Add parameter BB_PBB_MAPPING.
1019 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1020 (gloog): Change declaration.
1021 (mark_loop_parallel): Make extern.
1022 (free_aux_in_new_loops): Declare.
1023 (bb_pbb_map_hash): New.
1024 (eq_bb_pbb_map): New.
1025 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1026 auto parallelization when flag_graphite_force_parallel is set.
1027 (graphite_finalize): Added free_aux_in_new_loops.
1028 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1029 the innermost loop that marked parallel. Use
1030 flag_graphite_force_parallel instead of loop->can_be_parallel.
1031 (loop_parallel_p): Move inner most checking out of function.
1033 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1035 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1036 type of lower and upper bound of loops signed long int.
1038 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1040 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1041 expression outside the loop.
1043 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1045 * gcc.dg/graphite/interchange-8.c: New.
1047 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1049 * gcc.dg/graphite/interchange-0.c: XFailed.
1050 * gcc.dg/graphite/interchange-5.c: XFailed.
1051 * gcc.dg/graphite/interchange-6.c: XFailed.
1053 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1055 * graphite-interchange.c (compute_array_size_poly): The end of the
1056 recursion should return 1.
1058 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1060 * graphite-interchange.c (compute_array_size_cstr): Allow the
1061 subscript multiplier to be -1.
1062 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1063 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1064 data_container. Initializes PDR_DATA_CONTAINER.
1065 (print_pdr_access_layout): New.
1066 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1067 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1069 (PDR_DATA_CONTAINER): New.
1070 (new_poly_dr): Update declaration.
1071 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1072 (build_poly_dr): Call pdr_add_data_dimensions.
1074 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1076 * graphite-poly.h (struct poly_dr): Fix comment.
1077 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1078 (pdr_add_memory_accesses): New.
1079 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1081 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1083 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1084 (print_pbb): Add call to print_pdrs.
1085 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1087 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1088 Li Feng <nemokingdom@gmail.com>
1090 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1091 (dependency_between_pbbs_p): New.
1092 (lexicographically_gt_p): Assure !empty_p before polyhedron
1093 intersection assign.
1094 (build_lexicographically_gt_constraint): Correct lexicographically
1096 * graphite-dependences.h: New.
1097 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1099 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1101 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1102 (gloog): Print to dump_file the generated clast.
1103 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1104 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1106 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1108 * graphite-poly.c (extend_scattering): Increment
1109 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1111 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1113 * graphite-interchange.c (compute_array_size_poly): Added exit of
1114 recursion condition. Continue iterating even after the first equality.
1115 (compute_array_size): Same.
1117 2009-06-24 Li Feng <nemokingdom@gmail.com>
1119 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1120 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1121 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1122 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1123 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1125 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1127 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1128 only when the use verifies is_gimple_reg.
1130 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1132 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1133 Allocate scaldims after call to unify_scattering_dimensions.
1135 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1137 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1139 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1140 Albert Cohen <albert.cohen@inria.fr>
1142 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1143 variables for the strip mining.
1145 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1146 Pranav Garg <pranav.garg2107@gmail.com>
1148 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1149 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1150 (graphite-blocking.o): New rule.
1151 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1152 * graphite-blocking.c: New.
1153 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1154 flag_loop_strip_mine.
1155 (psct_scattering_dim_for_loop_depth): New.
1156 * graphite-poly.h (scop_do_strip_mine): Declared.
1157 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1158 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1159 flag_loop_strip_mine.
1161 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1163 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1164 a GMP value and a PPL coefficient at each iteration of a loop.
1166 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1168 * graphite-dependences.c (dependence_polyhedron): Do not use
1169 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1170 pbb_nb_scattering_transform.
1171 (graphite_legal_transform_dr): Same.
1172 * graphite-poly.c (extend_scattering): Same.
1173 (unify_scattering_dimensions): Same.
1174 (print_scattering_function): Same.
1175 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1176 PBB_NB_LOCAL_VARIABLES.
1177 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1178 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1179 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1180 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1181 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1182 (pbb_nb_scattering_transform): New.
1183 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1184 (psco_scattering_dim): Add assert on parameters.
1185 (psct_scattering_dim): Same.
1186 (psct_scattering_dim_for_loop_depth): Declared.
1187 (psct_local_var_dim): New.
1188 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1189 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1190 correct layout, call pbb_nb_local_vars.
1191 (psct_add_local_variable, psct_add_scattering_dimension): New.
1192 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1193 Initialize PBB_NB_SCATTERING_TRANSFORM.
1195 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1197 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1198 (set_coef): Renamed ppl_set_coef.
1199 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1201 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1203 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1204 test a boolean against 1.
1205 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1206 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1207 (pbb_do_interchange): Returns true when a transform has been performed.
1208 (scop_do_interchange): Same.
1209 * graphite-poly.c (apply_poly_transforms): Use the return value of
1210 scop_do_interchange.
1211 * graphite-poly.h (scop_do_interchange): Update declaration.
1213 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1215 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1217 * sese.c (sese_reset_aux_in_loops): New.
1218 * sese.h (sese_reset_aux_in_loops): New.
1220 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1223 multiplier and multiply the constant by the multiplier.
1224 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1225 (build_poly_dr): Do not use the multiplier to define the subscript.
1227 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1229 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1230 compiler's data reference. Initialize PDR_CDR.
1231 (print_pdr): Call dump_data_reference.
1232 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1233 Add compiler_dr field.
1234 (PDR_BB): Renamed PDR_PBB.
1236 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1237 GCC's data reference representation.
1238 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1239 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1241 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1243 * graphite-poly.c (print_scattering_function): Also print the layout.
1244 * graphite-poly.h (pbb_nb_local_vars): New.
1246 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1248 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1250 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1252 * graphite-poly.c (print_pdr, debug_pdr): New.
1253 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1254 (PDR_BASE): Removed.
1256 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1258 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1261 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1263 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1264 subscript identification column.
1265 (pbb_do_interchange): Print to dump_file that some loops "will be
1266 interchanged". Rely on that chain of characters in the testcases.
1267 * gcc.dg/graphite/interchange-0.c: New.
1268 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1269 interchange-*.c files and compile them with -floop-interchange.
1271 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1273 * graphite-interchange.c (interchange_profitable_p): Renamed
1274 pbb_interchange_profitable_p.
1276 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1277 Harsha Jagasia <harsha.jagasia@amd.com>
1278 Pranav Garg <pranav.garg2107@gmail.com>
1280 * graphite-interchange.c (interchange_profitable_p): Make static.
1281 (pbb_interchange_loop_depths, pbb_do_interchange,
1282 scop_do_interchange): New.
1283 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1284 for flag_loop_interchange.
1285 * graphite-poly.h (scop_do_interchange): Declared.
1286 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1287 flag_loop_interchange is used.
1289 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1291 * graphite-dependences.c (dependence_polyhedron): Update use of
1292 pbb_nb_scattering_dims.
1293 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1294 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1295 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1296 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1298 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1300 * graphite.c: Cleanup foo.
1302 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1304 * Merge from mainline (r143684:148293).
1305 * Disabled libpcp until it gets fixed.
1307 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1308 Harsha Jagasia <harsha.jagasia@amd.com>
1310 * graphite-interchange.c: New.
1311 * Makefile.in (graphite-interchange.o): New.
1312 * graphite-poly.h (interchange_profitable_p): Declared.
1313 * graphite-ppl.h (value_max): New.
1315 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1317 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1318 * graphite-poly.h: Fix some comments.
1322 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1325 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1326 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1327 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1328 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1329 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1330 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1331 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1332 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1333 * graphite-clast-to-gimple.c: Same.
1334 * graphite-dependences.c: Same.
1335 * graphite-poly.c: Same.
1336 * graphite-sese-to-poly.c: Same.
1338 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1340 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1341 expressions for an IV rename, as returned by clast_to_gcc_expression.
1342 (copy_renames): Rename new_name to expr.
1343 * sese.c (debug_rename_elt): Same.
1346 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1347 the information from the rename map.
1348 (rename_variables_in_stmt): Same.
1349 (add_loop_exit_phis): Rename new_name to expr.
1350 (insert_loop_close_phis): Same.
1351 (add_guard_exit_phis): Same. Call force_gimple_operand.
1352 * sese.h (struct rename_map_elt): Rename new_name to expr.
1353 (new_rename_map_elt): Same.
1355 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1357 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1358 * sese.c (set_rename): Make it extern.
1359 * sese.h (set_rename): Declared.
1361 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1363 * graphite-poly.c (extend_scattering): Free values.
1364 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1366 (ppl_print_powerset_matrix): Same.
1367 * graphite-scop-detection.c (free_scops_1): New.
1368 (limit_scops): Call free_scops_1.
1369 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1370 (build_poly_dr): Free PPL coefficients.
1371 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1373 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1375 * graphite-dependences.c: New.
1376 * graphite-data-ref.c: Removed.
1377 * graphite-data-ref.h: Removed.
1378 * Makefile.in (graphite-data-ref.o): Removed.
1379 (graphite-dependences.o): Added.
1380 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1381 * graphite-poly.c: Same.
1382 Move the data dependence testing to graphite-dependences.c.
1384 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1386 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1387 from graphite_cannot_represent_loop. Code refactored.
1388 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1390 2009-05-17 Li Feng <nemokingdom@gmail.com>
1392 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1393 Cover all the testcases (not only the filtered ones).
1395 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1397 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1398 unnecessary check. Update comments. Move check for REAL_TYPE here.
1399 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1400 done in (stmt_simple_for_scop_p).
1402 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1404 * graphite.c (print_global_statistics): New.
1405 (print_graphite_scop_statistic): New.
1406 (print_graphite_statistics): New.
1407 (graphite_initialize, graphite_transform_loops): Print statistics.
1408 * graphite-scop-detection (build_scops): Print statistics.
1409 (print_graphite_scop_statistics): New.
1410 (print_graphite_statistics): New.
1412 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1415 (debug_clast_name_index): Removed.
1416 (debug_clast_name_indexes_1): Removed.
1417 (debug_clast_name_indexes): Removed.
1418 (clast_name_index_elt_info): Removed.
1419 (eq_clast_name_indexes): Removed.
1420 (clast_name_to_index): Removed.
1421 (new_clast_name_index): Removed.
1422 (save_clast_name_index): Removed.
1423 (save_var_name): Moved...
1424 (init_sese_params_index): Removed.
1425 (clast_name_to_gcc): Remove use of name_tree.
1426 (initialize_cloog_names): Same.
1427 (gloog): Do not call init_sese_params_index.
1428 * graphite-sese-to-poly.c (save_var_name): ...here.
1429 (parameter_index_in_region): New.
1430 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1431 (parameter_index_in_region): Removed.
1432 (is_parameter): Remove use of name_tree.
1433 * sese.h (struct name_tree): Removed.
1434 (struct sese): Remove use of name_tree. New field params_names.
1435 (SESE_PARAMS_NAMES): New.
1436 (SESE_PARAMS): Remove duplicate.
1437 (parameter_index_in_region): Removed.
1438 (sese_nb_params): Remove use of name_tree.
1439 (struct clast_name_index): New.
1440 (new_clast_name_index): New.
1441 (clast_name_to_index): New.
1442 (save_clast_name_index): New.
1443 (debug_clast_name_index): New.
1444 (debug_clast_name_indexes_1): New.
1445 (debug_clast_name_indexes): New.
1446 (clast_name_index_elt_info): New.
1447 (eq_clast_name_indexes): New.
1449 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1451 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1452 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1453 (graphite_loop_normal_form): Do not pass region. Do not
1454 initialize SESE_OLDIVS.
1455 (build_graphite_loop_normal_form): Update call to
1456 graphite_loop_normal_form.
1457 * sese.c (debug_oldivs): Removed.
1458 (new_sese): Do not initialize SESE_OLDIVS.
1459 (free_sese): Do not free SESE_OLDIVS.
1460 (oldiv_for_loop): Removed.
1461 * sese.h (struct sese): Remove old_ivs.
1462 (SESE_OLDIVS): Removed.
1463 (oldiv_for_loop): Removed.
1465 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1467 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1468 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1469 replaced by a call to newivs_to_depth_to_newiv.
1470 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1471 (clast_to_gcc_expression_red): Same.
1472 (gcc_type_for_clast_expr): Same.
1473 (gcc_type_for_clast_eq): Same.
1474 (graphite_translate_clast_equation): Same.
1475 (graphite_create_guard_cond_expr): Same.
1476 (graphite_create_new_guard): Same.
1477 (graphite_create_new_loop): Same.
1478 (build_iv_mapping): Same.
1479 (translate_clast): Same.
1481 (loop_iv_stack_patch_for_consts): Removed. *
1482 sese.c (iv_stack_entry_is_constant): Removed.
1483 (iv_stack_entry_is_iv): Removed.
1484 (loop_iv_stack_push_iv): Removed.
1485 (loop_iv_stack_insert_constant): Removed.
1486 (loop_iv_stack_pop): Removed.
1487 (loop_iv_stack_get_iv): Removed.
1488 (loop_iv_stack_get_iv_from_name): Removed.
1489 (debug_loop_iv_stack): Removed.
1490 (free_loop_iv_stack): Removed.
1491 (loop_iv_stack_remove_constants): Removed. *
1492 sese.h (iv_stack_entry_kind): Removed.
1493 (iv_stack_entry_data_union): Removed.
1494 (iv_stack_entry_struct): Removed.
1495 (iv_stack_entry_p): Removed.
1496 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1497 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1498 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1499 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1500 (gbb_loop_at_index): Fix indenting.
1501 (gbb_loop_index): Removed.
1503 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1505 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1506 Call clast_name_to_index.
1508 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1510 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1511 do not pass params. Get params from SESE_PARAMS.
1512 (clast_to_gcc_expression): Same.
1513 (clast_to_gcc_expression_red): Same.
1514 (gcc_type_for_clast_eq): Same.
1515 (graphite_translate_clast_equation): Same.
1516 (graphite_create_new_loop): Same.
1517 * sese.c (rename_variables_in_stmt): Fix comment.
1519 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1521 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1523 Call save_clast_name_index.
1524 (translate_clast): Pass newivs_index.
1525 (gloog): Create and free newivs_index.
1527 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1529 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1530 (clast_name_index_p): New type.
1531 (debug_clast_name_index): New.
1532 (debug_clast_name_indexes_1): New.
1533 (debug_clast_name_indexes): New.
1534 (clast_name_index_elt_info): New.
1535 (eq_clast_name_indexes): New.
1536 (clast_name_to_index): New.
1537 (new_clast_name_index): New.
1538 (save_clast_name_index): New.
1539 (init_sese_params_index): New.
1540 (gloog): Call init_sese_params_index.
1541 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1542 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1543 (free_sese): Free SESE_PARAMS_INDEX.
1544 * sese.h (struct sese): Add params_index.
1545 (SESE_PARAMS_INDEX): New.
1547 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1549 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1550 (graphite_create_new_loop): Pass the newivs vector. Push the
1551 newly created IV to newivs.
1552 (translate_clast): Pass the newivs vector.
1553 (gloog): Create and destroy the newivs vector.
1555 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1557 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1558 (graphite_loop_normal_form): Initialize loop->aux with the unique
1559 IV that has been created.
1561 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1563 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1564 scev with parameters in the base part. They where forbidden
1567 2009-05-11 Li Feng <nemokingdom@gmail.com>
1569 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1570 compile options by file names.
1571 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1572 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1573 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1574 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1576 2009-05-08 Li Feng <nemokingdom@gmail.com>
1578 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1579 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1580 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1581 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1583 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1585 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1588 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1590 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1591 allow integer constant strides.
1592 (graphite_can_represent_expr): Depend on outermost_loop.
1593 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1594 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1595 build_scops_1): Same.
1596 (scopdet_basic_block_info): Same and insert layered SCoP
1598 (try_generate_gimple_bb): Cleanup.
1599 (build_scops): Enable data references.
1601 * testsuite/gcc.dg/graphite/id-5.c: New.
1602 * testsuite/gcc.dg/graphite/id-9.c: New.
1603 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1604 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1606 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1608 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1609 that we have not yet built for this SCoP.
1611 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1613 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1614 for complex numbers.
1616 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1618 * graphite-ppl.c: Fix build if cloog is not available.
1620 2009-05-04 Li Feng <nemokingdom@gmail.com>
1622 * tree-parloops.c (loop_parallel_p): Remove construction of
1623 NITER and REDUCTION_LIST.
1624 (try_get_loop_niter): New.
1625 (try_create_reduction_list): New.
1626 (parallelize_loops): Bypass the failed checkings in autopar
1627 when can_be_parallel in loop structure is set to true.
1629 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1631 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1632 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1634 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1636 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1637 Enable EQ_EXPR and NE_EXPR again.
1639 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1641 * graphite-scop-detection.c (graphite_can_represent_scev):
1642 Add check if scev is affine multivariate.
1643 (harmful_stmt_in_bb): Check if we can represent the conditions.
1644 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1646 * testsuite/gcc.dg/graphite/id-7.c: New.
1648 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1650 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1651 Check all bbs in region, not only the bbs that are represented in
1653 (build_poly_scop): Add newline.
1654 * testsuite/gcc.dg/graphite/id-8.c: New.
1656 2009-04-30 Li Feng <nemokingdom@gmail.com>
1658 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1659 when loop initialize.
1660 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1661 * common.opt: Declare flag_graphite_force_parallel.
1662 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1664 * graphite-poly.c (apply_poly_transforms): Introduce
1665 flag_graphite_force_parallel.
1666 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1667 * toplev.c (process_options): ditto and replace a not correctly
1670 2009-04-30 Li Feng <nemokingdom@gmail.com>
1672 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1673 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1674 to the redefinition.
1675 (compute_cloog_iv_types_1): ditto.
1676 (build_iv_mapping): ditto.
1677 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1679 (free_gimple_bb): Removed GBB_LOOPS related free part.
1680 (build_bb_loops): Removed.
1681 * sese.h (struct gimple_bb): Removed loops.
1682 (GBB_LOOPS): Removed.
1683 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1684 (gbb_loop_index): ditto.
1686 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1688 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1689 allow non constant strides.
1690 * testsuite/gcc.dg/graphite/scop-20.c: New.
1692 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1694 * graphite-scop-detection.c (dot_all_scops): Fix system call
1695 return value warning.
1698 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1700 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1701 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1703 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1705 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1706 build_pairwise_constraint, dr_equality_constraints,
1707 build_pairwise_scheduling_equality,
1708 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1709 build_lexicographically_gt_constraint, dependence_polyhedron,
1710 graphite_legal_transform_dr, graphite_legal_transform_bb,
1711 graphite_legal_transform): New.
1712 * graphite-poly.h (graphite_legal_transform): Declared.
1713 * graphite-sese-to-poly.c (build_poly_scop): Call to
1714 graphite_legal_transform is disabled for the moment.
1716 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1718 * graphite-poly.h (pbb_nb_scattering_dims): New.
1719 (pbb_nb_scattering): Use it.
1721 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1723 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1724 Pointset_Powerset version of ppl_insert_dimensions.
1725 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1727 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1729 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1731 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-poly.h: Fix comment.
1735 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1737 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1739 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1741 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1744 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1746 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1747 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1750 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1752 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1753 handle EQ_EXPR and NE_EXPR.
1755 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1757 * graphite-poly.h (poly_dr): Fix comment.
1759 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1760 Tobias Grosser <grosser@fim.uni-passau.de>
1762 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1763 with a zero dimension polyhedron.
1764 (find_scop_parameters): Move the call to scop_set_nb_params here.
1765 (build_loop_iteration_domains): Store in loop->aux the iteration
1767 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1768 by any loop in scop.
1769 (build_poly_scop): Do not call scop_set_nb_params.
1771 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1772 Tobias Grosser <grosser@fim.uni-passau.de>
1774 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1775 add_condition_to_domain not GT_EXPR.
1777 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1779 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1780 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1781 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1782 upper_bound_assign to calculate unions.
1783 * testsuite/gcc.dg/graphite/id-6.c: New.
1785 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1787 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1788 handle abnormal edges.
1790 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1792 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1793 (free_poly_bb): Also free poly_drs.
1794 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1795 (poly_dr): Polyhedron to Pointset_Powerset.
1796 (pdr_accessp_nb_subscripts): Same.
1797 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1800 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1802 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1803 names into more meaningful names.
1805 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1807 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1808 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1810 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1812 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1814 * tree-parloops.c (rewrite_phi_with_iv): New.
1815 (rewrite_all_phi_nodes_with_iv): New.
1816 (canonicalize_loop_ivs): Call them.
1818 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1820 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1821 graphite_find_data_references_in_stmt.
1822 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1823 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1825 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1827 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1829 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1831 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1832 instead of bb_in_region.
1833 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1834 (build_sese_conditions): Use flag_bb_in_sese.
1835 * sese.c (register_bb_in_sese): Removed.
1836 (new_sese): Remove initialization of SESE_REGION_BBS.
1837 (free_sese): Do not free SESE_REGION_BBS.
1838 * sese.h (struct sese): Remove field region_basic_blocks.
1839 (SESE_REGION_BBS): Removed.
1840 (bb_in_sese_p): Implement in function of bb_in_region.
1842 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1844 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1847 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1849 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1851 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1852 (add_condition_to_domain): New.
1853 (add_condition_to_pbb): New.
1854 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1855 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1857 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1859 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1860 ppl_Pointset_Powerset.
1861 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1862 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1863 (pbb_nb_loops): Same.
1864 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1865 add_conditions_to_domain): Same.
1866 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1867 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1868 ppl_const_Polyhedron_t.
1869 (ppl_print_powerset_matrix): New.
1870 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1871 ppl_print_powerset_matrix): New.
1872 (ppl_print_polyhedron_matrix): Updated.
1874 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1876 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1878 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1880 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1881 (print_iteration_domains, debug_iteration_domain,
1882 debug_iteration_domains): New.
1883 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1884 debug_iteration_domains): Declared.
1885 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1888 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1889 Sebastian Pop <sebastian.pop@amd.com>
1891 * graphite-poly.h (print_iteration_domain): New.
1892 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1893 (build_sese_conditions_1, build_sese_conditions_after,
1894 build_sese_conditions_before): New.
1895 (build_sese_conditions): Rewritten.
1897 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1898 Tobias Grosser <grosser@fim.uni-passau.de>
1900 Cleanup of code generation liveouts.
1901 * graphite-clast-to-gimple.c (translate_clast): Use a single
1902 rename_map instead of one per translated statement.
1903 Do not use SESE_LIVEOUT_RENAMES.
1904 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1905 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1906 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1907 phi node of a reduction: when a loop contains a reduction used outside
1908 the loop, there should be a scalar close phi node on the exit block.
1909 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1910 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1911 (free_sese): Do not free them.
1912 (sese_build_liveouts_use): Do not use them.
1913 (sese_build_liveouts_bb): Same.
1914 (sese_build_liveouts): Same.
1915 (sese_insert_phis_for_liveouts): Same.
1916 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1917 (defined_in_loop_p): New.
1918 (alive_after_loop): New.
1919 (close_phi_not_yet_inserted_p): New.
1920 (struct alep, alep_p): New.
1921 (add_loop_exit_phis): Remove from the rename_map all the names defined
1922 in the code generated loop.
1923 (insert_loop_close_phis): Traverse the rename_map passed to it.
1924 Don't use SESE_LIVEOUT_RENAMES.
1925 (default_liveout_before_guard): Renamed default_before_guard.
1926 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1927 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1928 (register_sese_liveout_renames): Removed.
1929 (copy_bb_and_scalar_dependences): Do not call it.
1930 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1932 (SESE_LIVEOUT): Removed.
1933 (SESE_LIVEOUT_RENAMES): Removed.
1934 (SESE_REDUCTION_LIST): Removed.
1935 (sese_build_liveouts): Removed.
1936 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1937 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1938 (insert_guard_phis): Same.
1939 (rename_map_elt): Declare a VEC of them.
1940 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1941 trees not pointers to trees.
1943 Rewrite in canonical close SSA form:
1944 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1945 (limit_scops): Close the scop after the block containing the close phi
1947 (canonicalize_loop_closed_ssa): New.
1948 (canonicalize_loop_closed_ssa_form): New.
1949 (build_scops): Call canonicalize_loop_closed_ssa_form.
1951 * graphite-sese-to-poly.c: Fix typos.
1953 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1955 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1957 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1958 (print_pbb): Add conditions.
1960 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1961 Sebastian Pop <sebastian.pop@amd.com>
1963 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1964 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1965 (build_scop_bbs_1): New.
1966 (build_scop_bbs): Rewrite.
1967 * sese.h (bb_in_region): New.
1969 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1971 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1973 (print_scop): Style.
1974 * graphite-poly.h (poly_bb): Add drs vector.
1975 (PBB_DRS): Add accessor.
1976 * graphite-sese-to-poly.c (build_poly_dr): New.
1977 (build_pbb_drs, build_scop_drs): New.
1978 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1980 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1982 * tree-ssa-loop.c: Include forgotten toplev.h
1984 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1986 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1987 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1988 * testsuite/gcc.dg/graphite/pr37928.c: Same
1989 * testsuite/gcc.dg/graphite/pr38409.c: Same
1990 * testsuite/gcc.dg/graphite/pr38498.c: Same
1991 * testsuite/gcc.dg/graphite/pr38559.c: Same
1992 * testsuite/gcc.dg/graphite/pr39335.c: Same
1993 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1994 * testsuite/gfortran.dg/graphite/block-2.f: Same
1995 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1998 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2000 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2001 build_access_matrix, build_scop_data_accesses): Remove access function
2002 building. (We get a new version soon).
2003 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2004 * sese.h (nb_loops_around_loop_in_sese): Remove.
2005 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2007 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2008 Sebastian Pop <sebastian.pop@amd.com>
2010 * graphite-scop-detection.c (struct scopdet_info): Rename last
2012 (scopdet_basic_block_info, build_scops_1): Don't use
2013 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2015 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2016 Sebastian Pop <sebastian.pop@amd.com>
2018 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2019 * sese.c (sese_build_liveouts_use): Renamed from
2020 sese_build_livein_liveouts_use. Remove liveins.
2021 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2022 Call sese_build_liveouts_use.
2023 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2024 Call sese_build_liveouts_bb.
2025 (new_sese, free_sese): Remove liveins.
2026 (sese_add_exit_phis_var): Deleted.
2027 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2029 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2031 * sese.h (sese): Remove num_ver and livein.
2032 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2034 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2036 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2038 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2040 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2041 (build_scop_scattering): Do not use compare_prefix_loops any more.
2042 (nb_common_loops): New.
2044 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2046 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2047 (register_old_and_new_names): Renamed set_rename.
2049 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2051 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2052 of the decl from the previous commit.
2054 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2056 * graphite-scop-detection.c (dot_scop): New.
2057 * graphite-scop-detection.h (dot_scop): Declared.
2059 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2061 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2063 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2065 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2066 condition at the end of the loop.
2067 * graphite.c (graphite_initialize, graphite_finalize): Print to
2068 dump_file the compiled function.
2069 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2070 of create_empty_loop_on_edge.
2071 (translate_clast): Update the code generation of loops for the new
2073 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2075 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2077 Reverted the patch from 2009-03-19.
2079 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2081 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2083 (print_scop): Style.
2084 * graphite-poly.h (poly_bb): Add drs vector.
2085 (PBB_DRS): Add accessor.
2086 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2087 (build_access_matrix_with_af, build_access_matrix,
2088 build_scop_data_accesses): Delete.
2089 (build_poly_dr): New.
2090 (build_pbb_drs, build_scop_drs): New.
2091 (build_poly_scop): call build_scop_drs.
2093 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2095 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2096 once per basic block.
2098 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2100 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2101 (graphite_can_represent_expr): Renamed from loop_affine_expr
2103 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2104 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2105 (scopdet_basic_block_info): Actually define entry_block.
2106 (stmt_simple_memref_p): Moved here from ...
2108 * tree-data-ref.c (stmt_simple_memref_p): here.
2109 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2111 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2113 * testsuite/gcc.dg/graphite/id-4.c: New.
2115 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2117 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2118 (register_old_and_new_names): Update the content of the map.
2119 When there was already a rename_map_elt in the map at that
2121 (copy_bb_and_scalar_dependences): Do rename_variables after
2122 expand_scalar_variables.
2123 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2124 of the map. When there was already a rename_map_elt in the
2125 map at that location, free it.
2126 (translate_clast): Pass the rename_map. Do not initialize and free
2127 a rename_map per stmt_user.
2128 (gloog): Initialize and free one rename_map and pass it to
2131 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2133 * sese.c (expand_scalar_variables_stmt,
2134 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2136 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2137 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2138 the gimple_stmt_iterator of the statement to be expanded.
2139 * graphite-scop-detection.c (is_simple_operand): Do handle
2142 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2144 * graphite-scop-detection.c (is_simple_operand): Do not handle
2146 * testsuite/gcc.dg/graphite/id-2.c: New.
2148 * graphite-sese-to-poly.c (build_bb_loops,
2149 add_value_to_dim, scan_tree_for_params_right_scev,
2150 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2151 find_params_in_bb, build_loop_iteration_domains,
2152 add_conditions_to_domain): Remove subtract.
2154 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2156 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2157 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2158 pbb_loop_at_index -> gbb_loop_at_index.
2159 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2160 (debug_loop_vec): Delete.
2161 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2162 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2163 (PBB_LOOPS): Removed.
2164 (PBB_BLACK_BOX): Insert cast.
2165 (pbb_set_black_box): New setter.
2166 (pbb_loop_at_index, pbb_loop_index): Removed.
2167 (scop_set_region, scop_set_nb_params): New.
2168 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2169 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2170 (build_poly_scop): Use scop_set_nb_params.
2171 * sese.h (gimple_bb): Add LOOPS.
2172 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2174 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2176 Revert previous commit.
2178 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2180 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2181 (register_old_and_new_names): Update the content of the map.
2182 When there was already a rename_map_elt in the map at that
2184 (copy_bb_and_scalar_dependences): Do rename_variables after
2185 expand_scalar_variables.
2186 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2187 of the map. When there was already a rename_map_elt in the
2188 map at that location, free it.
2189 (translate_clast): Pass the rename_map. Do not initialize and free
2190 a rename_map per stmt_user.
2191 (gloog): Initialize and free one rename_map and pass it to
2194 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2196 Remove forgotten line in revert.
2198 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2200 Revert previous commit.
2202 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2204 * sese.c (register_old_and_new_names): Update the content
2205 of the map. When there was already a rename_map_elt in the
2206 map at that location, free it.
2207 (copy_bb_and_scalar_dependences): Do rename_variables after
2208 expand_scalar_variables.
2209 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2210 of the map. When there was already a rename_map_elt in the
2211 map at that location, free it.
2212 (translate_clast): Pass the rename_map. Do not initialize and free
2213 a rename_map per stmt_user.
2214 (gloog): Initialize and free one rename_map and pass it to
2217 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2219 * graphite-clast-to-gimple.c (translate_clast): context_loop
2222 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2223 Sebastian Pop <sebastian.pop@amd.com>
2225 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2226 of the use of ppl_Polyhedron_map_space_dimensions.
2228 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2229 Sebastian Pop <sebastian.pop@amd.com>
2231 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2232 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2233 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2234 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2235 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2236 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2237 pbb_nb_params): New.
2238 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2239 nb_loops_around_pbb): Adapt return types.
2241 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2243 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2244 graphite-clast-to-gimple.o, graphite-data-ref.o,
2245 graphite-scop-detection.o, graphite-poly.o): Add
2248 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2250 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2251 graphite-clast-to-gimple.o, graphite-data-ref.o,
2252 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2254 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2256 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2257 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2258 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2259 * testsuite/gcc.dg/graphite/block-0.c: Same.
2260 * testsuite/gcc.dg/graphite/block-1.c: Same.
2261 * testsuite/gcc.dg/graphite/block-2.c: Same.
2262 * testsuite/gcc.dg/graphite/block-3.c: Same.
2263 * testsuite/gcc.dg/graphite/block-4.c: Same.
2264 * testsuite/gcc.dg/graphite/block-5.c: Same.
2265 * testsuite/gcc.dg/graphite/block-6.c: Same.
2266 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2267 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2268 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2269 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2270 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2271 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2272 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2273 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2274 * opts.c: Remove -floop-block from -O2.
2275 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2276 -floop-strip-mine are used.
2278 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2279 Sebastian Pop <sebastian.pop@amd.com>
2281 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2283 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2284 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2285 strip_mine_profitable_p, is_interchange_valid,
2286 graphite_trans_bb_block, graphite_trans_loop_block,
2287 graphite_trans_scop_block): Temporary removed.
2288 (extend_scattering, unify_scattering_dimensions): New.
2289 (print_scattering_function, graphite_read_transforms):
2290 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2291 (graphite_generate_scattering_fns): Removed.
2292 (apply_poly_transforms): Cleanup.
2293 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2294 (schedule_to_scattering): Moved.
2295 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2296 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2297 (pbb_nb_scattering): New.
2298 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2299 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2301 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2303 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2304 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2305 -> PBB_TRANSFORMED_SCATTERING.
2306 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2307 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2308 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2309 (check_poly_representation): Do not return bool.
2310 (graphite_transform_loops): Reformat.
2311 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2313 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2315 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2316 debug_pbb_domain, debug_pbb, debug_scop): New.
2317 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2318 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2320 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2323 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2324 when the type precision of the induction variable should be
2325 larger than the type precision of nit.
2326 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2327 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2328 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2330 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2331 * testsuite/gcc.dg/graphite/pr39335.c: New.
2333 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2335 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2336 SSA_NAMES not struct reduction_info.
2338 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2340 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2342 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2343 Tobias Grosser <grosser@fim.uni-passau.de>
2345 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2346 (free_sese): Free SESE_REDUCTION_LIST.
2347 * sese.h (struct sese): Add field reduction_list.
2348 (SESE_REDUCTION_LIST): New.
2349 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2350 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2352 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2353 Tobias Grosser <grosser@fim.uni-passau.de>
2355 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2358 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2359 Tobias Grosser <grosser@fim.uni-passau.de>
2361 * tree-parloops.c (struct brli, build_reduction_list_info,
2362 analyze_reduction_list, gather_scalar_reductions): New.
2363 (loop_parallel_p): Build a reduction list containing only
2364 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2365 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2366 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2367 * tree-flow.h (gather_scalar_reductions): Declared.
2369 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2372 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2373 number_of_iterations_exit from a gcc_assert.
2375 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2376 Jan Sjodin <jan.sjodin@amd.com>
2378 * output.h (graphite_out_file, graphite_in_file): Declared.
2379 * toplev.c (graphite_out_file, graphite_in_file): New.
2380 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2381 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2382 Don't call schedule_to_scattering.
2383 * common.opt (fgraphite-write, fgraphite-read): New.
2384 * graphite-poly.c: Include output.h.
2385 (print_scattering_function, print_scattering_functions,
2386 debug_scattering_function, debug_scattering_functions,
2387 graphite_write_transforms, graphite_read_transforms,
2388 graphite_generate_scattering_fns): New.
2389 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2390 Call graphite_generate_scattering_fns, graphite_write_transforms,
2391 graphite_read_transforms.
2392 (new_poly_bb): Initialize PBB_SCATTERING.
2393 (free_poly_bb): Free PBB_SCATTERING.
2394 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2395 * graphite-poly.h (struct poly_bb): Add field scattering.
2396 (PBB_SCATTERING): New.
2397 (print_scattering_function, print_scattering_functions,
2398 debug_scattering_function, debug_scattering_functions): Declared.
2399 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2400 GMP values, not integers!
2401 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2402 ppl_read_polyhedron_matrix): New.
2403 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2404 debug_ppl_polyhedron_matrix,
2405 ppl_read_polyhedron_matrix): Declared.
2406 * Makefile.in (graphite-poly.o): Depends on output.h.
2408 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2409 Tobias Grosser <grosser@fim.uni-passau.de>
2412 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2413 scalar evolutions in the scop_entry->loop_father.
2415 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2416 Tobias Grosser <grosser@fim.uni-passau.de>
2418 * graphite.h (ref_nb_loops): Remove declaration.
2419 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2420 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2421 debug_gbb): Moved to sese.h.
2424 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2425 Tobias Grosser <grosser@fim.uni-passau.de>
2427 * graphite-data-ref.[ch]: Disable.
2429 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2430 Tobias Grosser <grosser@fim.uni-passau.de>
2432 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2433 scalar evolutions in the scop_entry->loop_father.
2435 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2437 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2438 (graphite_cannot_represent_loop_niter): Renamed
2439 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2440 (limit_scops): build_sese_loop_nests does not return a bool.
2441 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2442 * sese.c (nb_reductions_in_loop): ... from here.
2443 (graphite_loop_normal_form): ... from here.
2444 (sese_record_loop): Does not fail, so does not return a bool.
2445 (build_sese_loop_nests): Same.
2446 * sese.h (build_sese_loop_nests): Update declaration.
2447 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2448 (build_graphite_loop_normal_form): New.
2449 (gloog): Call build_graphite_loop_normal_form.
2450 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2451 build_sese_loop_nests.
2453 * testsuite/gcc.dg/graphite/id-1.c: New.
2455 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2456 Tobias Grosser <grosser@fim.uni-passau.de>
2458 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2459 The SCoP detection fix is sufficient.
2461 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2463 PR tree-optimization/39260
2464 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2465 the basic block contains a condition with a real type.
2466 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2468 * gcc.dg/graphite/pr39260.c: New.
2470 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2472 * graphite-poly.c: Inlcude params.h.
2473 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2475 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2476 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2478 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2479 Tobias Grosser <grosser@fim.uni-passau.de>
2481 * graphite-scop-detection.c (dot_all_scops_1,
2482 dot_all_scops): Moved here.
2483 * graphite-scop-detection.h (dot_all_scops): Declared here.
2484 * graphite.c (graphite_initialize, graphite_finalize): New.
2485 (graphite_transform_loops): Cleaned up.
2486 * sese.c (debug_oldivs): Moved here.
2487 * graphite-poly.c (graphite_apply_transformations): Renamed
2488 apply_poly_transforms.
2489 (debug_loop_vec): Moved here.
2490 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2491 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2492 find_scop_parameters, build_scop_iteration_domain,
2493 add_conditions_to_constraints, build_scop_canonical_schedules,
2494 build_scop_data_accesses): Now static.
2495 (build_poly_scop, check_poly_representation): New.
2497 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2499 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2500 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2501 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2502 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2503 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2504 scan_tree_for_params, struct irp_data, dx_record_params,
2505 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2506 build_loop_iteration_domains, add_conditions_to_domain,
2507 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2508 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2509 build_sese_conditions, add_conditions_to_constraints,
2510 build_scop_iteration_domain, build_access_matrix_with_af,
2511 build_access_matrix,
2512 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2514 * graphite-sese-to-poly.c: New.
2515 * graphite-sese-to-poly.h: New.
2517 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2519 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2521 * graphite.c: Split graphite code generation to a new file.
2522 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2523 max_precision_type, clast_to_gcc_expression_red,
2524 clast_to_gcc_expression, gcc_type_for_clast_expr,
2525 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2526 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2527 graphite_create_new_guard, clast_get_body_of_loop,
2528 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2529 graphite_create_new_loop, build_iv_mapping, copy_renames,
2530 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2531 compute_cloog_iv_types, free_scattering, save_var_name,
2532 initialize_cloog_names, build_scop_context, build_cloog_prog,
2533 set_cloog_options, debug_clast_stmt, scop_to_clast,
2534 print_generated_program, debug_generated_program,
2535 gloog): Moved to graphite-clast-to-gimple.c.
2537 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2539 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2540 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2541 loop_iv_stack_pop, loop_iv_stack_get_iv,
2542 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2543 free_loop_iv_stack, loop_iv_stack_remove_constants,
2544 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2545 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2546 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2547 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2548 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2549 get_vdef_before_sese, sese_adjust_vphi,
2550 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2551 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2552 is_iv, expand_scalar_variables_ssa_name,
2553 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2554 expand_scalar_variables, rename_variables, remove_condition,
2555 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2556 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2557 default_liveout_before_guard, add_guard_exit_phis,
2558 insert_guard_phis, register_old_and_new_names,
2559 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2560 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2561 if_region_set_false_region, create_if_region_on_edge,
2562 move_sese_in_condition): Moved to sese.c.
2564 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2565 if_region_exit, if_region_get_condition_block,
2566 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2567 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2568 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2569 ivtype_map_elt, new_ivtype_map_elt,
2570 recompute_all_dominators): Moved to sese.h.
2572 * graphite-clast-to-gimple.c: New.
2573 * graphite-clast-to-gimple.h: New.
2574 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2575 * sese.c: Modified as said above.
2578 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2580 * graphite.c: Split scop detection to a new file.
2581 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2582 move_sd_regions, loop_affine_expr, exclude_component_ref,
2583 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2584 graphite_cannot_represent_loop_niter, struct scopdet_info,
2585 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2586 find_single_entry_edge, find_single_exit_edge,
2587 create_single_entry_edge, sd_region_without_exit,
2588 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2589 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2590 Moved to graphite-scop-detection.c.
2592 * graphite-scop-detection.c: New.
2593 * graphite-scop-detection.h: New.
2594 * Makefile.in: Add new rule for graphite-scop-detection.o.
2596 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2597 tree-scalar-evolution.h.
2598 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2599 build_sese_loop_nests): Moved here from graphite.c.
2600 (param_index): Renamed parameter_index_in_region.
2602 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2603 Sebastian Pop <sebastian.pop@amd.com>
2605 * gcc.dg/graphite/block-0.c: Expected to fail now.
2606 * gcc.dg/graphite/block-1.c: Same.
2607 * gcc.dg/graphite/block-5.c: Same.
2608 * gcc.dg/graphite/block-6.c: Same.
2610 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2611 Sebastian Pop <sebastian.pop@amd.com>
2613 * graphite.h: Separate from graphite_bb_p the polyhedral
2614 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2615 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2616 graphite-data-ref.h.
2617 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2618 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2619 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2620 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2621 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2622 scop_nb_params): Moved to graphite-poly.h.
2623 * graphite-data-ref.c: Same.
2624 * graphite-data-ref.h: New.
2626 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2627 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2628 is_interchange_valid, graphite_trans_bb_block,
2629 graphite_trans_loop_block, scop_max_loop_depth,
2630 graphite_trans_scop_block, graphite_apply_transformations,
2631 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2633 * graphite-poly.h: New.
2634 * graphite-poly.c: New.
2635 * Makefile.in (OBJS-common): Add graphite-poly.o.
2636 (graphite-poly.o): New rule.
2637 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2640 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2641 Tobias Grosser <grosser@fim.uni-passau.de>
2643 * graphite.c: Replace gb -> gbb.
2645 * graphite-data-ref.c: Same.
2647 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2648 Tobias Grosser <grosser@fim.uni-passau.de>
2650 * Makefile.in (OBJS-commmon): Add sese.o.
2652 (graphite.o): Add sese.h.
2653 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2654 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2655 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2657 (block_before_scop): Add missing return.
2658 (new_scop, free_scop): Remove SESE data structures.
2659 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2660 find_scop_parameters, build_loop_iteration_domains,
2661 add_conditions_to_domain, register_scop_liveout_renames,
2662 copy_bb_and_scalar_dependences): Scop -> SESE.
2664 (add_conditions_to_domain): SCoP -> SESE and remove check
2665 (scop_contains_non_iv_scalar_phi_nodes): New.
2666 (build_scop_conditions_1, build_scop_conditions): Remove check for
2667 non iv scalar phi nodes.
2668 (print_scop_statistics): New.
2669 (graphite_transform_loops): Cleanup.
2671 * graphite.h: Move to sese & cleanup.
2675 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2676 Tobias Grosser <grosser@fim.uni-passau.de>
2678 * graphite.c (build_scop_conditions_1): Conditions are only
2679 at the end of a basic block.
2681 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2682 Tobias Grosser <grosser@fim.uni-passau>
2684 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2686 (GBB_ALPHA): Removed.
2688 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2689 Tobias Grosser <grosser@fim.uni-passau.de>
2691 * graphite-data-ref.c (graphite_test_dependence): Don't use
2692 GBB_DYNAMIC_SCHEDULE.
2693 * graphite.c (new_graphite_bb): Same.
2694 (free_graphite_bb): Same.
2695 (build_scop_dynamic_schedules): Removed.
2696 (graphite_transform_loops): Don't call it.
2697 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2698 (GBB_DYNAMIC_SCHEDULE): Removed.
2700 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2701 Tobias Grosser <grosser@fim.uni-passau.de>
2703 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2704 (print_graphite_bb): Same.
2705 (build_cloog_prog): Same.
2707 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2708 Tobias Grosser <grosser@fim.uni-passau.de>
2710 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2712 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2713 Tobias Grosser <grosser@fim.uni-passau.de>
2715 * graphite.c (build_scop_context): Don't use CloogMatrix.
2716 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2717 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2719 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2720 Tobias Grosser <grosser@fim.uni-passau.de>
2722 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2723 liveout_renames, add_params fields...
2724 (struct sese): ... here.
2725 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2726 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2728 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2729 Tobias Grosser <grosser@fim.uni-passau.de>
2731 * graphite.c (print_scop): Do not print the CLooG program.
2732 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2733 build_cloog_prog, gloog): Don't use SCOP_PROG.
2734 (find_transform): Renamed scop_to_clast.
2735 (print_generated_program, debug_generated_program): New.
2736 (graphite_transform_loops): Adapt to new interface.
2737 * graphite.h (struct scop): Remove program field.
2738 (SCOP_PROG): Removed.
2739 (print_generated_program, debug_generated_program): Declared.
2741 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2743 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2744 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2745 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2746 free_graphite_bb, build_scop_canonical_schedules,
2747 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2748 schedules are now represented using a ppl_Linear_Expression_t.
2749 * graphite.h (struct graphite_bb): Same.
2750 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2751 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2753 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2755 * graphite.c: Free local memory.
2756 * graphite-ppl.c: Same.
2758 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2760 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2761 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2762 swap_constraint_variables, scale_constraint_variable): Removed.
2763 (graphite_trans_bb_strip_mine): Remove pong.
2764 * graphite-ppl.c: Include missing header files.
2765 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2766 * graphite-ppl.h (ppl_strip_loop): Declared.
2767 * Makefile.in (graphite-ppl.o): Adjust dependences.
2769 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2771 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2772 (build_scop_iteration_domain): Same.
2774 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2776 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2778 (add_value_to_dim, scan_tree_for_params_right_scev,
2779 scan_tree_for_params_int): New.
2780 * graphite-ppl.c (oppose_constraint): New.
2781 (insert_constraint_into_matrix): Implement missing cases.
2782 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2784 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2786 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2787 use ppl_move_dimension.
2789 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2791 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2794 * graphite-ppl.c: Same.
2795 * graphite-ppl.h: Same.
2797 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2799 Revert last 3 commits.
2801 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2803 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2805 (add_value_to_dim, scan_tree_for_params_right_scev,
2806 scan_tree_for_params_int): New.
2807 * graphite-ppl.c (oppose_constraint): New.
2808 (insert_constraint_into_matrix): Implement missing cases.
2809 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2811 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2813 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2815 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2816 Tobias Grosser <grosser@fim.uni-passau.de>
2818 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2819 use ppl_move_dimension.
2820 * graphite-ppl.c (ppl_move_dimension): New.
2821 * graphite-ppl.h (ppl_move_dimension): Declared.
2823 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2825 * graphite.c: Do not include cloog/cloog.h.
2826 (print_graphite_bb): Remove ping pong, call PPL print function.
2828 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2830 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2831 (graphite.o): Add dependence on graphite-ppl.h.
2832 (graphite-ppl.o): New.
2833 (graphite-data-ref.c): Ping pong between PPL data structures
2835 * graphite-ppl.c: New.
2836 * graphite-ppl.h: New.
2837 * graphite.c: Include graphite-ppl.h.
2838 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2839 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2840 Ping pong between PPL data structures and matrices.
2841 (new_graphite_bb): Create a PPL constraint system.
2842 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2843 (build_loop_iteration_domains): Use PPL functions.
2844 * graphite.h: Include graphite-ppl.h. Fix comments.
2845 (graphite_bb): Use a ppl_Constraint_System_t instead of
2846 CloogMatrix for representing the domain.
2847 (scop): Remove static_schedule.
2848 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2850 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2852 * graphite.c: Fix some comments.
2854 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2857 * graphite.c (if_region_set_false_region): After moving a region
2858 in the false branch of a condition, remove the empty dummy
2860 (gloog): Remove wrong fix for PR38953.
2862 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2864 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2865 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2866 register_bb_in_sese, new_sese, free_sese): Moved.
2867 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2868 outermost_loop_in_scop, build_scop_iteration_domain,
2869 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2870 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2871 Use loop_in_sese_p instead of loop_in_scop_p.
2872 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2873 (free_scop): Do not free SCOP_BBS_B.
2874 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2875 ref_nb_loops): Moved here...
2876 * graphite.h (ref_nb_loops): ... from here.
2877 (struct scop): Remove bbs_b bitmap.
2878 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2879 * testsuite/gcc.dg/graphite/scop-19.c: New
2881 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2883 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2886 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2888 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2889 eq_loop_to_cloog_loop): Remove.
2890 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2891 * graphite.h (struct scop): Remove loop2cloog_loop.
2892 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2894 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2896 * opts.c (decode_options): Only add graphite options to O2
2897 if we compile with graphite enabled.
2899 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2901 * Merge from mainline (r143163:143684).
2903 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2905 * graphite.c (debug_value): Removed.
2906 * graphite.h (debug_value): Removed.
2908 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2910 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2911 after graphite: pass_copy_prop does not maintain a proper loop closed
2912 SSA form. pass_copy_prop should be fixed.
2914 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2916 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2918 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2920 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2921 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2922 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2925 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2927 * graphite.c (gloog): Return true when code gen succeeded.
2928 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2929 the code of the function did not changed. After cleanup_tree_cfg
2930 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2933 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2935 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2936 gimple_call_lhs is NULL.
2938 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2939 Tobias Grosser <tobi.grosser@amd.com>
2941 * graphite.c (graphite_trans_scop_block): Do not block single
2944 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2945 Tobias Grosser <tobi.grosser@amd.com>
2947 * graphite.c (build_scop_canonical_schedules): Start schedules at
2950 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2951 Tobias Grosser <tobi.grosser@amd.com>
2953 * graphite.c (compare_prefix_loops): New.
2954 (build_scop_canonical_schedules): Rewritten.
2955 (graphite_transform_loops): Move build_scop_canonical_schedules
2956 after build_scop_iteration_domain.
2958 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2959 Tobias Grosser <tobi.grosser@amd.com>
2961 * graphite.c (add_conditions_to_domain): Add the loops to
2962 the dimension of the iteration domain. Do copy the domain
2963 only when it exists.
2964 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2965 (add_conditions_to_constraints): New.
2966 (can_generate_code_stmt, can_generate_code): Removed.
2967 (gloog): Do not call can_generate_code.
2968 (graphite_transform_loops): Call add_conditions_to_constraints
2969 after building the iteration domain.
2971 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2972 Tobias Grosser <tobi.grosser@amd.com>
2973 Jan Sjodin <jan.sjodin@amd.com>
2975 * graphite.c (scan_tree_for_params): On substractions negate
2976 all the coefficients of the term.
2977 (clast_to_gcc_expression_red): New. Handle reduction expressions
2978 of more than two operands.
2979 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2980 (get_vdef_before_scop): Handle also the case of default definitions.
2982 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2985 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2986 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2987 (gloog): Do not call cleanup_tree_cfg.
2988 (graphite_transform_loops): Call cleanup_tree_cfg after all
2989 scops have been code generated.
2991 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2993 * passes.c (init_optimization_passes): Schedule after
2994 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2996 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2998 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3000 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3001 Set the type of an expression to the type of its assign statement.
3002 (expand_scalar_variables_expr): Do not pass loop_p.
3003 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3004 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3005 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3007 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3009 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3010 an expression to the gimple_expr_type of its assign statement.
3011 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3014 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3016 PR tree-optimization/38786
3017 * testsuite/gcc.dg/graphite/pr38786.c: New.
3018 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3019 the SSA_NAME case of expand_scalar_variables_expr.
3020 (expand_scalar_variables_expr): Also gather the scalar computation
3021 used to index the memory access.
3022 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3023 the gimple_stmt_iterator where it inserts new code.
3025 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3027 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3029 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3031 * opts.c (decode_options): Enable flag_graphite_identity and
3032 flag_loop_block in -O2 and above.
3034 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3036 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3037 Fix merge problem: replace with the file from trunk.
3039 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3041 * Merge from mainline (r141727:143163).
3043 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3044 Jan Sjodin <jan.sjodin@amd.com>
3046 PR tree-optimization/38559
3047 * testsuite/gcc.dg/graphite/pr38559.c: New.
3049 * graphite.c (debug_value, copy_constraint,
3050 swap_constraint_variables, scale_constraint_variable, ): New.
3051 (get_lower_bound, get_upper_bound): Removed.
3052 (graphite_trans_bb_strip_mine): Clean up this code that works
3053 only for constant number of iterations. Fully copy upper and
3054 lower bound constraints, not only the constant part of them.
3055 * graphite.h (debug_value): Declared.
3057 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3059 PR tree-optimization/38492
3060 PR tree-optimization/38498
3061 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3062 * tree-chrec.h (scev_is_linear_expression): Declared.
3063 * graphite.c (graphite_cannot_represent_loop_niter): New.
3064 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3065 (graphite_loop_normal_form): Use gcc_assert.
3066 (scan_tree_for_params): Use CASE_CONVERT.
3067 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3068 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3069 Use gcc_assert. Discard scops that contain unhandled cases.
3070 (build_scop_conditions): Return a boolean status for unhandled cases.
3071 (strip_mine_profitable_p): Print the loop number, not its depth.
3072 (is_interchange_valid): Pass the depth of the loop nest, don't
3073 recompute it wrongly.
3074 (graphite_trans_bb_block): Same.
3075 (graphite_trans_bb_block): Print tentative of loop blocking.
3076 (graphite_trans_scop_block): Do not print that the loop has been
3078 (graphite_transform_loops): Do not handle scops that contain condition
3081 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3083 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3084 * testsuite/gcc.dg/graphite/block-1.c: Same.
3085 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3087 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3088 * testsuite/gcc.dg/graphite/block-3.c: New.
3089 * testsuite/gcc.dg/graphite/pr38498.c: New.
3091 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3093 PR tree-optimization/38510
3094 * gcc.dg/graphite/pr38510.c: New.
3095 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3096 (translate_clast): Call recompute_all_dominators before
3098 (gloog): Call recompute_all_dominators before graphite_verify.
3100 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3102 PR tree-optimization/38492
3103 * graphite.c (rename_map_elt, debug_rename_elt,
3104 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3105 rename_map_elt_info, eq_rename_map_elts,
3106 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3107 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3108 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3109 (sese_build_livein_liveouts): New.
3110 (new_sese, free_sese): New.
3111 (new_scop): Call new_sese.
3112 (free_scop): Call free_sese.
3113 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3114 (register_old_new_names): Renamed register_old_and_new_names.
3115 (register_scop_liveout_renames, add_loop_exit_phis,
3116 insert_loop_close_phis, struct igp,
3117 default_liveout_before_guard, add_guard_exit_phis,
3118 insert_guard_phis, copy_renames): New.
3119 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3120 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3121 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3122 (scop_adjust_phis_for_liveouts): New.
3123 (gloog): Call scop_adjust_phis_for_liveouts.
3125 * graphite.h (struct sese): Documented. Added fields liveout,
3127 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3128 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3129 (struct scop): Added field liveout_renames.
3130 (SCOP_LIVEOUT_RENAMES): New.
3132 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3134 PR tree-optimization/38409
3135 * gcc.dg/graphite/pr38409.c: New.
3136 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3138 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3140 * graphite.c (gcc_type_for_cloog_iv): By default return
3142 (graphite_create_new_loop): Don't fold_convert the already
3143 fold_convert-ed expression.
3145 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3147 PR tree-optimization/38446
3148 * gcc.dg/graphite/pr38446.c: New.
3149 * graphite.c (register_bb_in_sese): New.
3150 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3151 looking at the bbs in the region.
3152 * graphite.h (sese): Add region_basic_blocks pointer set to
3153 structure and initialize at the time of defining new scop.
3155 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3157 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3158 (find_params_in_bb): Do not free data refs.
3159 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3161 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3163 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3164 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3165 * testsuite/gcc.dg/graphite/block-5.c: New.
3166 * testsuite/gcc.dg/graphite/block-6.c: New.
3167 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3168 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3169 * testsuite/gcc.dg/graphite/block-2.c: Same.
3171 * graphite.c (struct ivtype_map_elt): New.
3172 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3173 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3174 gcc_type_for_cloog_iv): New.
3175 (loop_iv_stack_patch_for_consts): Use the type of the induction
3176 variable from the original loop, except for the automatically
3177 generated loops, i.e., in the case of a strip-mined loop, in
3178 which case there is no original loop: in that case just use
3180 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3181 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3182 (clast_name_to_gcc): Accept params to be NULL.
3183 (clast_to_gcc_expression): Take an extra parameter for the type.
3184 Convert to that type all the expressions built by this function.
3185 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3186 (graphite_translate_clast_equation): Compute the type of the
3187 clast_equation before translating its LHS and RHS.
3188 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3189 (graphite_create_new_loop): Compute the type of the induction
3190 variable before translating the lower and upper bounds and before
3191 creating the induction variable.
3192 (rename_variables_from_edge, rename_phis_end_scop): New.
3193 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3194 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3195 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3196 compute_cloog_iv_types): New.
3197 (gloog): Call compute_cloog_iv_types before starting the
3198 translation of the clast.
3200 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3201 (GBB_CLOOG_IV_TYPES): New.
3202 (debug_ivtype_map): Declared.
3203 (oldiv_for_loop): New.
3205 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3208 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3209 (param_index): Assert if parameter is not know after parameter
3211 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3212 (find_scop_parameters): Mark, that we have finished parameter
3214 (graphite_transform_loops): Move condition detection before parameter
3216 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3217 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3219 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3221 * graphite.c (graphite_transform_loops): Always call find_transform ()
3222 in ENABLE_CHECKING. So we test these code paths, even if we do not
3225 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3227 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3228 (print_scop): Ditto.
3230 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3233 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3234 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3235 regions more than once.
3237 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3239 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3240 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3243 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3245 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3246 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3247 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3248 (max_precision_type): New.
3249 (value_clast): Removed.
3250 (clast_to_gcc_expression): Be more careful to types of expressions.
3251 Use max_precision_type and update use of gmp_cst_to_tree.
3252 (graphite_translate_clast_equation): Use max_precision_type.
3253 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3254 use the type of the condition.
3255 (graphite_create_new_loop): Do not use integer_type_node, use the
3256 max_precision_type of lb and ub.
3258 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3260 * graphite.c (build_scops_1): Initialize open_scop.exit
3263 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3265 * testsuite/gcc.dg/graphite/pr38084.c: New.
3266 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3267 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3268 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3269 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3270 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3272 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3273 Jan Sjodin <jan.sjodin@amd.com>
3274 Harsha Jagasia <harsha.jagasia@amd.com>
3286 * testsuite/gcc.dg/graphite/pr38073.c: New.
3287 * testsuite/gcc.dg/graphite/pr37928.c: New.
3288 * testsuite/gcc.dg/graphite/pr37883.c: New.
3289 * testsuite/gcc.dg/graphite/pr38125.c: New.
3290 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3291 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3292 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3294 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3295 the number of detected scops. Copy exact same test for loop
3297 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3298 loops to be blocked as reductions are not handled.
3299 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3301 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3302 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3304 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3305 * Makefile.in (graphite.o): Depend on value-prof.h.
3306 (graphite.o-warn): Removed -Wno-error.
3307 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3308 to be a NULL pointer. Call update_stmt. Return the newly created
3309 cannonical induction variable.
3311 * graphite.h (debug_rename_map): Declared. Fix some comments.
3313 * graphite.c: Reimplement the code generation from graphite to gimple.
3314 Include value-prof.h.
3315 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3316 (get_old_iv_from_ssa_name): Removed.
3317 (graphite_stmt_p): New.
3318 (new_graphite_bb): Test for useful statements before building a
3319 graphite statement for the basic block.
3320 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3321 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3323 (recompute_all_dominators, graphite_verify,
3324 nb_reductions_in_loop, graphite_loop_normal_form): New.
3325 (scop_record_loop): Call graphite_loop_normal_form.
3326 (build_scop_loop_nests): Iterate over all the blocks of the
3327 function instead of relying on the incomplete information from
3328 SCOP_BBS. Return the success of the operation.
3329 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3330 (add_bb_domains): Removed.
3331 (build_loop_iteration_domains): Don't call add_bb_domains.
3332 Add the iteration domain only to the basic blocks that have been
3333 translated to graphite.
3334 (build_scop_conditions_1): Add constraints only if the basic
3335 block have been translated to graphite.
3336 (build_scop_data_accesses): Completely disabled until data
3337 dependence is correctly implemented.
3338 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3339 (remove_all_edges_1, remove_all_edges): Removed.
3340 (get_new_name_from_old_name): New.
3341 (graphite_rename_variables_in_stmt): Renamed
3342 rename_variables_in_stmt. Call get_new_name_from_old_name.
3343 Use replace_exp and update_stmt.
3344 (is_old_iv): Renamed is_iv.
3345 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3346 Use replace_exp and update_stmt.
3347 (expand_scalar_variables_expr): Same. Use the map to get the
3348 new names for the renaming of induction variables and for the
3349 renaming of variables after a basic block has been copied.
3350 (expand_scalar_variables): Same.
3351 (graphite_rename_variables): Renamed rename_variables.
3352 (move_phi_nodes): Removed.
3353 (get_false_edge_from_guard_bb): New.
3354 (build_iv_mapping): Do not insert the induction variable of a
3355 loop in the renaming iv map if the basic block does not belong
3357 (register_old_new_names, graphite_copy_stmts_from_block,
3358 copy_bb_and_scalar_dependences): New.
3359 (translate_clast): Heavily reimplemented: copy basic blocks,
3360 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3361 At each translation step call graphite_verify ensuring the
3362 consistency of the SSA, loops and dominators information.
3363 (collect_virtual_phis, find_vdef_for_var_in_bb,
3364 find_vdef_for_var_1, find_vdef_for_var,
3365 patch_phis_for_virtual_defs): Removed huge hack.
3366 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3367 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3368 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3369 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3370 if_region_get_condition_block, if_region_set_false_region,
3371 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3372 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3373 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3374 rewrite_into_sese_closed_ssa): New.
3375 (gloog): Remove dead code. Early return if code cannot be
3376 generated. Call cleanup_tree_cfg once the scop has been code
3378 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3379 block loops with less than two loops.
3380 (graphite_apply_transformations): Remove the call to
3381 scop_remove_ignoreable_gbbs.
3382 (limit_scops): When build_scop_loop_nests fails, continue on
3383 the next scop. Fix open_scop.entry.
3384 (graphite_transform_loops): Call recompute_all_dominators: force the
3385 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3386 Call initialize_original_copy_tables and free_original_copy_tables
3387 to be able to copy basic blocks during code generation.
3388 When build_scop_loop_nests fails, continue on next scop.
3389 (value_clast): New union.
3390 (clast_to_gcc_expression): Fix type cast warning.
3392 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3394 * Merge from mainline (r140838:141727).
3396 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3400 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3402 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3406 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3407 exits and conditions.
3408 * testsuite/gcc.dg/graphite/pr37943.c: New.
3410 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3413 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3415 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3417 * doc/invoke.texi: Fix spaces.
3419 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3421 PR tree-optimization/37891
3422 Reverted last commit.
3423 * graphite.c (create_single_entry_edge): Set
3424 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3426 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3427 Mitul Thakkar <mitul.thakkar@amd.com>
3429 * graphite.c (create_single_entry_edge): Set
3430 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3432 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3434 * doc/invoke.texi: Add -fgraphite-identity.
3435 * graphite.c (graphite_apply_transformations): Check for
3436 -fgraphite-identity.
3437 * toplev.c (process_options): Add flag_graphite_identity.
3438 * tree-ssa-loop.c: Add flag_graphite_identity.
3440 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3442 Undo changes from 2008-10-02:
3443 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3444 operand type when copying the operand to a variable of different type.
3445 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3446 with the IV name after increment.
3448 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3449 Harsha Jagasia <harsha.jagasia@amd.com>
3451 PR tree-optimization/37828
3452 * testsuite/gcc.dg/graphite/pr37828.c: New.
3453 * graphite.c (graphite_trans_loop_block): Do not loop block
3454 single nested loops.
3456 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3457 Sebastian Pop <sebastian.pop@amd.com>
3459 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3460 rename_map_elt_info, eq_rename_map_elts): New.
3461 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3462 (expand_scalar_variables_expr): Change parameters.
3463 (expand_scalar_variables_stmt): Same.
3464 (expand_scalar_variables): Same.
3465 (graphite_rename_ivs): Rename graphite_rename_variables.
3466 (build_iv_mapping): New.
3467 (translate_clast): Call build_iv_mapping.
3468 * graphite.h (gbb_p): New name.
3470 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3472 PR tree-optimization/37684
3473 * gcc.dg/graphite/pr37684.c: New.
3474 * graphite.c (exclude_component_ref): New.
3475 (is_simple_operand): Call exclude_component_ref.
3477 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3478 Harsha Jagasia <harsha.jagasia@amd.com>
3480 PR tree-optimization/37485
3481 * gcc.dg/graphite/block-2.c: New
3482 * graphite.c (gmp_cst_to_tree): Moved.
3483 (iv_stack_entry_is_constant): New.
3484 (iv_stack_entry_is_iv): New.
3485 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3486 (loop_iv_stack_insert_constant): New.
3487 (loop_iv_stack_pop): Use new datatpype.
3488 (loop_iv_stack_get_iv): Same.
3489 (loop_iv_stack_get_iv_from_name): Same.
3490 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3491 (loop_iv_stack_patch_for_consts): New.
3492 (loop_iv_stack_remove_constants): New.
3493 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3494 (translate_clast): Call loop_iv_stack_patch_for_consts and
3495 loop_iv_stack_remove_constants.
3496 (gloog): Use new datatype. Redirect construction edge to end
3497 block to avoid accidental deletion.
3498 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3500 (union iv_stack_entry_data): New. Data in iv stack entry.
3501 (struct iv_stack_entry): New. Datatype for iv stack entries.
3503 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3505 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3506 operand type when copying the operand to a variable of different type.
3508 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3510 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3511 with the IV name after increment.
3513 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3515 * Merge from mainline (r140164:140838).
3517 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3519 * graphite-data-ref.c: New.
3520 * graphite.c (print_scop): Also dump the dependence graph.
3521 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3522 (new_scop): Initialize SCOP_DEP_GRAPH.
3523 (build_scop_dynamic_schedules): New.
3524 (build_access_matrix_with_af): Fixed column numbering.
3525 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3526 * graphite.h: Add ifndef/define guards against multiple inclusion.
3527 (struct scop): Add dep_graph field.
3528 (SCOP_DEP_GRAPH): Defined.
3529 (ref_nb_loops): Fixed and moved to other position.
3530 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3531 (nb_loops_around_loop_in_scop): New.
3532 (graphite_dump_dependence_graph): Declared.
3533 (graphite_build_rdg_all_levels): Declared.
3534 (graphite_test_dependence): Declared.
3535 * Makefile.in (graphite-data-ref.o): New target.
3537 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3539 * Merge from mainline (139870:140164).
3541 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3543 * Merge from mainline (138275:139870).
3544 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3545 the commits from trunk broke the niter detection.
3547 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3549 * graphite.c: Add more documentation. Fix formatting.
3550 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3551 loop_iv_stack_debug): Moved...
3552 (schedule_to_scattering): Move before use.
3553 (dot_all_scops): Include in "#if 0" the code for system
3556 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3557 loop_iv_stack_debug): ...here.
3559 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3561 * tree-phinodes.c (make_phi_node): Extern.
3562 (add_phi_node_to_bb): New.
3563 (create_phi_node): Call add_phi_node_to_bb.
3564 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3565 (remove_statement): Handle case where stored phi was updated
3566 and is no longer the same.
3567 * graphite.c (is_parameter): New.
3569 (expand_scalar_variables_expr): New.
3570 (expand_scalar_variables_stmt): New.
3571 (expand_scalar_variables): New.
3572 (move_phi_nodes): Create new phi instead of moving old one.
3573 (translate_clast): Call expand_scalar_variables.
3574 (find_vdef_for_var_in_bb): Also scan regular definitions.
3575 (skip_phi_defs): New.
3576 (collect_scop_exit_phi_args): New.
3577 (patch_scop_exit_phi_args): New.
3578 (gloog): Patch phis after scop.
3579 * tree-flow.h: (add_phi_node_to_bb): Declared.
3580 (make_phi_node): Declared.
3582 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3584 * graphite.c (end_scop): Split the entry of the scop when it
3585 is the header of the loop in which the scop is ending.
3586 (build_scops_1, limit_scops): Update uses of end_scop.
3588 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3590 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3591 SCOP_ENTRY or SCOP_EXIT.
3593 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3595 * graphite.c (get_construction_edge): Removed.
3596 (gloog): Construction edge is the scop entry edge.
3598 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3600 * graphite.c (can_generate_for_scop): Removed.
3601 (gloog): Do not call it.
3603 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3605 * graphite.c (new_scop): Entry of a scop is an edge.
3606 Initialize SESE region.
3607 (free_scop): Free SESE region.
3608 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3609 (split_difficult_bb): New, split from end_scop.
3610 (end_scop): Exit of a scop is an edge.
3611 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3612 not automatically updated and thus is always wrong.
3613 * graphite.h (struct sese): New.
3616 (struct scop): New field for a SESE region. Remove entry, exit.
3617 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3618 semantics as before. Moved comment around.
3620 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3621 Sebastian Pop <sebastian.pop@amd.com>
3623 * graphite.c (graphite_transform_loops): Always enable gloog
3624 and find_transform when ENABLE_CHECKING.
3626 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3628 * graphite.c (graphite_transform_loops): Move pretty printer
3629 of SCOPs before doing any transform. Remove call to print_scops
3630 and dot_all_scops_1.
3632 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3634 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3635 (print_graphite_bb): Same.
3637 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3639 * graphite.c (dot_all_scops_1): Cleanup.
3640 (move_scops): Fix comment.
3642 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3644 * graphite.c (build_scop_bbs): Revert commit 139355:
3646 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3647 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3649 * graphite.c (build_scop_bbs): Factor up code.
3651 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3653 * graphite.c (gloog): Update dominator info.
3655 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3657 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3659 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3661 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3663 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3664 (translate_clast): Correct formatting.
3665 * graphite.h (struct num_map): Removed.
3666 (struct graphite_bb): Remove num_map field.
3667 (GBB_INDEX_TO_NUM_MAP): Removed.
3669 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3671 * graphite.c (build_access_matrix_with_af): Fix comments.
3672 (build_scop_data_accesses): Same.
3674 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3676 * graphite.c (build_scop_data_accesses): Don't construct
3677 access matrices. Add a FIXME and an assert condition that
3678 should pass when the access matrices will be needed.
3680 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3682 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3684 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3685 Moved close by free_graphite_bb.
3686 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3687 (new_scop): Move close by free_scop.
3688 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3690 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3692 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3693 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3694 instead of recursive call.
3695 (graphite_translate_clast_equation): New.
3696 (graphite_create_guard_cond_expr): New.
3697 (graphite_create_new_guard): New.
3698 (get_stack_index_from_iv): Removed.
3699 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3700 (get_true_edge_from_guard_bb): New.
3701 (translate_clast): Handle stmt_guard in clast.
3702 (get_construction_edge): Allow construction edge detection for
3703 a scope entry with multiple predecessors if one predecessor is
3704 the immediate dominator of scope entry.
3705 (can_generate_code_stmt): Enable code generation for clast_guard.
3706 (gloog): Use correct context loop. Removed check for post dominators.
3707 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3709 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3711 * graphite.c (remove_dead_loops): Document better which
3714 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3716 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3718 (graphite.o): Also depends on pointer-set.h.
3720 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3722 * graphite.c (scop_record_loop): Fix compile warning.
3724 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3725 Sebastian Pop <sebastian.pop@amd.com>
3727 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3729 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3731 * graphite.c (build_graphite_bb): Initialize bb->aux to
3732 point to the graphite_bb_p.
3733 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3735 (add_bb_domains): Does not use the scop parameter.
3736 (graphite_transform_loops): Clean bb->aux at the end.
3738 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3739 Sebastian Pop <sebastian.pop@amd.com>
3741 * testsuite/lib/target-supports.exp
3742 (check_effective_target_fgraphite): New.
3744 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3745 check_effective_target_fgraphite returns false.
3746 Set dg-do-what-default to compile.
3747 (scan-graphite-dump-times): Removed.
3748 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3750 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3751 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3752 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3753 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3754 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3755 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3756 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3757 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3758 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3759 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3760 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3761 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3762 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3763 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3764 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3765 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3766 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3767 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3768 * testsuite/gcc.dg/graphite/block-0.c: Same.
3769 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3770 * testsuite/gcc.dg/graphite/block-1.c: Same.
3771 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3772 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3773 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3774 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3775 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3777 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3779 * graphite.c: Fix some XXX comments.
3780 (build_scop_dynamic_schedules): Removed.
3782 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3784 * graphite.h (scop_max_loop_depth): Moved...
3785 * graphite.c (scop_max_loop_depth): ...here.
3786 (remove_all_edges_1): New.
3787 (remove_all_edges): Factored code.
3788 (remove_cond_exprs): Check only the last statement for
3789 a GIMPLE_COND expression.
3791 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3793 * graphite.c (scan_tree_for_params): Early return when the
3794 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3795 (find_scop_parameters): Factor out code.
3796 (graphite_trans_bb_strip_mine): Remove dead code.
3798 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3800 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3801 graphite_trans_bb_move_loop): Factor asserts.
3802 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3803 Do not call calculate_dominance_info and estimate_bb_frequencies.
3805 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3807 * graphite.c (create_loops_mapping, free_loops_mapping,
3808 create_loops_mapping_num, debug_loop_mapping_1,
3809 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3810 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3811 graphite_loops_mapping_add_child_num,
3812 graphite_loops_mapping_insert_child,
3813 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3814 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3815 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3816 create_num_from_index, get_num_from_index,
3817 swap_loop_mapped_depth): Removed.
3818 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3819 (free_scop): Do not call free_loops_mapping.
3820 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3821 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3822 get_loop_mapped_depth.
3823 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3824 (graphite_trans_bb_strip_mine): Same.
3825 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3826 (struct scop): Remove field loops_mapping.
3828 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3829 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3831 * graphite.c (scop_record_loop): Factor out one level of the
3832 condition by early return.
3833 (build_scop_loop_nests): Format following FSF coding style.
3834 (build_scop_dynamic_schedules): Factor out code.
3835 (scopdet_bb_info): Reindent. Default case should not be reachable.
3837 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3838 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3840 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3841 assignments that are not handled as simple operands for now.
3843 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3844 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3846 * graphite.c (build_scop_bbs): Factor up code.
3848 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3849 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3851 * graphite.c (stmt_simple_for_scop_p): Factor code out
3853 (enum gbb_type): New. Group all the GBB_* types under it.
3854 (is_loop_exit): Moved...
3855 (end_scop): Enable BB spliting.
3856 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3857 * cfgloop.h (is_loop_exit): Declared.
3859 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3861 * doc/invoke.texi: Remove strides from examples containing
3862 DO loops when the strides are equal to 1.
3864 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3865 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3867 * graphite.c (graphite_trans_scop_block): Or the result with
3868 the result from graphite_trans_loop_block.
3869 * testsuite/gcc.dg/graphite/block-1.c: New.
3870 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3871 * testsuite/gfortran.dg/graphite/block-2.f: New.
3873 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3875 * graphite.c (graphite_transform_loops): Call cloog_initialize
3878 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3880 * tree-data-ref.c) (stmt_simple_memref_p): New.
3881 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3882 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3883 (is_simple_operand): Call stmt_simple_memref_p.
3885 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3886 using pointer arithmetic, as this is optimized by PRE and
3887 makes the code too difficult to analyze.
3889 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3891 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3893 * gdbinit.in (pgg): New.
3895 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>