1 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
4 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
7 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
9 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
10 * graphite-interchange.c (pbb_do_interchange): Same.
11 * graphite-poly.c (print_scattering_function): Same.
13 * graphite-poly.h (pbb_loop): New.
14 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
16 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
18 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
20 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
22 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
23 so don't pass a pointer to it.
24 (build_alias_set_for_drs): Same.
25 (build_base_obj_set_for_drs): Same.
26 (build_scop_drs): Same.
28 2009-09-26 Li Feng <nemokingdom@gmail.com>
30 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
31 the alias graph of data references.
33 2009-09-25 Li Feng <nemokingdom@gmail.com>
35 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
36 (build_scop_drs): When debugging, write the alias graph to file,
37 otherwise, should be disabled.
39 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
41 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
42 (is_simple_operand): Remove call to stmt_simple_memref_p.
43 (stmt_simple_for_scop_p): Update call to is_simple_operand.
45 2009-09-17 David Edelsohn <edelsohn@gnu.org>
47 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
48 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
49 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
50 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
51 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
53 2009-09-17 Li Feng <nemokingdom@gmail.com>
56 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
57 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
58 (graphite_carried_dependence_level_k): Ditto.
59 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
60 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
61 (new_poly_dr): Adjust declaration.
62 * graphite-sese-to-poly.c (free_data_refs_aux): New.
63 (free_gimple_bb): Added free_data_refs_aux.
64 (build_poly_dr): Add dr_base_object_set.
65 (partition_drs_to_sets): New.
66 (dr_same_base_object_p): New.
67 (build_alias_set_for_drs): New.
68 (build_base_object_set_for_drs): New.
69 (build_scop_drs): Add build_base_obj_set_for_drs.
70 * graphite-sese-to-poly.h: Added #define for alias set number index and
71 base object set index.
72 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
73 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
75 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
77 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
78 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
80 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-sese-to-poly.c (struct irp_data): Removed.
83 (idx_record_params): Removed.
84 (find_params_in_bb): Scan for parameters the access functions; don't
85 parse the tree representation.
87 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
89 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
90 passes at -O1 and below.
92 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
94 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
95 tree-scalar-evolution.h, and then tree-data-ref.h.
96 * graphite-clast-to-gimple.c: Same.
97 * graphite-dependences.c: Same.
98 * graphite-interchange.c: Same.
99 * graphite-poly.c: Same.
100 * graphite-scop-detection.c: Same.
101 * graphite-sese-to-poly.c: Same.
103 * lambda-code.c: Same.
104 * matrix-reorg.c: Same.
105 * tree-data-ref.c: Same.
106 * tree-if-conv.c: Same.
107 * tree-loop-distribu: Same.: Same.
108 * tree-loop-linear.c: Same.
109 * tree-parloops.c: Same.
110 * tree-predcom.c: Same.
111 * tree-vect-patterns.c: Same.
113 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
115 Partially revert the previous patch, except the following.
116 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
117 as parameters the operands of the not expression.
119 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
121 * tree-scalar-evolution.c (instantiate_scev_assign): New.
122 Do not call analyze_scalar_evolution on assignments.
123 (instantiate_scev_phi): Call analyze_scalar_evolution.
124 (instantiate_scev_name): Call instantiate_scev_assign and
125 instantiate_scev_phi.
126 (instantiate_scev_not): Adapted to pass as parameters the operands
127 of the not expression.
129 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
131 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
132 to pass as parameters the operands of the binary expression.
134 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
136 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
137 instantiate_scev_not. Handle NEGATE_EXPR.
138 (instantiate_scev_r): Handle NEGATE_EXPR.
140 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
142 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
144 (instantiate_scev_r): Move code in instantiate_scev_2
145 and instantiate_scev_1.
147 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
149 * tree-scalar-evolution.c (instantiate_scev_3): New.
150 (instantiate_scev_1): Move code in instantiate_scev_3.
152 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
154 * tree-scalar-evolution.c (instantiate_scev_poly): New.
155 (instantiate_scev_1): Move code in instantiate_scev_poly.
157 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
159 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
160 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
162 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
164 * tree-scalar-evolution.c (instantiate_scev_convert): New.
165 (instantiate_scev_1): Move code in instantiate_scev_convert.
167 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
169 * tree-scalar-evolution.c (instantiate_scev_binary): New.
170 (instantiate_scev_1): Move code in instantiate_scev_binary.
172 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
174 * tree-scalar-evolution.c (instantiate_scev_name): New.
175 (instantiate_scev_1): Move code in instantiate_scev_name.
177 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
179 * Merge from mainline (150992:151171).
181 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
183 * graphite-dependences.c (graphite_legal_transform_bb): Call
184 pbb_remove_duplicate_pdrs.
185 * graphite-poly.c (can_collapse_pdr): Removed.
186 (pdr_find_duplicate): Removed.
187 (can_collapse_pdrs): New.
188 (pbb_remove_duplicate_pdrs): New.
189 (new_poly_dr): Do not look for duplicates.
190 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
191 (PBB_PDR_DUPLICATES_REMOVED): New.
192 (pbb_remove_duplicate_pdrs): Declared.
194 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
196 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
197 the strides by multiplying by PDR_NB_REFS.
198 * graphite-poly.c (can_collapse_pdr): New.
199 (pdr_find_duplicate): New.
200 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
201 Initialize PDR_NB_REFS.
202 * graphite-poly.h (struct poly_dr): Add field nb_refs.
204 (new_poly_dr): Number of subscripts is a graphite_dim_t.
206 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
208 Revert one of the previous commits:
209 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
210 the computation of symmetric data dependence relations.
211 (dependency_between_pbbs_p): Same.
213 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
216 * graphite-poly.c (apply_poly_transforms): Remove legality test before
219 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
221 * graphite-dependences.c (pddr_original_scattering): Return NULL
222 for read-read dependence relations.
223 * graphite-poly.h (enum poly_dr_type): Fix comment.
226 (pdr_may_write_p): New.
228 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
230 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
231 (struct poly_dr): Same.
233 * graphite-poly.c (new_poly_dr): Same.
235 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
236 Sebastian Pop <sebastian.pop@amd.com>
238 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
239 pbb_strip_mine_time_depth. Changed the implementation so that
240 transformation is expressed as a transformation on
241 time (scatttering) dimensions. Also, ensures that the 2d+1
242 scheduling format is preserved.
243 (pbb_strip_mine_profitable_p): Profitability is based on the
244 iteration number of a given time (scattering) dimension,
245 and not on a original loop depth dimension.
246 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
247 (pbb_do_strip_mine): Call psct_dynamic_dim.
248 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
249 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
250 (pbb_nb_dynamic_scattering_transform): New.
251 (psct_dynamic_dim): New.
253 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
255 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
256 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
257 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
258 * graphite-interchange.c (build_linearized_memory_access): Same.
259 (memory_stride_in_loop): Same.
261 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
263 * graphite-dependences.c (pddr_original_scattering): New.
264 (graphite_legal_transform_dr): Call pddr_original_scattering.
267 * graphite-dependences.h (dot_deps): Declared.
268 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
269 (print_pdr): Print PDR_ID.
270 * graphite-poly.h (struct poly_dr): Add field id.
273 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
275 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
277 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
278 not delete the original dependence relation.
280 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
283 the computation of symmetric data dependence relations.
284 (dependency_between_pbbs_p): Same.
286 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
288 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
289 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
290 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
291 (free_poly_ddr): New.
292 (pddr_is_empty): New.
293 (dependence_polyhedron_1): Now returns a poly_ddr_p.
294 (dependence_polyhedron): Same. Remove useless gcc_assert.
296 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
297 (graphite_carried_dependence_level_k): Call pddr_is_empty.
298 * graphite-dependences.h (enum poly_dependence_kind): New.
299 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
300 (PDRP_SOURCE): Renamed PDDR_SOURCE.
301 (PDRP_SINK): Renamed PDDR_SINK.
302 (PDRP_DDP): Renamed PDDR_DDP.
304 (free_poly_ddr): Declared.
305 * graphite-poly.c (new_scop): Use the new hash function names.
306 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
308 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
310 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
312 * Merge from mainline (150764:150992).
314 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
316 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
317 bounds with LT_EXPR to make niter analysis more precise on code
318 generated by Graphite.
320 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
322 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
323 (graphite_legal_transform_bb): Same.
324 (poly_drs_may_alias_p): Same.
326 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
329 * graphite-ppl.c (ppl_max_for_le): Correct the use of
330 ppl_Pointset_Powerset_C_Polyhedron_maximize.
332 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
334 * graphite-poly.c (print_pbb): Print PBB index.
336 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
338 * Merge from mainline (r150672:150764).
340 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
342 * graphite-interchange.c (ppl_max_for_le): Moved...
343 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
344 * graphite-ppl.c (ppl_max_for_le): ... here.
345 * graphite-ppl.h (ppl_max_for_le): Declared.
347 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
349 * Merge from mainline (r150372:150672).
351 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
354 * sese.c (convert_for_phi_arg): New.
355 (add_guard_exit_phis): Use convert_for_phi_arg.
357 * testsuite/gfortran.dg/graphite/id-17.f: New.
359 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
361 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
362 unknown subscript upper bounds.
364 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
366 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
367 Pranav Garg <pranav.garg2107@gmail.com>
369 * graphite-interchange.c (gather_access_strides): Removed.
370 (ppl_max_for_le): New.
371 (build_linearized_memory_access): New.
372 (memory_stride_in_loop): New.
373 (pbb_interchange_profitable_p): Reimplemented.
374 * graphite-ppl.h (ppl_new_id_map): New.
375 (ppl_interchange): New.
377 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
379 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
381 * graphite-interchange.c (compute_subscript): Removed.
382 (compute_array_size_cstr): Removed.
383 (compute_array_size_poly): Removed.
384 (compute_array_size): Removed.
385 (gather_access_strides_poly): Removed.
386 (gather_access_strides): Empty.
388 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
390 * graphite-dependences.c (dependence_polyhedron_1): Replace
391 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
392 (graphite_legal_transform_dr): Same.
393 (graphite_carried_dependence_level_k): Same.
394 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
395 Initialize PDR_NB_SUBSCRIPTS.
396 (print_pdr_access_layout): Replace pdr_nb_subscripts with
398 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
399 (PDR_NB_SUBSCRIPTS): New.
400 (pdr_nb_subscripts): Removed.
401 (pdr_dim): Simplified.
402 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
403 with PDR_NB_SUBSCRIPTS.
405 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
407 * graphite-interchange.c (compute_array_size): Remove use of
409 * graphite-poly.c (new_poly_dr): Remove argument data_container.
410 Do not initialize PDR_DATA_CONTAINER.
411 (print_pdr): Do not print PDR_DATA_CONTAINER.
412 * graphite-poly.h (struct poly_dr): Remove data_container field.
413 (PDR_DATA_CONTAINER): Removed.
414 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
416 (build_poly_dr): Same.
418 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
420 * testsuite/gcc.dg/graphite/interchange-9.c: New.
422 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
423 Sebastian Pop <sebastian.pop@amd.com>
425 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
426 copy of the dependence polyhedron. Free the temporary objects.
427 (graphite_carried_dependence_level_k): Free unused objects before
430 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
431 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
432 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
433 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
434 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
436 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
438 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
439 Early return without analyzing the data dependences if no
440 transform has been done. Call restore_scattering if the transform
442 (graphite-interchange.c): Same.
443 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
444 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
445 (apply_poly_transforms): Do not gcc_assert that
446 the transform is legal.
447 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
448 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
449 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
450 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
451 * graphite-poly.h (struct poly_scattering): New.
452 (struct poly_bb): Add original, transformed, and saved fields.
453 Remove transformed_scattering, original_scattering, nb_local_variables,
454 and nb_scattering_transform fields.
455 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
456 (poly_scattering_new): New.
457 (poly_scattering_free): New.
458 (poly_scattering_copy): New.
459 (store_scattering_pbb): New.
460 (store_scattering): New.
461 (restore_scattering_pbb): New.
462 (restore_scattering): New.
463 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
464 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
466 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
468 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
471 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
473 * Makefile.in (graphite.o): Depends on PREDICT_H.
474 * graphite.c: Include predict.h.
475 (graphite_finalize): Call tree_estimate_probability.
476 * predict.c (predict_loops): Do not call scev_initialize and
478 (tree_estimate_probability_bb): New.
479 (tree_estimate_probability): Do not initialize loops: move that
480 code to the driver. Call tree_estimate_probability_bb.
481 (tree_estimate_probability_driver): New.
482 (pass_profile): Use tree_estimate_probability_driver.
483 * predict.h (tree_estimate_probability): Declared.
485 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
487 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
488 * graphite-dependences.c (graphite_legal_transform): Add time to
489 TV_GRAPHITE_DATA_DEPS.
490 (dependency_between_pbbs_p): Same.
491 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
493 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
495 * Merge from mainline (r149952:150372).
497 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
499 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
500 * graphite-blocking.c: Same.
501 * graphite-clast-to-gimple.c: Same.
502 * graphite-dependences.c: Same.
503 * graphite-poly.c: Same.
504 * graphite-poly.h: Same.
505 * graphite-ppl.c: Same.
506 * graphite-scop-detection.c: Same.
507 * graphite-sese-to-poly.c: Same.
510 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
512 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
513 (remove_simple_copy_phi): New.
514 (remove_invariant_phi): New.
515 (simple_copy_phi_p): New.
516 (reduction_phi_p): New.
517 (gsi_for_ssa_name_def): New.
518 (insert_out_of_ssa_copy): New.
519 (insert_out_of_ssa_copy_on_edge): New.
520 (create_zero_dim_array): New.
521 (scalar_close_phi_node_p): New.
522 (rewrite_close_phi_out_of_ssa): New.
523 (rewrite_phi_out_of_ssa): New.
524 (rewrite_reductions_out_of_ssa): New.
525 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
527 * testsuite/gcc.dg/graphite/id-11.c: New.
528 * testsuite/gcc.dg/graphite/id-15.c: New.
529 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
530 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
531 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
532 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
533 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
534 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
535 * testsuite/gfortran.dg/graphite/id-13.f: New.
536 * testsuite/gfortran.dg/graphite/id-5.f: New.
538 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
540 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
541 check that nb_reductions_in_loop is zero.
542 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
544 (nb_reductions_in_loop): Removed.
545 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
546 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
547 (bb_contains_non_iv_scalar_phi_nodes): Removed.
548 (scop_contains_non_iv_scalar_phi_nodes): Removed.
549 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
551 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
553 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
554 statements that have an empty iteration domain.
555 * testsuite/gfortran.dg/graphite/id-16.f: New.
557 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
559 * tree-scalar-evolution.c (instantiate_scev_1): Return
560 chrec_dont_know when the result is not above instantiate_below.
561 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
562 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
563 the tree has a known scalar evolution.
564 * testsuite/gfortran.dg/graphite/id-14.f: New.
565 * testsuite/gfortran.dg/graphite/id-15.f: New.
567 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
569 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
571 (rename_variables): Keep inserting renames after the ones already
574 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
576 * graphite-sese-to-poly.c (compare_bb_depths): New.
577 (graphite_sort_dominated_info): New.
578 (build_scop_bbs_1): Call graphite_sort_dominated_info.
579 (build_scop_scattering): Fix comment.
581 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
583 * graphite.c (graphite_finalize): Call print_loops instead of
584 dump_function_to_file.
585 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
586 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
587 loops generated in the graphite output file.
588 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
589 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
590 * testsuite/gfortran.dg/graphite/id-12.f: New.
592 2009-07-24 Li Feng <nemokingdom@gmail.com>
594 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
597 2009-07-24 Li Feng <nemokingdom@gmail.com>
598 Tobias Grosser <grosser@fim.uni-passau.de>
600 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
601 alias set number build alias in ACCESSES polyhedron.
602 (build_alias_set_for_drs): New.
603 (build_pbb_drs): Added build_alias_set_for_drs.
604 * graphite-dependences.c (poly_drs_may_alias_p): New.
605 (graphite_carried_dependence_level_k): Check alias information
606 before building polyhedron.
608 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
610 * Makefile.in (lambda-code.o): Fix formatting.
612 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
614 * Merge from mainline (r149350-149952)
616 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
618 * graphite-poly.c (apply_poly_transforms): Move strip_mine
619 before interchange to prepare for loop blocking.
621 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
623 * graphite-poly.c (apply_poly_transforms): Add checks after every
625 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
626 done in apply_poly_transforms.
628 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
630 * graphite-dependences.c (build_lexicographically_gt_constraint):
631 Replace RES parameter with *RES.
632 (dependence_polyhedron_1): Pass an address of the parameter RES
633 instead of value of RES.
635 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
637 * graphite.c (graphite_finalize): Fix comment.
638 (graphite_transform_loops): Reset scev info after code generation
641 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
643 * graphite.c (graphite_finalize): Call scev_reset.
645 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
647 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
648 GBB_CLOOG_IV_TYPES hash table twice.
649 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
650 (add_condition_to_domain): Clear GMP values.
652 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
654 * graphite-dependences.c: Fix formatting.
655 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
656 (pbb_number_of_iterations): Free ppl_Linear_Expression.
657 * graphite-sese-to-poly.c: Fix formatting.
658 * graphite.c (graphite_transform_loops): Create the hash table
659 after the early return.
661 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
663 * testsuite/gcc.dg/graphite/id-14.c: New.
664 * testsuite/gcc.dg/graphite/pr40157.c: New.
665 * testsuite/gfortran.dg/graphite/id-11.f: New.
667 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
669 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
670 (build_poly_scop): Return false when there are no pbbs within
671 loops to avoid to pass to cloog scops with no loops.
673 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
675 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
676 useless test "i % 2".
677 (build_pbb_scattering_polyhedrons): Fix formatting.
678 (build_poly_dr): Same.
679 * graphite.c (graphite_transform_loops): Restructure.
681 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
683 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
684 reduction_list parameter.
685 (rewrite_all_phi_nodes_with_iv): Same.
686 (canonicalize_loop_ivs): Same.
687 * tree-parloops.c (struct brli): Removed.
688 (build_reduction_list_info): Removed.
689 (build_new_reduction): New.
690 (analyze_reduction_list): Removed.
691 (gather_scalar_reductions): Find reductions instead of phi
692 nodes that can't be canonicalized.
693 (try_create_reduction_list): Remove reduction_list parameter.
694 (gen_parallel_loop): Same.
695 (parallelize_loops): Remove analyze_reductions variable,
696 initialization and free.
697 Change reduction_list htab initialization to reduction_info
698 elements instead of ssa names.
699 Call try_create_reduction_list and gen_parallel_loop without
700 analyzed_reduction argument.
701 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
702 canonicalize_loop_ivs with one less argument.
703 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
705 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
707 * graphite-dependences.c (new_poly_dr_pair): New.
708 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
709 (new_poly_dr_pair): New.
710 (eq_poly_dr_pair_p): New.
711 (hash_poly_dr_pair_p): New.
712 * graphite-dependences.h (struct poly_dr_pair): New.
713 (eq_poly_dr_pair_p): Declared.
714 (hash_poly_dr_pair_p): Declared.
715 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
716 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
717 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
718 * Makefile.in (graphite-poly.o): Add dependence on
719 graphite-dependences.h.
721 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
723 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
724 polynomials of degree > 1 pass to Graphite.
725 * tree-chrec.c (scev_is_linear_expression): Call
726 evolution_function_is_affine_multivariate_p.
727 * testsuite/gfortran.dg/graphite/id-10.f90: New.
729 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
731 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
732 Instantiate scevs varying in outer loops.
733 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
735 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
737 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
738 redundant constraint.
740 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
742 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
743 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
744 based on the file names as in the C testsuite.
745 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
746 * testsuite/gfortran.dg/graphite/block-2.f: Same.
747 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
748 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
749 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
750 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
751 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
752 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
753 * testsuite/gfortran.dg/graphite/id-6.f: Same.
754 * testsuite/gfortran.dg/graphite/id-9.f: Same.
755 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
756 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
757 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
759 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
761 * sese.c (expand_scalar_variables_call): New.
762 (expand_scalar_variables_ssa_name): Handle calls in expander.
764 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
766 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
767 Expect to see the pattern twice.
768 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
769 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
770 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
772 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
774 * testsuite/gcc.dg/graphite/id-10.c: New.
775 * testsuite/gcc.dg/graphite/id-12.c: New.
776 * testsuite/gfortran.dg/graphite/id-7.f: New.
777 * testsuite/gfortran.dg/graphite/id-8.f: New.
779 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
781 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
784 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
786 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
788 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
790 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
792 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
794 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
795 building PDR subscripts.
797 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
799 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
800 computation of array sizes.
802 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
804 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
806 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
808 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
809 build_pairwise_constraint, dr_equality_constraints,
810 build_pairwise_scheduling_equality,
811 build_pairwise_scheduling_inequality, lexicographically_gt_p,
812 build_lexicographically_gt_constraint, dependence_polyhedron,
813 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
814 Move from NNC_Polyhedron to C_Polyhedron.
815 * graphite-interchange.c (compute_array_size_poly,
816 gather_access_strides): Dito.
817 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
818 free_scop, pbb_number_of_iterations): Dito.
819 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
820 pbb_dim_iter_domain, struct scop): Dito.
821 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
822 new_Cloog_Domain_from_ppl_Polyhedron,
823 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
824 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
825 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
826 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
827 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
828 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
829 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
830 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
831 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
832 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
833 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
834 build_scop_iteration_domain, build_poly_dr): Dito
836 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
838 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
840 * testsuite/gcc.dg/graphite/run-id-1.c: New.
842 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
844 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
845 positivity constraint on the symbolic number of iterations.
847 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
849 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
851 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
852 Tobias Grosser <grosser@fim.uni-passau.de>
854 * graphite-clast-to-gimple.c (build_scop_context): Removed.
855 (build_cloog_prog): Directly use SCOP_CONTEXT.
856 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
857 (free_scop): Free SCOP_CONTEXT.
858 (print_scop_context): New.
859 (print_scop): Call print_scop_context.
860 (debug_scop_context): New.
861 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
862 (struct scop): Added field context.
864 * graphite-sese-to-poly.c (add_param_constraints): New.
865 (build_scop_context): New.
866 (build_poly_scop): Call build_scop_context.
868 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
870 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
871 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
872 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
873 * graphite-ppl.h: Include double-int.h and tree.h.
874 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
875 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
876 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
877 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
879 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
881 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
882 POINTER_PLUS_EXPR for pointer types.
883 (clast_to_gcc_expression): Same.
885 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
887 * graphite-poly.c (print_scattering_function): Early return when
888 PBB_TRANSFORMED_SCATTERING is not initialized.
889 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
891 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
893 * tree-parloops.c (analyze_reduction_list): Remove unused variable
896 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
898 * tree-parloops.c (analyze_reduction_list): Change return
900 (try_create_reduction_list): Move the call to
901 analyze_reduction_list to the beginining.
902 Call reduction_phi with analyzed_reductions as argument
903 instead of reduction_list.
905 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
907 * Merge from mainline (r148296:149346)
909 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
911 * graphite-scop-detection.c (graphite_can_represent_init): New.
912 (graphite_can_represent_scev): Call graphite_can_represent_init:
913 check that the initial value does not contain multiplications of
915 (stmt_has_simple_data_refs_p): New.
916 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
917 (is_simple_operand): Fix formatting.
918 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
920 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
922 * testsuite/gcc.dg/graphite/id-13.c: New.
923 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
924 analyze_scalar_evolution, use scalar_evolution_in_region.
925 (scan_tree_for_params_right_scev): Add extra assert.
926 (parameter_index_in_region_1): Split from parameter_index_in_region.
927 (idx_record_params): Use scalar_evolution_in_region.
928 (find_params_in_bb): Same.
929 (find_scop_parameters): Same.
930 (build_loop_iteration_domains): Same.
931 (create_linear_expr_from_tree): Same.
932 * sese.c (scalar_evolution_in_region): New.
933 * sese.h (scalar_evolution_in_region): Declared.
934 (defined_in_sese_p): New.
935 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
937 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
940 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
942 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
943 TREE_DATA_REF_H also implies SCEV_H.
945 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
947 * graphite-poly.c (print_scop_params): New.
948 (print_scop): Call print_scop_params.
949 (debug_scop_params): New.
950 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
952 2009-07-07 Li Feng <nemokingdom@gmail.com>
954 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
955 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
956 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
957 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
958 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
959 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
961 2009-07-07 Li Feng <nemokingdom@gmail.com>
963 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
964 for dependency checking part.
965 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
966 tests for dependency checking.
967 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
968 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
969 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
970 flag -fdump-tree-graphite-all for autopar testsuites.
972 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
974 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
975 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
976 canonicalize_loop_ivs): Moved...
977 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
979 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
981 * tree-parloops.c (try_create_reduction_list): Pass an extra
982 argument analyzed_reductions. Call analyze_reduction_list.
983 (gen_parallel_loop): Do not call analyze_reduction_list.
984 (parallelize_loops): Init and finalize analyzed_reductions.
986 2009-07-06 Li Feng <nemokingdom@gmail.com>
988 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
989 Added flag -fno-loop-strip-mine for autopar testcase.
991 2009-07-04 Li Feng <nemokingdom@gmail.com>
993 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
994 transformed scattering dimension instead of unmatch orignal when
995 calling dependence_polyhedron.
997 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
999 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1001 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1003 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1004 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1006 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1008 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1009 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1010 * graphite-poly.c (pbb_number_of_iterations): New.
1011 * graphite-poly.h (pbb_number_of_iterations): Declared.
1012 (pbb_iterator_dim, pbb_parameter_dim): New.
1014 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1016 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1017 last commit on type of lower and upper bound of loops.
1019 2009-06-29 Li Feng <nemokingdom@gmail.com>
1021 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1022 graphite-dependences.h.
1023 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1024 (mark_bb_with_pbb): New.
1025 (get_stmtfor_depth): New.
1026 (find_pbb_via_hash): New.
1027 (dependency_in_loop_p): New.
1028 (mark_loops_parallel): New.
1029 (free_aux_in_new_loops): New.
1030 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1031 bb with it's relevant pbb. Mark newly created loops. Remove mark
1032 innermost loop parallel without checking.
1033 (gloog): Add parameter BB_PBB_MAPPING.
1034 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1035 (gloog): Change declaration.
1036 (mark_loop_parallel): Make extern.
1037 (free_aux_in_new_loops): Declare.
1038 (bb_pbb_map_hash): New.
1039 (eq_bb_pbb_map): New.
1040 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1041 auto parallelization when flag_graphite_force_parallel is set.
1042 (graphite_finalize): Added free_aux_in_new_loops.
1043 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1044 the innermost loop that marked parallel. Use
1045 flag_graphite_force_parallel instead of loop->can_be_parallel.
1046 (loop_parallel_p): Move inner most checking out of function.
1048 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1050 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1051 type of lower and upper bound of loops signed long int.
1053 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1055 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1056 expression outside the loop.
1058 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1060 * gcc.dg/graphite/interchange-8.c: New.
1062 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1064 * gcc.dg/graphite/interchange-0.c: XFailed.
1065 * gcc.dg/graphite/interchange-5.c: XFailed.
1066 * gcc.dg/graphite/interchange-6.c: XFailed.
1068 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1070 * graphite-interchange.c (compute_array_size_poly): The end of the
1071 recursion should return 1.
1073 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1075 * graphite-interchange.c (compute_array_size_cstr): Allow the
1076 subscript multiplier to be -1.
1077 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1078 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1079 data_container. Initializes PDR_DATA_CONTAINER.
1080 (print_pdr_access_layout): New.
1081 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1082 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1084 (PDR_DATA_CONTAINER): New.
1085 (new_poly_dr): Update declaration.
1086 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1087 (build_poly_dr): Call pdr_add_data_dimensions.
1089 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1091 * graphite-poly.h (struct poly_dr): Fix comment.
1092 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1093 (pdr_add_memory_accesses): New.
1094 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1096 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1098 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1099 (print_pbb): Add call to print_pdrs.
1100 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1102 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1103 Li Feng <nemokingdom@gmail.com>
1105 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1106 (dependency_between_pbbs_p): New.
1107 (lexicographically_gt_p): Assure !empty_p before polyhedron
1108 intersection assign.
1109 (build_lexicographically_gt_constraint): Correct lexicographically
1111 * graphite-dependences.h: New.
1112 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1114 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1116 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1117 (gloog): Print to dump_file the generated clast.
1118 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1119 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1121 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1123 * graphite-poly.c (extend_scattering): Increment
1124 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1126 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1128 * graphite-interchange.c (compute_array_size_poly): Added exit of
1129 recursion condition. Continue iterating even after the first equality.
1130 (compute_array_size): Same.
1132 2009-06-24 Li Feng <nemokingdom@gmail.com>
1134 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1135 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1136 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1137 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1138 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1140 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1142 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1143 only when the use verifies is_gimple_reg.
1145 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1147 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1148 Allocate scaldims after call to unify_scattering_dimensions.
1150 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1152 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1154 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1155 Albert Cohen <albert.cohen@inria.fr>
1157 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1158 variables for the strip mining.
1160 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1161 Pranav Garg <pranav.garg2107@gmail.com>
1163 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1164 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1165 (graphite-blocking.o): New rule.
1166 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1167 * graphite-blocking.c: New.
1168 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1169 flag_loop_strip_mine.
1170 (psct_scattering_dim_for_loop_depth): New.
1171 * graphite-poly.h (scop_do_strip_mine): Declared.
1172 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1173 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1174 flag_loop_strip_mine.
1176 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1178 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1179 a GMP value and a PPL coefficient at each iteration of a loop.
1181 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1183 * graphite-dependences.c (dependence_polyhedron): Do not use
1184 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1185 pbb_nb_scattering_transform.
1186 (graphite_legal_transform_dr): Same.
1187 * graphite-poly.c (extend_scattering): Same.
1188 (unify_scattering_dimensions): Same.
1189 (print_scattering_function): Same.
1190 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1191 PBB_NB_LOCAL_VARIABLES.
1192 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1193 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1194 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1195 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1196 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1197 (pbb_nb_scattering_transform): New.
1198 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1199 (psco_scattering_dim): Add assert on parameters.
1200 (psct_scattering_dim): Same.
1201 (psct_scattering_dim_for_loop_depth): Declared.
1202 (psct_local_var_dim): New.
1203 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1204 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1205 correct layout, call pbb_nb_local_vars.
1206 (psct_add_local_variable, psct_add_scattering_dimension): New.
1207 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1208 Initialize PBB_NB_SCATTERING_TRANSFORM.
1210 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1212 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1213 (set_coef): Renamed ppl_set_coef.
1214 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1216 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1218 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1219 test a boolean against 1.
1220 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1221 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1222 (pbb_do_interchange): Returns true when a transform has been performed.
1223 (scop_do_interchange): Same.
1224 * graphite-poly.c (apply_poly_transforms): Use the return value of
1225 scop_do_interchange.
1226 * graphite-poly.h (scop_do_interchange): Update declaration.
1228 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1230 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1232 * sese.c (sese_reset_aux_in_loops): New.
1233 * sese.h (sese_reset_aux_in_loops): New.
1235 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1237 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1238 multiplier and multiply the constant by the multiplier.
1239 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1240 (build_poly_dr): Do not use the multiplier to define the subscript.
1242 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1244 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1245 compiler's data reference. Initialize PDR_CDR.
1246 (print_pdr): Call dump_data_reference.
1247 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1248 Add compiler_dr field.
1249 (PDR_BB): Renamed PDR_PBB.
1251 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1252 GCC's data reference representation.
1253 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1254 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1256 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1258 * graphite-poly.c (print_scattering_function): Also print the layout.
1259 * graphite-poly.h (pbb_nb_local_vars): New.
1261 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1263 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1265 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1267 * graphite-poly.c (print_pdr, debug_pdr): New.
1268 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1269 (PDR_BASE): Removed.
1271 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1273 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1276 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1278 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1279 subscript identification column.
1280 (pbb_do_interchange): Print to dump_file that some loops "will be
1281 interchanged". Rely on that chain of characters in the testcases.
1282 * gcc.dg/graphite/interchange-0.c: New.
1283 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1284 interchange-*.c files and compile them with -floop-interchange.
1286 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1288 * graphite-interchange.c (interchange_profitable_p): Renamed
1289 pbb_interchange_profitable_p.
1291 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1292 Harsha Jagasia <harsha.jagasia@amd.com>
1293 Pranav Garg <pranav.garg2107@gmail.com>
1295 * graphite-interchange.c (interchange_profitable_p): Make static.
1296 (pbb_interchange_loop_depths, pbb_do_interchange,
1297 scop_do_interchange): New.
1298 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1299 for flag_loop_interchange.
1300 * graphite-poly.h (scop_do_interchange): Declared.
1301 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1302 flag_loop_interchange is used.
1304 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1306 * graphite-dependences.c (dependence_polyhedron): Update use of
1307 pbb_nb_scattering_dims.
1308 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1309 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1310 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1311 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1313 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1315 * graphite.c: Cleanup foo.
1317 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1319 * Merge from mainline (r143684:148293).
1320 * Disabled libpcp until it gets fixed.
1322 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1323 Harsha Jagasia <harsha.jagasia@amd.com>
1325 * graphite-interchange.c: New.
1326 * Makefile.in (graphite-interchange.o): New.
1327 * graphite-poly.h (interchange_profitable_p): Declared.
1328 * graphite-ppl.h (value_max): New.
1330 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1332 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1333 * graphite-poly.h: Fix some comments.
1337 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1340 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1341 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1342 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1343 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1344 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1345 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1346 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1347 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1348 * graphite-clast-to-gimple.c: Same.
1349 * graphite-dependences.c: Same.
1350 * graphite-poly.c: Same.
1351 * graphite-sese-to-poly.c: Same.
1353 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1355 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1356 expressions for an IV rename, as returned by clast_to_gcc_expression.
1357 (copy_renames): Rename new_name to expr.
1358 * sese.c (debug_rename_elt): Same.
1361 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1362 the information from the rename map.
1363 (rename_variables_in_stmt): Same.
1364 (add_loop_exit_phis): Rename new_name to expr.
1365 (insert_loop_close_phis): Same.
1366 (add_guard_exit_phis): Same. Call force_gimple_operand.
1367 * sese.h (struct rename_map_elt): Rename new_name to expr.
1368 (new_rename_map_elt): Same.
1370 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1372 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1373 * sese.c (set_rename): Make it extern.
1374 * sese.h (set_rename): Declared.
1376 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1378 * graphite-poly.c (extend_scattering): Free values.
1379 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1381 (ppl_print_powerset_matrix): Same.
1382 * graphite-scop-detection.c (free_scops_1): New.
1383 (limit_scops): Call free_scops_1.
1384 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1385 (build_poly_dr): Free PPL coefficients.
1386 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1388 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1390 * graphite-dependences.c: New.
1391 * graphite-data-ref.c: Removed.
1392 * graphite-data-ref.h: Removed.
1393 * Makefile.in (graphite-data-ref.o): Removed.
1394 (graphite-dependences.o): Added.
1395 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1396 * graphite-poly.c: Same.
1397 Move the data dependence testing to graphite-dependences.c.
1399 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1401 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1402 from graphite_cannot_represent_loop. Code refactored.
1403 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1405 2009-05-17 Li Feng <nemokingdom@gmail.com>
1407 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1408 Cover all the testcases (not only the filtered ones).
1410 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1412 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1413 unnecessary check. Update comments. Move check for REAL_TYPE here.
1414 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1415 done in (stmt_simple_for_scop_p).
1417 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1419 * graphite.c (print_global_statistics): New.
1420 (print_graphite_scop_statistic): New.
1421 (print_graphite_statistics): New.
1422 (graphite_initialize, graphite_transform_loops): Print statistics.
1423 * graphite-scop-detection (build_scops): Print statistics.
1424 (print_graphite_scop_statistics): New.
1425 (print_graphite_statistics): New.
1427 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1429 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1430 (debug_clast_name_index): Removed.
1431 (debug_clast_name_indexes_1): Removed.
1432 (debug_clast_name_indexes): Removed.
1433 (clast_name_index_elt_info): Removed.
1434 (eq_clast_name_indexes): Removed.
1435 (clast_name_to_index): Removed.
1436 (new_clast_name_index): Removed.
1437 (save_clast_name_index): Removed.
1438 (save_var_name): Moved...
1439 (init_sese_params_index): Removed.
1440 (clast_name_to_gcc): Remove use of name_tree.
1441 (initialize_cloog_names): Same.
1442 (gloog): Do not call init_sese_params_index.
1443 * graphite-sese-to-poly.c (save_var_name): ...here.
1444 (parameter_index_in_region): New.
1445 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1446 (parameter_index_in_region): Removed.
1447 (is_parameter): Remove use of name_tree.
1448 * sese.h (struct name_tree): Removed.
1449 (struct sese): Remove use of name_tree. New field params_names.
1450 (SESE_PARAMS_NAMES): New.
1451 (SESE_PARAMS): Remove duplicate.
1452 (parameter_index_in_region): Removed.
1453 (sese_nb_params): Remove use of name_tree.
1454 (struct clast_name_index): New.
1455 (new_clast_name_index): New.
1456 (clast_name_to_index): New.
1457 (save_clast_name_index): New.
1458 (debug_clast_name_index): New.
1459 (debug_clast_name_indexes_1): New.
1460 (debug_clast_name_indexes): New.
1461 (clast_name_index_elt_info): New.
1462 (eq_clast_name_indexes): New.
1464 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1466 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1467 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1468 (graphite_loop_normal_form): Do not pass region. Do not
1469 initialize SESE_OLDIVS.
1470 (build_graphite_loop_normal_form): Update call to
1471 graphite_loop_normal_form.
1472 * sese.c (debug_oldivs): Removed.
1473 (new_sese): Do not initialize SESE_OLDIVS.
1474 (free_sese): Do not free SESE_OLDIVS.
1475 (oldiv_for_loop): Removed.
1476 * sese.h (struct sese): Remove old_ivs.
1477 (SESE_OLDIVS): Removed.
1478 (oldiv_for_loop): Removed.
1480 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1482 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1483 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1484 replaced by a call to newivs_to_depth_to_newiv.
1485 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1486 (clast_to_gcc_expression_red): Same.
1487 (gcc_type_for_clast_expr): Same.
1488 (gcc_type_for_clast_eq): Same.
1489 (graphite_translate_clast_equation): Same.
1490 (graphite_create_guard_cond_expr): Same.
1491 (graphite_create_new_guard): Same.
1492 (graphite_create_new_loop): Same.
1493 (build_iv_mapping): Same.
1494 (translate_clast): Same.
1496 (loop_iv_stack_patch_for_consts): Removed. *
1497 sese.c (iv_stack_entry_is_constant): Removed.
1498 (iv_stack_entry_is_iv): Removed.
1499 (loop_iv_stack_push_iv): Removed.
1500 (loop_iv_stack_insert_constant): Removed.
1501 (loop_iv_stack_pop): Removed.
1502 (loop_iv_stack_get_iv): Removed.
1503 (loop_iv_stack_get_iv_from_name): Removed.
1504 (debug_loop_iv_stack): Removed.
1505 (free_loop_iv_stack): Removed.
1506 (loop_iv_stack_remove_constants): Removed. *
1507 sese.h (iv_stack_entry_kind): Removed.
1508 (iv_stack_entry_data_union): Removed.
1509 (iv_stack_entry_struct): Removed.
1510 (iv_stack_entry_p): Removed.
1511 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1512 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1513 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1514 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1515 (gbb_loop_at_index): Fix indenting.
1516 (gbb_loop_index): Removed.
1518 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1520 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1521 Call clast_name_to_index.
1523 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1525 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1526 do not pass params. Get params from SESE_PARAMS.
1527 (clast_to_gcc_expression): Same.
1528 (clast_to_gcc_expression_red): Same.
1529 (gcc_type_for_clast_eq): Same.
1530 (graphite_translate_clast_equation): Same.
1531 (graphite_create_new_loop): Same.
1532 * sese.c (rename_variables_in_stmt): Fix comment.
1534 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1536 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1538 Call save_clast_name_index.
1539 (translate_clast): Pass newivs_index.
1540 (gloog): Create and free newivs_index.
1542 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1544 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1545 (clast_name_index_p): New type.
1546 (debug_clast_name_index): New.
1547 (debug_clast_name_indexes_1): New.
1548 (debug_clast_name_indexes): New.
1549 (clast_name_index_elt_info): New.
1550 (eq_clast_name_indexes): New.
1551 (clast_name_to_index): New.
1552 (new_clast_name_index): New.
1553 (save_clast_name_index): New.
1554 (init_sese_params_index): New.
1555 (gloog): Call init_sese_params_index.
1556 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1557 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1558 (free_sese): Free SESE_PARAMS_INDEX.
1559 * sese.h (struct sese): Add params_index.
1560 (SESE_PARAMS_INDEX): New.
1562 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1564 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1565 (graphite_create_new_loop): Pass the newivs vector. Push the
1566 newly created IV to newivs.
1567 (translate_clast): Pass the newivs vector.
1568 (gloog): Create and destroy the newivs vector.
1570 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1572 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1573 (graphite_loop_normal_form): Initialize loop->aux with the unique
1574 IV that has been created.
1576 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1578 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1579 scev with parameters in the base part. They where forbidden
1582 2009-05-11 Li Feng <nemokingdom@gmail.com>
1584 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1585 compile options by file names.
1586 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1587 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1588 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1589 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1591 2009-05-08 Li Feng <nemokingdom@gmail.com>
1593 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1594 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1595 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1596 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1598 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1600 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1603 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1605 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1606 allow integer constant strides.
1607 (graphite_can_represent_expr): Depend on outermost_loop.
1608 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1609 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1610 build_scops_1): Same.
1611 (scopdet_basic_block_info): Same and insert layered SCoP
1613 (try_generate_gimple_bb): Cleanup.
1614 (build_scops): Enable data references.
1616 * testsuite/gcc.dg/graphite/id-5.c: New.
1617 * testsuite/gcc.dg/graphite/id-9.c: New.
1618 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1619 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1621 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1623 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1624 that we have not yet built for this SCoP.
1626 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1628 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1629 for complex numbers.
1631 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1633 * graphite-ppl.c: Fix build if cloog is not available.
1635 2009-05-04 Li Feng <nemokingdom@gmail.com>
1637 * tree-parloops.c (loop_parallel_p): Remove construction of
1638 NITER and REDUCTION_LIST.
1639 (try_get_loop_niter): New.
1640 (try_create_reduction_list): New.
1641 (parallelize_loops): Bypass the failed checkings in autopar
1642 when can_be_parallel in loop structure is set to true.
1644 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1646 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1647 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1649 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1651 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1652 Enable EQ_EXPR and NE_EXPR again.
1654 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1656 * graphite-scop-detection.c (graphite_can_represent_scev):
1657 Add check if scev is affine multivariate.
1658 (harmful_stmt_in_bb): Check if we can represent the conditions.
1659 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1661 * testsuite/gcc.dg/graphite/id-7.c: New.
1663 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1665 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1666 Check all bbs in region, not only the bbs that are represented in
1668 (build_poly_scop): Add newline.
1669 * testsuite/gcc.dg/graphite/id-8.c: New.
1671 2009-04-30 Li Feng <nemokingdom@gmail.com>
1673 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1674 when loop initialize.
1675 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1676 * common.opt: Declare flag_graphite_force_parallel.
1677 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1679 * graphite-poly.c (apply_poly_transforms): Introduce
1680 flag_graphite_force_parallel.
1681 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1682 * toplev.c (process_options): ditto and replace a not correctly
1685 2009-04-30 Li Feng <nemokingdom@gmail.com>
1687 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1688 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1689 to the redefinition.
1690 (compute_cloog_iv_types_1): ditto.
1691 (build_iv_mapping): ditto.
1692 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1694 (free_gimple_bb): Removed GBB_LOOPS related free part.
1695 (build_bb_loops): Removed.
1696 * sese.h (struct gimple_bb): Removed loops.
1697 (GBB_LOOPS): Removed.
1698 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1699 (gbb_loop_index): ditto.
1701 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1703 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1704 allow non constant strides.
1705 * testsuite/gcc.dg/graphite/scop-20.c: New.
1707 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1709 * graphite-scop-detection.c (dot_all_scops): Fix system call
1710 return value warning.
1713 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1715 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1716 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1718 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1720 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1721 build_pairwise_constraint, dr_equality_constraints,
1722 build_pairwise_scheduling_equality,
1723 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1724 build_lexicographically_gt_constraint, dependence_polyhedron,
1725 graphite_legal_transform_dr, graphite_legal_transform_bb,
1726 graphite_legal_transform): New.
1727 * graphite-poly.h (graphite_legal_transform): Declared.
1728 * graphite-sese-to-poly.c (build_poly_scop): Call to
1729 graphite_legal_transform is disabled for the moment.
1731 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1733 * graphite-poly.h (pbb_nb_scattering_dims): New.
1734 (pbb_nb_scattering): Use it.
1736 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1738 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1739 Pointset_Powerset version of ppl_insert_dimensions.
1740 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1742 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1744 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1746 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1748 * graphite-poly.h: Fix comment.
1750 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1752 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1754 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1756 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1759 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1761 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1762 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1765 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1767 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1768 handle EQ_EXPR and NE_EXPR.
1770 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1772 * graphite-poly.h (poly_dr): Fix comment.
1774 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1775 Tobias Grosser <grosser@fim.uni-passau.de>
1777 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1778 with a zero dimension polyhedron.
1779 (find_scop_parameters): Move the call to scop_set_nb_params here.
1780 (build_loop_iteration_domains): Store in loop->aux the iteration
1782 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1783 by any loop in scop.
1784 (build_poly_scop): Do not call scop_set_nb_params.
1786 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1787 Tobias Grosser <grosser@fim.uni-passau.de>
1789 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1790 add_condition_to_domain not GT_EXPR.
1792 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1794 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1795 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1796 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1797 upper_bound_assign to calculate unions.
1798 * testsuite/gcc.dg/graphite/id-6.c: New.
1800 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1802 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1803 handle abnormal edges.
1805 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1807 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1808 (free_poly_bb): Also free poly_drs.
1809 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1810 (poly_dr): Polyhedron to Pointset_Powerset.
1811 (pdr_accessp_nb_subscripts): Same.
1812 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1815 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1817 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1818 names into more meaningful names.
1820 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1822 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1823 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1825 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1827 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1829 * tree-parloops.c (rewrite_phi_with_iv): New.
1830 (rewrite_all_phi_nodes_with_iv): New.
1831 (canonicalize_loop_ivs): Call them.
1833 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1835 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1836 graphite_find_data_references_in_stmt.
1837 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1838 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1840 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1842 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1844 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1846 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1847 instead of bb_in_region.
1848 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1849 (build_sese_conditions): Use flag_bb_in_sese.
1850 * sese.c (register_bb_in_sese): Removed.
1851 (new_sese): Remove initialization of SESE_REGION_BBS.
1852 (free_sese): Do not free SESE_REGION_BBS.
1853 * sese.h (struct sese): Remove field region_basic_blocks.
1854 (SESE_REGION_BBS): Removed.
1855 (bb_in_sese_p): Implement in function of bb_in_region.
1857 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1859 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1862 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1864 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1866 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1867 (add_condition_to_domain): New.
1868 (add_condition_to_pbb): New.
1869 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1870 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1872 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1874 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1875 ppl_Pointset_Powerset.
1876 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1877 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1878 (pbb_nb_loops): Same.
1879 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1880 add_conditions_to_domain): Same.
1881 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1882 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1883 ppl_const_Polyhedron_t.
1884 (ppl_print_powerset_matrix): New.
1885 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1886 ppl_print_powerset_matrix): New.
1887 (ppl_print_polyhedron_matrix): Updated.
1889 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1891 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1893 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1895 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1896 (print_iteration_domains, debug_iteration_domain,
1897 debug_iteration_domains): New.
1898 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1899 debug_iteration_domains): Declared.
1900 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1903 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1904 Sebastian Pop <sebastian.pop@amd.com>
1906 * graphite-poly.h (print_iteration_domain): New.
1907 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1908 (build_sese_conditions_1, build_sese_conditions_after,
1909 build_sese_conditions_before): New.
1910 (build_sese_conditions): Rewritten.
1912 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1913 Tobias Grosser <grosser@fim.uni-passau.de>
1915 Cleanup of code generation liveouts.
1916 * graphite-clast-to-gimple.c (translate_clast): Use a single
1917 rename_map instead of one per translated statement.
1918 Do not use SESE_LIVEOUT_RENAMES.
1919 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1920 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1921 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1922 phi node of a reduction: when a loop contains a reduction used outside
1923 the loop, there should be a scalar close phi node on the exit block.
1924 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1925 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1926 (free_sese): Do not free them.
1927 (sese_build_liveouts_use): Do not use them.
1928 (sese_build_liveouts_bb): Same.
1929 (sese_build_liveouts): Same.
1930 (sese_insert_phis_for_liveouts): Same.
1931 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1932 (defined_in_loop_p): New.
1933 (alive_after_loop): New.
1934 (close_phi_not_yet_inserted_p): New.
1935 (struct alep, alep_p): New.
1936 (add_loop_exit_phis): Remove from the rename_map all the names defined
1937 in the code generated loop.
1938 (insert_loop_close_phis): Traverse the rename_map passed to it.
1939 Don't use SESE_LIVEOUT_RENAMES.
1940 (default_liveout_before_guard): Renamed default_before_guard.
1941 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1942 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1943 (register_sese_liveout_renames): Removed.
1944 (copy_bb_and_scalar_dependences): Do not call it.
1945 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1947 (SESE_LIVEOUT): Removed.
1948 (SESE_LIVEOUT_RENAMES): Removed.
1949 (SESE_REDUCTION_LIST): Removed.
1950 (sese_build_liveouts): Removed.
1951 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1952 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1953 (insert_guard_phis): Same.
1954 (rename_map_elt): Declare a VEC of them.
1955 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1956 trees not pointers to trees.
1958 Rewrite in canonical close SSA form:
1959 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1960 (limit_scops): Close the scop after the block containing the close phi
1962 (canonicalize_loop_closed_ssa): New.
1963 (canonicalize_loop_closed_ssa_form): New.
1964 (build_scops): Call canonicalize_loop_closed_ssa_form.
1966 * graphite-sese-to-poly.c: Fix typos.
1968 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1970 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1972 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1973 (print_pbb): Add conditions.
1975 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1976 Sebastian Pop <sebastian.pop@amd.com>
1978 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1979 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1980 (build_scop_bbs_1): New.
1981 (build_scop_bbs): Rewrite.
1982 * sese.h (bb_in_region): New.
1984 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1986 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1988 (print_scop): Style.
1989 * graphite-poly.h (poly_bb): Add drs vector.
1990 (PBB_DRS): Add accessor.
1991 * graphite-sese-to-poly.c (build_poly_dr): New.
1992 (build_pbb_drs, build_scop_drs): New.
1993 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1995 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1997 * tree-ssa-loop.c: Include forgotten toplev.h
1999 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2001 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2002 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2003 * testsuite/gcc.dg/graphite/pr37928.c: Same
2004 * testsuite/gcc.dg/graphite/pr38409.c: Same
2005 * testsuite/gcc.dg/graphite/pr38498.c: Same
2006 * testsuite/gcc.dg/graphite/pr38559.c: Same
2007 * testsuite/gcc.dg/graphite/pr39335.c: Same
2008 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2009 * testsuite/gfortran.dg/graphite/block-2.f: Same
2010 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2013 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2015 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2016 build_access_matrix, build_scop_data_accesses): Remove access function
2017 building. (We get a new version soon).
2018 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2019 * sese.h (nb_loops_around_loop_in_sese): Remove.
2020 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2022 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2023 Sebastian Pop <sebastian.pop@amd.com>
2025 * graphite-scop-detection.c (struct scopdet_info): Rename last
2027 (scopdet_basic_block_info, build_scops_1): Don't use
2028 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2030 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2031 Sebastian Pop <sebastian.pop@amd.com>
2033 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2034 * sese.c (sese_build_liveouts_use): Renamed from
2035 sese_build_livein_liveouts_use. Remove liveins.
2036 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2037 Call sese_build_liveouts_use.
2038 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2039 Call sese_build_liveouts_bb.
2040 (new_sese, free_sese): Remove liveins.
2041 (sese_add_exit_phis_var): Deleted.
2042 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2044 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2046 * sese.h (sese): Remove num_ver and livein.
2047 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2049 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2051 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2053 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2055 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2056 (build_scop_scattering): Do not use compare_prefix_loops any more.
2057 (nb_common_loops): New.
2059 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2061 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2062 (register_old_and_new_names): Renamed set_rename.
2064 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2066 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2067 of the decl from the previous commit.
2069 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2071 * graphite-scop-detection.c (dot_scop): New.
2072 * graphite-scop-detection.h (dot_scop): Declared.
2074 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2076 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2078 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2080 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2081 condition at the end of the loop.
2082 * graphite.c (graphite_initialize, graphite_finalize): Print to
2083 dump_file the compiled function.
2084 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2085 of create_empty_loop_on_edge.
2086 (translate_clast): Update the code generation of loops for the new
2088 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2090 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2092 Reverted the patch from 2009-03-19.
2094 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2096 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2098 (print_scop): Style.
2099 * graphite-poly.h (poly_bb): Add drs vector.
2100 (PBB_DRS): Add accessor.
2101 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2102 (build_access_matrix_with_af, build_access_matrix,
2103 build_scop_data_accesses): Delete.
2104 (build_poly_dr): New.
2105 (build_pbb_drs, build_scop_drs): New.
2106 (build_poly_scop): call build_scop_drs.
2108 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2110 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2111 once per basic block.
2113 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2115 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2116 (graphite_can_represent_expr): Renamed from loop_affine_expr
2118 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2119 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2120 (scopdet_basic_block_info): Actually define entry_block.
2121 (stmt_simple_memref_p): Moved here from ...
2123 * tree-data-ref.c (stmt_simple_memref_p): here.
2124 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2126 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2128 * testsuite/gcc.dg/graphite/id-4.c: New.
2130 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2132 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2133 (register_old_and_new_names): Update the content of the map.
2134 When there was already a rename_map_elt in the map at that
2136 (copy_bb_and_scalar_dependences): Do rename_variables after
2137 expand_scalar_variables.
2138 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2139 of the map. When there was already a rename_map_elt in the
2140 map at that location, free it.
2141 (translate_clast): Pass the rename_map. Do not initialize and free
2142 a rename_map per stmt_user.
2143 (gloog): Initialize and free one rename_map and pass it to
2146 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2148 * sese.c (expand_scalar_variables_stmt,
2149 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2151 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2152 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2153 the gimple_stmt_iterator of the statement to be expanded.
2154 * graphite-scop-detection.c (is_simple_operand): Do handle
2157 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2159 * graphite-scop-detection.c (is_simple_operand): Do not handle
2161 * testsuite/gcc.dg/graphite/id-2.c: New.
2163 * graphite-sese-to-poly.c (build_bb_loops,
2164 add_value_to_dim, scan_tree_for_params_right_scev,
2165 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2166 find_params_in_bb, build_loop_iteration_domains,
2167 add_conditions_to_domain): Remove subtract.
2169 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2171 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2172 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2173 pbb_loop_at_index -> gbb_loop_at_index.
2174 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2175 (debug_loop_vec): Delete.
2176 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2177 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2178 (PBB_LOOPS): Removed.
2179 (PBB_BLACK_BOX): Insert cast.
2180 (pbb_set_black_box): New setter.
2181 (pbb_loop_at_index, pbb_loop_index): Removed.
2182 (scop_set_region, scop_set_nb_params): New.
2183 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2184 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2185 (build_poly_scop): Use scop_set_nb_params.
2186 * sese.h (gimple_bb): Add LOOPS.
2187 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2189 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2191 Revert previous commit.
2193 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2195 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2196 (register_old_and_new_names): Update the content of the map.
2197 When there was already a rename_map_elt in the map at that
2199 (copy_bb_and_scalar_dependences): Do rename_variables after
2200 expand_scalar_variables.
2201 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2202 of the map. When there was already a rename_map_elt in the
2203 map at that location, free it.
2204 (translate_clast): Pass the rename_map. Do not initialize and free
2205 a rename_map per stmt_user.
2206 (gloog): Initialize and free one rename_map and pass it to
2209 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2211 Remove forgotten line in revert.
2213 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2215 Revert previous commit.
2217 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2219 * sese.c (register_old_and_new_names): Update the content
2220 of the map. When there was already a rename_map_elt in the
2221 map at that location, free it.
2222 (copy_bb_and_scalar_dependences): Do rename_variables after
2223 expand_scalar_variables.
2224 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2225 of the map. When there was already a rename_map_elt in the
2226 map at that location, free it.
2227 (translate_clast): Pass the rename_map. Do not initialize and free
2228 a rename_map per stmt_user.
2229 (gloog): Initialize and free one rename_map and pass it to
2232 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2234 * graphite-clast-to-gimple.c (translate_clast): context_loop
2237 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2238 Sebastian Pop <sebastian.pop@amd.com>
2240 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2241 of the use of ppl_Polyhedron_map_space_dimensions.
2243 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2244 Sebastian Pop <sebastian.pop@amd.com>
2246 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2247 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2248 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2249 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2250 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2251 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2252 pbb_nb_params): New.
2253 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2254 nb_loops_around_pbb): Adapt return types.
2256 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2258 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2259 graphite-clast-to-gimple.o, graphite-data-ref.o,
2260 graphite-scop-detection.o, graphite-poly.o): Add
2263 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2265 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2266 graphite-clast-to-gimple.o, graphite-data-ref.o,
2267 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2269 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2271 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2272 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2273 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2274 * testsuite/gcc.dg/graphite/block-0.c: Same.
2275 * testsuite/gcc.dg/graphite/block-1.c: Same.
2276 * testsuite/gcc.dg/graphite/block-2.c: Same.
2277 * testsuite/gcc.dg/graphite/block-3.c: Same.
2278 * testsuite/gcc.dg/graphite/block-4.c: Same.
2279 * testsuite/gcc.dg/graphite/block-5.c: Same.
2280 * testsuite/gcc.dg/graphite/block-6.c: Same.
2281 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2282 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2283 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2284 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2285 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2286 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2287 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2288 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2289 * opts.c: Remove -floop-block from -O2.
2290 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2291 -floop-strip-mine are used.
2293 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2294 Sebastian Pop <sebastian.pop@amd.com>
2296 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2298 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2299 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2300 strip_mine_profitable_p, is_interchange_valid,
2301 graphite_trans_bb_block, graphite_trans_loop_block,
2302 graphite_trans_scop_block): Temporary removed.
2303 (extend_scattering, unify_scattering_dimensions): New.
2304 (print_scattering_function, graphite_read_transforms):
2305 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2306 (graphite_generate_scattering_fns): Removed.
2307 (apply_poly_transforms): Cleanup.
2308 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2309 (schedule_to_scattering): Moved.
2310 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2311 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2312 (pbb_nb_scattering): New.
2313 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2314 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2316 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2318 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2319 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2320 -> PBB_TRANSFORMED_SCATTERING.
2321 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2322 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2323 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2324 (check_poly_representation): Do not return bool.
2325 (graphite_transform_loops): Reformat.
2326 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2328 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2330 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2331 debug_pbb_domain, debug_pbb, debug_scop): New.
2332 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2333 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2335 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2338 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2339 when the type precision of the induction variable should be
2340 larger than the type precision of nit.
2341 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2342 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2343 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2345 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2346 * testsuite/gcc.dg/graphite/pr39335.c: New.
2348 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2350 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2351 SSA_NAMES not struct reduction_info.
2353 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2355 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2357 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2358 Tobias Grosser <grosser@fim.uni-passau.de>
2360 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2361 (free_sese): Free SESE_REDUCTION_LIST.
2362 * sese.h (struct sese): Add field reduction_list.
2363 (SESE_REDUCTION_LIST): New.
2364 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2365 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2367 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2368 Tobias Grosser <grosser@fim.uni-passau.de>
2370 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2373 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2374 Tobias Grosser <grosser@fim.uni-passau.de>
2376 * tree-parloops.c (struct brli, build_reduction_list_info,
2377 analyze_reduction_list, gather_scalar_reductions): New.
2378 (loop_parallel_p): Build a reduction list containing only
2379 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2380 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2381 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2382 * tree-flow.h (gather_scalar_reductions): Declared.
2384 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2387 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2388 number_of_iterations_exit from a gcc_assert.
2390 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2391 Jan Sjodin <jan.sjodin@amd.com>
2393 * output.h (graphite_out_file, graphite_in_file): Declared.
2394 * toplev.c (graphite_out_file, graphite_in_file): New.
2395 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2396 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2397 Don't call schedule_to_scattering.
2398 * common.opt (fgraphite-write, fgraphite-read): New.
2399 * graphite-poly.c: Include output.h.
2400 (print_scattering_function, print_scattering_functions,
2401 debug_scattering_function, debug_scattering_functions,
2402 graphite_write_transforms, graphite_read_transforms,
2403 graphite_generate_scattering_fns): New.
2404 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2405 Call graphite_generate_scattering_fns, graphite_write_transforms,
2406 graphite_read_transforms.
2407 (new_poly_bb): Initialize PBB_SCATTERING.
2408 (free_poly_bb): Free PBB_SCATTERING.
2409 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2410 * graphite-poly.h (struct poly_bb): Add field scattering.
2411 (PBB_SCATTERING): New.
2412 (print_scattering_function, print_scattering_functions,
2413 debug_scattering_function, debug_scattering_functions): Declared.
2414 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2415 GMP values, not integers!
2416 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2417 ppl_read_polyhedron_matrix): New.
2418 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2419 debug_ppl_polyhedron_matrix,
2420 ppl_read_polyhedron_matrix): Declared.
2421 * Makefile.in (graphite-poly.o): Depends on output.h.
2423 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2424 Tobias Grosser <grosser@fim.uni-passau.de>
2427 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2428 scalar evolutions in the scop_entry->loop_father.
2430 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2431 Tobias Grosser <grosser@fim.uni-passau.de>
2433 * graphite.h (ref_nb_loops): Remove declaration.
2434 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2435 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2436 debug_gbb): Moved to sese.h.
2439 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2440 Tobias Grosser <grosser@fim.uni-passau.de>
2442 * graphite-data-ref.[ch]: Disable.
2444 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2445 Tobias Grosser <grosser@fim.uni-passau.de>
2447 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2448 scalar evolutions in the scop_entry->loop_father.
2450 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2452 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2453 (graphite_cannot_represent_loop_niter): Renamed
2454 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2455 (limit_scops): build_sese_loop_nests does not return a bool.
2456 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2457 * sese.c (nb_reductions_in_loop): ... from here.
2458 (graphite_loop_normal_form): ... from here.
2459 (sese_record_loop): Does not fail, so does not return a bool.
2460 (build_sese_loop_nests): Same.
2461 * sese.h (build_sese_loop_nests): Update declaration.
2462 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2463 (build_graphite_loop_normal_form): New.
2464 (gloog): Call build_graphite_loop_normal_form.
2465 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2466 build_sese_loop_nests.
2468 * testsuite/gcc.dg/graphite/id-1.c: New.
2470 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2471 Tobias Grosser <grosser@fim.uni-passau.de>
2473 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2474 The SCoP detection fix is sufficient.
2476 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2478 PR tree-optimization/39260
2479 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2480 the basic block contains a condition with a real type.
2481 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2483 * gcc.dg/graphite/pr39260.c: New.
2485 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2487 * graphite-poly.c: Inlcude params.h.
2488 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2490 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2491 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2493 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2494 Tobias Grosser <grosser@fim.uni-passau.de>
2496 * graphite-scop-detection.c (dot_all_scops_1,
2497 dot_all_scops): Moved here.
2498 * graphite-scop-detection.h (dot_all_scops): Declared here.
2499 * graphite.c (graphite_initialize, graphite_finalize): New.
2500 (graphite_transform_loops): Cleaned up.
2501 * sese.c (debug_oldivs): Moved here.
2502 * graphite-poly.c (graphite_apply_transformations): Renamed
2503 apply_poly_transforms.
2504 (debug_loop_vec): Moved here.
2505 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2506 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2507 find_scop_parameters, build_scop_iteration_domain,
2508 add_conditions_to_constraints, build_scop_canonical_schedules,
2509 build_scop_data_accesses): Now static.
2510 (build_poly_scop, check_poly_representation): New.
2512 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2514 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2515 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2516 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2517 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2518 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2519 scan_tree_for_params, struct irp_data, dx_record_params,
2520 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2521 build_loop_iteration_domains, add_conditions_to_domain,
2522 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2523 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2524 build_sese_conditions, add_conditions_to_constraints,
2525 build_scop_iteration_domain, build_access_matrix_with_af,
2526 build_access_matrix,
2527 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2529 * graphite-sese-to-poly.c: New.
2530 * graphite-sese-to-poly.h: New.
2532 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2534 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2536 * graphite.c: Split graphite code generation to a new file.
2537 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2538 max_precision_type, clast_to_gcc_expression_red,
2539 clast_to_gcc_expression, gcc_type_for_clast_expr,
2540 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2541 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2542 graphite_create_new_guard, clast_get_body_of_loop,
2543 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2544 graphite_create_new_loop, build_iv_mapping, copy_renames,
2545 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2546 compute_cloog_iv_types, free_scattering, save_var_name,
2547 initialize_cloog_names, build_scop_context, build_cloog_prog,
2548 set_cloog_options, debug_clast_stmt, scop_to_clast,
2549 print_generated_program, debug_generated_program,
2550 gloog): Moved to graphite-clast-to-gimple.c.
2552 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2554 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2555 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2556 loop_iv_stack_pop, loop_iv_stack_get_iv,
2557 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2558 free_loop_iv_stack, loop_iv_stack_remove_constants,
2559 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2560 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2561 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2562 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2563 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2564 get_vdef_before_sese, sese_adjust_vphi,
2565 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2566 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2567 is_iv, expand_scalar_variables_ssa_name,
2568 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2569 expand_scalar_variables, rename_variables, remove_condition,
2570 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2571 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2572 default_liveout_before_guard, add_guard_exit_phis,
2573 insert_guard_phis, register_old_and_new_names,
2574 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2575 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2576 if_region_set_false_region, create_if_region_on_edge,
2577 move_sese_in_condition): Moved to sese.c.
2579 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2580 if_region_exit, if_region_get_condition_block,
2581 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2582 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2583 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2584 ivtype_map_elt, new_ivtype_map_elt,
2585 recompute_all_dominators): Moved to sese.h.
2587 * graphite-clast-to-gimple.c: New.
2588 * graphite-clast-to-gimple.h: New.
2589 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2590 * sese.c: Modified as said above.
2593 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2595 * graphite.c: Split scop detection to a new file.
2596 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2597 move_sd_regions, loop_affine_expr, exclude_component_ref,
2598 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2599 graphite_cannot_represent_loop_niter, struct scopdet_info,
2600 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2601 find_single_entry_edge, find_single_exit_edge,
2602 create_single_entry_edge, sd_region_without_exit,
2603 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2604 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2605 Moved to graphite-scop-detection.c.
2607 * graphite-scop-detection.c: New.
2608 * graphite-scop-detection.h: New.
2609 * Makefile.in: Add new rule for graphite-scop-detection.o.
2611 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2612 tree-scalar-evolution.h.
2613 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2614 build_sese_loop_nests): Moved here from graphite.c.
2615 (param_index): Renamed parameter_index_in_region.
2617 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2618 Sebastian Pop <sebastian.pop@amd.com>
2620 * gcc.dg/graphite/block-0.c: Expected to fail now.
2621 * gcc.dg/graphite/block-1.c: Same.
2622 * gcc.dg/graphite/block-5.c: Same.
2623 * gcc.dg/graphite/block-6.c: Same.
2625 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2626 Sebastian Pop <sebastian.pop@amd.com>
2628 * graphite.h: Separate from graphite_bb_p the polyhedral
2629 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2630 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2631 graphite-data-ref.h.
2632 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2633 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2634 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2635 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2636 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2637 scop_nb_params): Moved to graphite-poly.h.
2638 * graphite-data-ref.c: Same.
2639 * graphite-data-ref.h: New.
2641 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2642 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2643 is_interchange_valid, graphite_trans_bb_block,
2644 graphite_trans_loop_block, scop_max_loop_depth,
2645 graphite_trans_scop_block, graphite_apply_transformations,
2646 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2648 * graphite-poly.h: New.
2649 * graphite-poly.c: New.
2650 * Makefile.in (OBJS-common): Add graphite-poly.o.
2651 (graphite-poly.o): New rule.
2652 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2655 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2656 Tobias Grosser <grosser@fim.uni-passau.de>
2658 * graphite.c: Replace gb -> gbb.
2660 * graphite-data-ref.c: Same.
2662 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2663 Tobias Grosser <grosser@fim.uni-passau.de>
2665 * Makefile.in (OBJS-commmon): Add sese.o.
2667 (graphite.o): Add sese.h.
2668 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2669 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2670 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2672 (block_before_scop): Add missing return.
2673 (new_scop, free_scop): Remove SESE data structures.
2674 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2675 find_scop_parameters, build_loop_iteration_domains,
2676 add_conditions_to_domain, register_scop_liveout_renames,
2677 copy_bb_and_scalar_dependences): Scop -> SESE.
2679 (add_conditions_to_domain): SCoP -> SESE and remove check
2680 (scop_contains_non_iv_scalar_phi_nodes): New.
2681 (build_scop_conditions_1, build_scop_conditions): Remove check for
2682 non iv scalar phi nodes.
2683 (print_scop_statistics): New.
2684 (graphite_transform_loops): Cleanup.
2686 * graphite.h: Move to sese & cleanup.
2690 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2691 Tobias Grosser <grosser@fim.uni-passau.de>
2693 * graphite.c (build_scop_conditions_1): Conditions are only
2694 at the end of a basic block.
2696 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2697 Tobias Grosser <grosser@fim.uni-passau>
2699 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2701 (GBB_ALPHA): Removed.
2703 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2704 Tobias Grosser <grosser@fim.uni-passau.de>
2706 * graphite-data-ref.c (graphite_test_dependence): Don't use
2707 GBB_DYNAMIC_SCHEDULE.
2708 * graphite.c (new_graphite_bb): Same.
2709 (free_graphite_bb): Same.
2710 (build_scop_dynamic_schedules): Removed.
2711 (graphite_transform_loops): Don't call it.
2712 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2713 (GBB_DYNAMIC_SCHEDULE): Removed.
2715 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2716 Tobias Grosser <grosser@fim.uni-passau.de>
2718 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2719 (print_graphite_bb): Same.
2720 (build_cloog_prog): Same.
2722 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2723 Tobias Grosser <grosser@fim.uni-passau.de>
2725 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2727 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2728 Tobias Grosser <grosser@fim.uni-passau.de>
2730 * graphite.c (build_scop_context): Don't use CloogMatrix.
2731 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2732 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2734 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2735 Tobias Grosser <grosser@fim.uni-passau.de>
2737 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2738 liveout_renames, add_params fields...
2739 (struct sese): ... here.
2740 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2741 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2743 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2744 Tobias Grosser <grosser@fim.uni-passau.de>
2746 * graphite.c (print_scop): Do not print the CLooG program.
2747 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2748 build_cloog_prog, gloog): Don't use SCOP_PROG.
2749 (find_transform): Renamed scop_to_clast.
2750 (print_generated_program, debug_generated_program): New.
2751 (graphite_transform_loops): Adapt to new interface.
2752 * graphite.h (struct scop): Remove program field.
2753 (SCOP_PROG): Removed.
2754 (print_generated_program, debug_generated_program): Declared.
2756 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2758 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2759 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2760 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2761 free_graphite_bb, build_scop_canonical_schedules,
2762 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2763 schedules are now represented using a ppl_Linear_Expression_t.
2764 * graphite.h (struct graphite_bb): Same.
2765 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2766 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2768 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2770 * graphite.c: Free local memory.
2771 * graphite-ppl.c: Same.
2773 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2775 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2776 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2777 swap_constraint_variables, scale_constraint_variable): Removed.
2778 (graphite_trans_bb_strip_mine): Remove pong.
2779 * graphite-ppl.c: Include missing header files.
2780 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2781 * graphite-ppl.h (ppl_strip_loop): Declared.
2782 * Makefile.in (graphite-ppl.o): Adjust dependences.
2784 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2786 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2787 (build_scop_iteration_domain): Same.
2789 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2791 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2793 (add_value_to_dim, scan_tree_for_params_right_scev,
2794 scan_tree_for_params_int): New.
2795 * graphite-ppl.c (oppose_constraint): New.
2796 (insert_constraint_into_matrix): Implement missing cases.
2797 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2799 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2801 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2802 use ppl_move_dimension.
2804 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2806 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2809 * graphite-ppl.c: Same.
2810 * graphite-ppl.h: Same.
2812 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2814 Revert last 3 commits.
2816 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2818 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2820 (add_value_to_dim, scan_tree_for_params_right_scev,
2821 scan_tree_for_params_int): New.
2822 * graphite-ppl.c (oppose_constraint): New.
2823 (insert_constraint_into_matrix): Implement missing cases.
2824 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2826 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2828 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2830 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2831 Tobias Grosser <grosser@fim.uni-passau.de>
2833 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2834 use ppl_move_dimension.
2835 * graphite-ppl.c (ppl_move_dimension): New.
2836 * graphite-ppl.h (ppl_move_dimension): Declared.
2838 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2840 * graphite.c: Do not include cloog/cloog.h.
2841 (print_graphite_bb): Remove ping pong, call PPL print function.
2843 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2845 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2846 (graphite.o): Add dependence on graphite-ppl.h.
2847 (graphite-ppl.o): New.
2848 (graphite-data-ref.c): Ping pong between PPL data structures
2850 * graphite-ppl.c: New.
2851 * graphite-ppl.h: New.
2852 * graphite.c: Include graphite-ppl.h.
2853 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2854 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2855 Ping pong between PPL data structures and matrices.
2856 (new_graphite_bb): Create a PPL constraint system.
2857 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2858 (build_loop_iteration_domains): Use PPL functions.
2859 * graphite.h: Include graphite-ppl.h. Fix comments.
2860 (graphite_bb): Use a ppl_Constraint_System_t instead of
2861 CloogMatrix for representing the domain.
2862 (scop): Remove static_schedule.
2863 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2865 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2867 * graphite.c: Fix some comments.
2869 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2872 * graphite.c (if_region_set_false_region): After moving a region
2873 in the false branch of a condition, remove the empty dummy
2875 (gloog): Remove wrong fix for PR38953.
2877 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2879 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2880 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2881 register_bb_in_sese, new_sese, free_sese): Moved.
2882 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2883 outermost_loop_in_scop, build_scop_iteration_domain,
2884 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2885 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2886 Use loop_in_sese_p instead of loop_in_scop_p.
2887 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2888 (free_scop): Do not free SCOP_BBS_B.
2889 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2890 ref_nb_loops): Moved here...
2891 * graphite.h (ref_nb_loops): ... from here.
2892 (struct scop): Remove bbs_b bitmap.
2893 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2894 * testsuite/gcc.dg/graphite/scop-19.c: New
2896 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2898 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2901 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2903 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2904 eq_loop_to_cloog_loop): Remove.
2905 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2906 * graphite.h (struct scop): Remove loop2cloog_loop.
2907 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2909 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2911 * opts.c (decode_options): Only add graphite options to O2
2912 if we compile with graphite enabled.
2914 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2916 * Merge from mainline (r143163:143684).
2918 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2920 * graphite.c (debug_value): Removed.
2921 * graphite.h (debug_value): Removed.
2923 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2925 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2926 after graphite: pass_copy_prop does not maintain a proper loop closed
2927 SSA form. pass_copy_prop should be fixed.
2929 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2931 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2933 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2935 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2936 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2937 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2940 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2942 * graphite.c (gloog): Return true when code gen succeeded.
2943 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2944 the code of the function did not changed. After cleanup_tree_cfg
2945 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2948 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2950 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2951 gimple_call_lhs is NULL.
2953 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2954 Tobias Grosser <tobi.grosser@amd.com>
2956 * graphite.c (graphite_trans_scop_block): Do not block single
2959 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2960 Tobias Grosser <tobi.grosser@amd.com>
2962 * graphite.c (build_scop_canonical_schedules): Start schedules at
2965 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2966 Tobias Grosser <tobi.grosser@amd.com>
2968 * graphite.c (compare_prefix_loops): New.
2969 (build_scop_canonical_schedules): Rewritten.
2970 (graphite_transform_loops): Move build_scop_canonical_schedules
2971 after build_scop_iteration_domain.
2973 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2974 Tobias Grosser <tobi.grosser@amd.com>
2976 * graphite.c (add_conditions_to_domain): Add the loops to
2977 the dimension of the iteration domain. Do copy the domain
2978 only when it exists.
2979 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2980 (add_conditions_to_constraints): New.
2981 (can_generate_code_stmt, can_generate_code): Removed.
2982 (gloog): Do not call can_generate_code.
2983 (graphite_transform_loops): Call add_conditions_to_constraints
2984 after building the iteration domain.
2986 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2987 Tobias Grosser <tobi.grosser@amd.com>
2988 Jan Sjodin <jan.sjodin@amd.com>
2990 * graphite.c (scan_tree_for_params): On substractions negate
2991 all the coefficients of the term.
2992 (clast_to_gcc_expression_red): New. Handle reduction expressions
2993 of more than two operands.
2994 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2995 (get_vdef_before_scop): Handle also the case of default definitions.
2997 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3000 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3001 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3002 (gloog): Do not call cleanup_tree_cfg.
3003 (graphite_transform_loops): Call cleanup_tree_cfg after all
3004 scops have been code generated.
3006 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3008 * passes.c (init_optimization_passes): Schedule after
3009 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3011 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3013 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3015 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3016 Set the type of an expression to the type of its assign statement.
3017 (expand_scalar_variables_expr): Do not pass loop_p.
3018 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3019 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3020 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3022 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3024 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3025 an expression to the gimple_expr_type of its assign statement.
3026 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3029 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3031 PR tree-optimization/38786
3032 * testsuite/gcc.dg/graphite/pr38786.c: New.
3033 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3034 the SSA_NAME case of expand_scalar_variables_expr.
3035 (expand_scalar_variables_expr): Also gather the scalar computation
3036 used to index the memory access.
3037 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3038 the gimple_stmt_iterator where it inserts new code.
3040 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3042 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3044 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3046 * opts.c (decode_options): Enable flag_graphite_identity and
3047 flag_loop_block in -O2 and above.
3049 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3051 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3052 Fix merge problem: replace with the file from trunk.
3054 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3056 * Merge from mainline (r141727:143163).
3058 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3059 Jan Sjodin <jan.sjodin@amd.com>
3061 PR tree-optimization/38559
3062 * testsuite/gcc.dg/graphite/pr38559.c: New.
3064 * graphite.c (debug_value, copy_constraint,
3065 swap_constraint_variables, scale_constraint_variable, ): New.
3066 (get_lower_bound, get_upper_bound): Removed.
3067 (graphite_trans_bb_strip_mine): Clean up this code that works
3068 only for constant number of iterations. Fully copy upper and
3069 lower bound constraints, not only the constant part of them.
3070 * graphite.h (debug_value): Declared.
3072 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3074 PR tree-optimization/38492
3075 PR tree-optimization/38498
3076 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3077 * tree-chrec.h (scev_is_linear_expression): Declared.
3078 * graphite.c (graphite_cannot_represent_loop_niter): New.
3079 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3080 (graphite_loop_normal_form): Use gcc_assert.
3081 (scan_tree_for_params): Use CASE_CONVERT.
3082 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3083 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3084 Use gcc_assert. Discard scops that contain unhandled cases.
3085 (build_scop_conditions): Return a boolean status for unhandled cases.
3086 (strip_mine_profitable_p): Print the loop number, not its depth.
3087 (is_interchange_valid): Pass the depth of the loop nest, don't
3088 recompute it wrongly.
3089 (graphite_trans_bb_block): Same.
3090 (graphite_trans_bb_block): Print tentative of loop blocking.
3091 (graphite_trans_scop_block): Do not print that the loop has been
3093 (graphite_transform_loops): Do not handle scops that contain condition
3096 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3098 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3099 * testsuite/gcc.dg/graphite/block-1.c: Same.
3100 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3102 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3103 * testsuite/gcc.dg/graphite/block-3.c: New.
3104 * testsuite/gcc.dg/graphite/pr38498.c: New.
3106 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3108 PR tree-optimization/38510
3109 * gcc.dg/graphite/pr38510.c: New.
3110 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3111 (translate_clast): Call recompute_all_dominators before
3113 (gloog): Call recompute_all_dominators before graphite_verify.
3115 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3117 PR tree-optimization/38492
3118 * graphite.c (rename_map_elt, debug_rename_elt,
3119 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3120 rename_map_elt_info, eq_rename_map_elts,
3121 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3122 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3123 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3124 (sese_build_livein_liveouts): New.
3125 (new_sese, free_sese): New.
3126 (new_scop): Call new_sese.
3127 (free_scop): Call free_sese.
3128 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3129 (register_old_new_names): Renamed register_old_and_new_names.
3130 (register_scop_liveout_renames, add_loop_exit_phis,
3131 insert_loop_close_phis, struct igp,
3132 default_liveout_before_guard, add_guard_exit_phis,
3133 insert_guard_phis, copy_renames): New.
3134 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3135 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3136 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3137 (scop_adjust_phis_for_liveouts): New.
3138 (gloog): Call scop_adjust_phis_for_liveouts.
3140 * graphite.h (struct sese): Documented. Added fields liveout,
3142 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3143 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3144 (struct scop): Added field liveout_renames.
3145 (SCOP_LIVEOUT_RENAMES): New.
3147 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3149 PR tree-optimization/38409
3150 * gcc.dg/graphite/pr38409.c: New.
3151 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3153 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3155 * graphite.c (gcc_type_for_cloog_iv): By default return
3157 (graphite_create_new_loop): Don't fold_convert the already
3158 fold_convert-ed expression.
3160 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3162 PR tree-optimization/38446
3163 * gcc.dg/graphite/pr38446.c: New.
3164 * graphite.c (register_bb_in_sese): New.
3165 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3166 looking at the bbs in the region.
3167 * graphite.h (sese): Add region_basic_blocks pointer set to
3168 structure and initialize at the time of defining new scop.
3170 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3172 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3173 (find_params_in_bb): Do not free data refs.
3174 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3176 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3178 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3179 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3180 * testsuite/gcc.dg/graphite/block-5.c: New.
3181 * testsuite/gcc.dg/graphite/block-6.c: New.
3182 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3183 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3184 * testsuite/gcc.dg/graphite/block-2.c: Same.
3186 * graphite.c (struct ivtype_map_elt): New.
3187 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3188 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3189 gcc_type_for_cloog_iv): New.
3190 (loop_iv_stack_patch_for_consts): Use the type of the induction
3191 variable from the original loop, except for the automatically
3192 generated loops, i.e., in the case of a strip-mined loop, in
3193 which case there is no original loop: in that case just use
3195 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3196 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3197 (clast_name_to_gcc): Accept params to be NULL.
3198 (clast_to_gcc_expression): Take an extra parameter for the type.
3199 Convert to that type all the expressions built by this function.
3200 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3201 (graphite_translate_clast_equation): Compute the type of the
3202 clast_equation before translating its LHS and RHS.
3203 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3204 (graphite_create_new_loop): Compute the type of the induction
3205 variable before translating the lower and upper bounds and before
3206 creating the induction variable.
3207 (rename_variables_from_edge, rename_phis_end_scop): New.
3208 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3209 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3210 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3211 compute_cloog_iv_types): New.
3212 (gloog): Call compute_cloog_iv_types before starting the
3213 translation of the clast.
3215 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3216 (GBB_CLOOG_IV_TYPES): New.
3217 (debug_ivtype_map): Declared.
3218 (oldiv_for_loop): New.
3220 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3223 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3224 (param_index): Assert if parameter is not know after parameter
3226 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3227 (find_scop_parameters): Mark, that we have finished parameter
3229 (graphite_transform_loops): Move condition detection before parameter
3231 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3232 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3234 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3236 * graphite.c (graphite_transform_loops): Always call find_transform ()
3237 in ENABLE_CHECKING. So we test these code paths, even if we do not
3240 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3242 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3243 (print_scop): Ditto.
3245 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3248 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3249 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3250 regions more than once.
3252 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3254 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3255 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3258 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3260 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3261 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3262 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3263 (max_precision_type): New.
3264 (value_clast): Removed.
3265 (clast_to_gcc_expression): Be more careful to types of expressions.
3266 Use max_precision_type and update use of gmp_cst_to_tree.
3267 (graphite_translate_clast_equation): Use max_precision_type.
3268 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3269 use the type of the condition.
3270 (graphite_create_new_loop): Do not use integer_type_node, use the
3271 max_precision_type of lb and ub.
3273 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3275 * graphite.c (build_scops_1): Initialize open_scop.exit
3278 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3280 * testsuite/gcc.dg/graphite/pr38084.c: New.
3281 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3282 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3283 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3284 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3285 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3287 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3288 Jan Sjodin <jan.sjodin@amd.com>
3289 Harsha Jagasia <harsha.jagasia@amd.com>
3301 * testsuite/gcc.dg/graphite/pr38073.c: New.
3302 * testsuite/gcc.dg/graphite/pr37928.c: New.
3303 * testsuite/gcc.dg/graphite/pr37883.c: New.
3304 * testsuite/gcc.dg/graphite/pr38125.c: New.
3305 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3306 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3307 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3309 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3310 the number of detected scops. Copy exact same test for loop
3312 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3313 loops to be blocked as reductions are not handled.
3314 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3316 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3317 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3319 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3320 * Makefile.in (graphite.o): Depend on value-prof.h.
3321 (graphite.o-warn): Removed -Wno-error.
3322 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3323 to be a NULL pointer. Call update_stmt. Return the newly created
3324 cannonical induction variable.
3326 * graphite.h (debug_rename_map): Declared. Fix some comments.
3328 * graphite.c: Reimplement the code generation from graphite to gimple.
3329 Include value-prof.h.
3330 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3331 (get_old_iv_from_ssa_name): Removed.
3332 (graphite_stmt_p): New.
3333 (new_graphite_bb): Test for useful statements before building a
3334 graphite statement for the basic block.
3335 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3336 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3338 (recompute_all_dominators, graphite_verify,
3339 nb_reductions_in_loop, graphite_loop_normal_form): New.
3340 (scop_record_loop): Call graphite_loop_normal_form.
3341 (build_scop_loop_nests): Iterate over all the blocks of the
3342 function instead of relying on the incomplete information from
3343 SCOP_BBS. Return the success of the operation.
3344 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3345 (add_bb_domains): Removed.
3346 (build_loop_iteration_domains): Don't call add_bb_domains.
3347 Add the iteration domain only to the basic blocks that have been
3348 translated to graphite.
3349 (build_scop_conditions_1): Add constraints only if the basic
3350 block have been translated to graphite.
3351 (build_scop_data_accesses): Completely disabled until data
3352 dependence is correctly implemented.
3353 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3354 (remove_all_edges_1, remove_all_edges): Removed.
3355 (get_new_name_from_old_name): New.
3356 (graphite_rename_variables_in_stmt): Renamed
3357 rename_variables_in_stmt. Call get_new_name_from_old_name.
3358 Use replace_exp and update_stmt.
3359 (is_old_iv): Renamed is_iv.
3360 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3361 Use replace_exp and update_stmt.
3362 (expand_scalar_variables_expr): Same. Use the map to get the
3363 new names for the renaming of induction variables and for the
3364 renaming of variables after a basic block has been copied.
3365 (expand_scalar_variables): Same.
3366 (graphite_rename_variables): Renamed rename_variables.
3367 (move_phi_nodes): Removed.
3368 (get_false_edge_from_guard_bb): New.
3369 (build_iv_mapping): Do not insert the induction variable of a
3370 loop in the renaming iv map if the basic block does not belong
3372 (register_old_new_names, graphite_copy_stmts_from_block,
3373 copy_bb_and_scalar_dependences): New.
3374 (translate_clast): Heavily reimplemented: copy basic blocks,
3375 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3376 At each translation step call graphite_verify ensuring the
3377 consistency of the SSA, loops and dominators information.
3378 (collect_virtual_phis, find_vdef_for_var_in_bb,
3379 find_vdef_for_var_1, find_vdef_for_var,
3380 patch_phis_for_virtual_defs): Removed huge hack.
3381 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3382 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3383 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3384 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3385 if_region_get_condition_block, if_region_set_false_region,
3386 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3387 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3388 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3389 rewrite_into_sese_closed_ssa): New.
3390 (gloog): Remove dead code. Early return if code cannot be
3391 generated. Call cleanup_tree_cfg once the scop has been code
3393 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3394 block loops with less than two loops.
3395 (graphite_apply_transformations): Remove the call to
3396 scop_remove_ignoreable_gbbs.
3397 (limit_scops): When build_scop_loop_nests fails, continue on
3398 the next scop. Fix open_scop.entry.
3399 (graphite_transform_loops): Call recompute_all_dominators: force the
3400 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3401 Call initialize_original_copy_tables and free_original_copy_tables
3402 to be able to copy basic blocks during code generation.
3403 When build_scop_loop_nests fails, continue on next scop.
3404 (value_clast): New union.
3405 (clast_to_gcc_expression): Fix type cast warning.
3407 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3409 * Merge from mainline (r140838:141727).
3411 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3415 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3417 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3421 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3422 exits and conditions.
3423 * testsuite/gcc.dg/graphite/pr37943.c: New.
3425 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3428 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3430 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3432 * doc/invoke.texi: Fix spaces.
3434 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3436 PR tree-optimization/37891
3437 Reverted last commit.
3438 * graphite.c (create_single_entry_edge): Set
3439 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3441 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3442 Mitul Thakkar <mitul.thakkar@amd.com>
3444 * graphite.c (create_single_entry_edge): Set
3445 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3447 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3449 * doc/invoke.texi: Add -fgraphite-identity.
3450 * graphite.c (graphite_apply_transformations): Check for
3451 -fgraphite-identity.
3452 * toplev.c (process_options): Add flag_graphite_identity.
3453 * tree-ssa-loop.c: Add flag_graphite_identity.
3455 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3457 Undo changes from 2008-10-02:
3458 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3459 operand type when copying the operand to a variable of different type.
3460 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3461 with the IV name after increment.
3463 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3464 Harsha Jagasia <harsha.jagasia@amd.com>
3466 PR tree-optimization/37828
3467 * testsuite/gcc.dg/graphite/pr37828.c: New.
3468 * graphite.c (graphite_trans_loop_block): Do not loop block
3469 single nested loops.
3471 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3472 Sebastian Pop <sebastian.pop@amd.com>
3474 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3475 rename_map_elt_info, eq_rename_map_elts): New.
3476 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3477 (expand_scalar_variables_expr): Change parameters.
3478 (expand_scalar_variables_stmt): Same.
3479 (expand_scalar_variables): Same.
3480 (graphite_rename_ivs): Rename graphite_rename_variables.
3481 (build_iv_mapping): New.
3482 (translate_clast): Call build_iv_mapping.
3483 * graphite.h (gbb_p): New name.
3485 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3487 PR tree-optimization/37684
3488 * gcc.dg/graphite/pr37684.c: New.
3489 * graphite.c (exclude_component_ref): New.
3490 (is_simple_operand): Call exclude_component_ref.
3492 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3493 Harsha Jagasia <harsha.jagasia@amd.com>
3495 PR tree-optimization/37485
3496 * gcc.dg/graphite/block-2.c: New
3497 * graphite.c (gmp_cst_to_tree): Moved.
3498 (iv_stack_entry_is_constant): New.
3499 (iv_stack_entry_is_iv): New.
3500 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3501 (loop_iv_stack_insert_constant): New.
3502 (loop_iv_stack_pop): Use new datatpype.
3503 (loop_iv_stack_get_iv): Same.
3504 (loop_iv_stack_get_iv_from_name): Same.
3505 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3506 (loop_iv_stack_patch_for_consts): New.
3507 (loop_iv_stack_remove_constants): New.
3508 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3509 (translate_clast): Call loop_iv_stack_patch_for_consts and
3510 loop_iv_stack_remove_constants.
3511 (gloog): Use new datatype. Redirect construction edge to end
3512 block to avoid accidental deletion.
3513 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3515 (union iv_stack_entry_data): New. Data in iv stack entry.
3516 (struct iv_stack_entry): New. Datatype for iv stack entries.
3518 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3520 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3521 operand type when copying the operand to a variable of different type.
3523 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3525 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3526 with the IV name after increment.
3528 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3530 * Merge from mainline (r140164:140838).
3532 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3534 * graphite-data-ref.c: New.
3535 * graphite.c (print_scop): Also dump the dependence graph.
3536 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3537 (new_scop): Initialize SCOP_DEP_GRAPH.
3538 (build_scop_dynamic_schedules): New.
3539 (build_access_matrix_with_af): Fixed column numbering.
3540 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3541 * graphite.h: Add ifndef/define guards against multiple inclusion.
3542 (struct scop): Add dep_graph field.
3543 (SCOP_DEP_GRAPH): Defined.
3544 (ref_nb_loops): Fixed and moved to other position.
3545 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3546 (nb_loops_around_loop_in_scop): New.
3547 (graphite_dump_dependence_graph): Declared.
3548 (graphite_build_rdg_all_levels): Declared.
3549 (graphite_test_dependence): Declared.
3550 * Makefile.in (graphite-data-ref.o): New target.
3552 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3554 * Merge from mainline (139870:140164).
3556 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3558 * Merge from mainline (138275:139870).
3559 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3560 the commits from trunk broke the niter detection.
3562 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3564 * graphite.c: Add more documentation. Fix formatting.
3565 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3566 loop_iv_stack_debug): Moved...
3567 (schedule_to_scattering): Move before use.
3568 (dot_all_scops): Include in "#if 0" the code for system
3571 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3572 loop_iv_stack_debug): ...here.
3574 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3576 * tree-phinodes.c (make_phi_node): Extern.
3577 (add_phi_node_to_bb): New.
3578 (create_phi_node): Call add_phi_node_to_bb.
3579 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3580 (remove_statement): Handle case where stored phi was updated
3581 and is no longer the same.
3582 * graphite.c (is_parameter): New.
3584 (expand_scalar_variables_expr): New.
3585 (expand_scalar_variables_stmt): New.
3586 (expand_scalar_variables): New.
3587 (move_phi_nodes): Create new phi instead of moving old one.
3588 (translate_clast): Call expand_scalar_variables.
3589 (find_vdef_for_var_in_bb): Also scan regular definitions.
3590 (skip_phi_defs): New.
3591 (collect_scop_exit_phi_args): New.
3592 (patch_scop_exit_phi_args): New.
3593 (gloog): Patch phis after scop.
3594 * tree-flow.h: (add_phi_node_to_bb): Declared.
3595 (make_phi_node): Declared.
3597 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3599 * graphite.c (end_scop): Split the entry of the scop when it
3600 is the header of the loop in which the scop is ending.
3601 (build_scops_1, limit_scops): Update uses of end_scop.
3603 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3605 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3606 SCOP_ENTRY or SCOP_EXIT.
3608 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3610 * graphite.c (get_construction_edge): Removed.
3611 (gloog): Construction edge is the scop entry edge.
3613 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3615 * graphite.c (can_generate_for_scop): Removed.
3616 (gloog): Do not call it.
3618 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3620 * graphite.c (new_scop): Entry of a scop is an edge.
3621 Initialize SESE region.
3622 (free_scop): Free SESE region.
3623 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3624 (split_difficult_bb): New, split from end_scop.
3625 (end_scop): Exit of a scop is an edge.
3626 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3627 not automatically updated and thus is always wrong.
3628 * graphite.h (struct sese): New.
3631 (struct scop): New field for a SESE region. Remove entry, exit.
3632 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3633 semantics as before. Moved comment around.
3635 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3636 Sebastian Pop <sebastian.pop@amd.com>
3638 * graphite.c (graphite_transform_loops): Always enable gloog
3639 and find_transform when ENABLE_CHECKING.
3641 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3643 * graphite.c (graphite_transform_loops): Move pretty printer
3644 of SCOPs before doing any transform. Remove call to print_scops
3645 and dot_all_scops_1.
3647 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3649 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3650 (print_graphite_bb): Same.
3652 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3654 * graphite.c (dot_all_scops_1): Cleanup.
3655 (move_scops): Fix comment.
3657 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3659 * graphite.c (build_scop_bbs): Revert commit 139355:
3661 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3662 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3664 * graphite.c (build_scop_bbs): Factor up code.
3666 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3668 * graphite.c (gloog): Update dominator info.
3670 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3672 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3674 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3676 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3678 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3679 (translate_clast): Correct formatting.
3680 * graphite.h (struct num_map): Removed.
3681 (struct graphite_bb): Remove num_map field.
3682 (GBB_INDEX_TO_NUM_MAP): Removed.
3684 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3686 * graphite.c (build_access_matrix_with_af): Fix comments.
3687 (build_scop_data_accesses): Same.
3689 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3691 * graphite.c (build_scop_data_accesses): Don't construct
3692 access matrices. Add a FIXME and an assert condition that
3693 should pass when the access matrices will be needed.
3695 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3697 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3699 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3700 Moved close by free_graphite_bb.
3701 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3702 (new_scop): Move close by free_scop.
3703 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3705 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3707 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3708 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3709 instead of recursive call.
3710 (graphite_translate_clast_equation): New.
3711 (graphite_create_guard_cond_expr): New.
3712 (graphite_create_new_guard): New.
3713 (get_stack_index_from_iv): Removed.
3714 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3715 (get_true_edge_from_guard_bb): New.
3716 (translate_clast): Handle stmt_guard in clast.
3717 (get_construction_edge): Allow construction edge detection for
3718 a scope entry with multiple predecessors if one predecessor is
3719 the immediate dominator of scope entry.
3720 (can_generate_code_stmt): Enable code generation for clast_guard.
3721 (gloog): Use correct context loop. Removed check for post dominators.
3722 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3724 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3726 * graphite.c (remove_dead_loops): Document better which
3729 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3731 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3733 (graphite.o): Also depends on pointer-set.h.
3735 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3737 * graphite.c (scop_record_loop): Fix compile warning.
3739 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3740 Sebastian Pop <sebastian.pop@amd.com>
3742 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3744 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3746 * graphite.c (build_graphite_bb): Initialize bb->aux to
3747 point to the graphite_bb_p.
3748 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3750 (add_bb_domains): Does not use the scop parameter.
3751 (graphite_transform_loops): Clean bb->aux at the end.
3753 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3754 Sebastian Pop <sebastian.pop@amd.com>
3756 * testsuite/lib/target-supports.exp
3757 (check_effective_target_fgraphite): New.
3759 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3760 check_effective_target_fgraphite returns false.
3761 Set dg-do-what-default to compile.
3762 (scan-graphite-dump-times): Removed.
3763 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3765 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3766 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3767 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3768 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3769 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3770 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3771 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3772 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3773 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3774 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3775 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3776 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3777 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3778 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3779 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3780 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3781 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3782 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3783 * testsuite/gcc.dg/graphite/block-0.c: Same.
3784 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3785 * testsuite/gcc.dg/graphite/block-1.c: Same.
3786 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3787 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3788 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3789 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3790 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3792 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3794 * graphite.c: Fix some XXX comments.
3795 (build_scop_dynamic_schedules): Removed.
3797 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3799 * graphite.h (scop_max_loop_depth): Moved...
3800 * graphite.c (scop_max_loop_depth): ...here.
3801 (remove_all_edges_1): New.
3802 (remove_all_edges): Factored code.
3803 (remove_cond_exprs): Check only the last statement for
3804 a GIMPLE_COND expression.
3806 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3808 * graphite.c (scan_tree_for_params): Early return when the
3809 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3810 (find_scop_parameters): Factor out code.
3811 (graphite_trans_bb_strip_mine): Remove dead code.
3813 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3815 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3816 graphite_trans_bb_move_loop): Factor asserts.
3817 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3818 Do not call calculate_dominance_info and estimate_bb_frequencies.
3820 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3822 * graphite.c (create_loops_mapping, free_loops_mapping,
3823 create_loops_mapping_num, debug_loop_mapping_1,
3824 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3825 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3826 graphite_loops_mapping_add_child_num,
3827 graphite_loops_mapping_insert_child,
3828 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3829 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3830 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3831 create_num_from_index, get_num_from_index,
3832 swap_loop_mapped_depth): Removed.
3833 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3834 (free_scop): Do not call free_loops_mapping.
3835 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3836 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3837 get_loop_mapped_depth.
3838 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3839 (graphite_trans_bb_strip_mine): Same.
3840 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3841 (struct scop): Remove field loops_mapping.
3843 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3844 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3846 * graphite.c (scop_record_loop): Factor out one level of the
3847 condition by early return.
3848 (build_scop_loop_nests): Format following FSF coding style.
3849 (build_scop_dynamic_schedules): Factor out code.
3850 (scopdet_bb_info): Reindent. Default case should not be reachable.
3852 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3853 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3855 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3856 assignments that are not handled as simple operands for now.
3858 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3859 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3861 * graphite.c (build_scop_bbs): Factor up code.
3863 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3864 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3866 * graphite.c (stmt_simple_for_scop_p): Factor code out
3868 (enum gbb_type): New. Group all the GBB_* types under it.
3869 (is_loop_exit): Moved...
3870 (end_scop): Enable BB spliting.
3871 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3872 * cfgloop.h (is_loop_exit): Declared.
3874 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3876 * doc/invoke.texi: Remove strides from examples containing
3877 DO loops when the strides are equal to 1.
3879 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3880 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3882 * graphite.c (graphite_trans_scop_block): Or the result with
3883 the result from graphite_trans_loop_block.
3884 * testsuite/gcc.dg/graphite/block-1.c: New.
3885 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3886 * testsuite/gfortran.dg/graphite/block-2.f: New.
3888 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3890 * graphite.c (graphite_transform_loops): Call cloog_initialize
3893 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3895 * tree-data-ref.c) (stmt_simple_memref_p): New.