1 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
4 SCOP_TRANSFORMED_SCHEDULE.
9 * graphite-poly.h (lst_p): New.
12 (LST_LOOP_FATHER): New.
15 (scop_to_lst): Declared.
16 (print_lst): Declared.
17 (debug_lst): Declared.
22 (lst_dewey_number): New.
23 (struct scop): Add original_schedule and transformed_schedule fields.
24 (SCOP_ORIGINAL_SCHEDULE): New.
25 (SCOP_TRANSFORMED_SCHEDULE): New.
26 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
28 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
30 * graphite-dependences.c (reduction_ddr): New.
31 (graphite_legal_transform_bb): Call reduction_ddr.
32 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
33 Initialize PBB_IS_REDUCTION.
34 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
35 (PBB_IS_REDUCTION): New.
36 (new_poly_bb): Update declaration.
37 * graphite-scop-detection.h (build_scop_bbs): Removed.
38 (nb_reductions_in_loop): Removed.
39 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
40 parameter for reductions.
41 (try_generate_gimple_bb): Update call to new_poly_bb.
42 (build_scop_bbs_1): Same.
43 (build_scop_bbs): Same.
44 (gsi_for_phi_node): New.
45 (scalar_close_phi_node_p): Remove gcc_assert.
46 (split_reduction_stmt): New.
47 (is_reduction_operation_p): New.
48 (phi_contains_arg): New.
49 (follow_ssa_with_commutative_ops): New.
50 (detect_commutative_reduction_arg): New.
51 (detect_commutative_reduction_assign): New.
52 (follow_inital_value_to_phi): New.
53 (edge_initial_value_for_loop_phi): New.
54 (initial_value_for_loop_phi): New.
55 (detect_commutative_reduction): New.
56 (translate_scalar_reduction_to_array_for_stmt): New.
57 (insert_copyout): New.
59 (translate_scalar_reduction_to_array): New.
60 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
61 (rewrite_commutative_reductions_out_of_ssa_loop): New.
62 (rewrite_commutative_reductions_out_of_ssa): New.
63 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
64 * sese.h (split_region_for_bb): New.
66 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
67 * gcc.dg/graphite/interchange-1.c: Fix format.
68 * gcc.dg/graphite/interchange-10.c: New.
70 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
72 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
75 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
77 * graphite-sese-to-poly.c (scev_analyzable_p): New.
78 (rewrite_cross_bb_scalar_dependence): New.
79 (rewrite_cross_bb_scalar_deps): New.
80 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
81 Call rewrite_cross_bb_scalar_deps.
83 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
85 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
86 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
89 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
91 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
92 * graphite-interchange.c (pbb_do_interchange): Same.
93 * graphite-poly.c (print_scattering_function): Same.
95 * graphite-poly.h (pbb_loop): New.
96 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
98 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
100 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
102 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
104 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
105 so don't pass a pointer to it.
106 (build_alias_set_for_drs): Same.
107 (build_base_obj_set_for_drs): Same.
108 (build_scop_drs): Same.
110 2009-09-26 Li Feng <nemokingdom@gmail.com>
112 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
113 the alias graph of data references.
115 2009-09-25 Li Feng <nemokingdom@gmail.com>
117 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
118 (build_scop_drs): When debugging, write the alias graph to file,
119 otherwise, should be disabled.
121 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
123 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
124 (is_simple_operand): Remove call to stmt_simple_memref_p.
125 (stmt_simple_for_scop_p): Update call to is_simple_operand.
127 2009-09-17 David Edelsohn <edelsohn@gnu.org>
129 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
130 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
131 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
132 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
133 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
135 2009-09-17 Li Feng <nemokingdom@gmail.com>
138 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
139 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
140 (graphite_carried_dependence_level_k): Ditto.
141 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
142 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
143 (new_poly_dr): Adjust declaration.
144 * graphite-sese-to-poly.c (free_data_refs_aux): New.
145 (free_gimple_bb): Added free_data_refs_aux.
146 (build_poly_dr): Add dr_base_object_set.
147 (partition_drs_to_sets): New.
148 (dr_same_base_object_p): New.
149 (build_alias_set_for_drs): New.
150 (build_base_object_set_for_drs): New.
151 (build_scop_drs): Add build_base_obj_set_for_drs.
152 * graphite-sese-to-poly.h: Added #define for alias set number index and
153 base object set index.
154 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
155 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
157 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
159 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
160 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
162 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
164 * graphite-sese-to-poly.c (struct irp_data): Removed.
165 (idx_record_params): Removed.
166 (find_params_in_bb): Scan for parameters the access functions; don't
167 parse the tree representation.
169 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
171 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
172 passes at -O1 and below.
174 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
176 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
177 tree-scalar-evolution.h, and then tree-data-ref.h.
178 * graphite-clast-to-gimple.c: Same.
179 * graphite-dependences.c: Same.
180 * graphite-interchange.c: Same.
181 * graphite-poly.c: Same.
182 * graphite-scop-detection.c: Same.
183 * graphite-sese-to-poly.c: Same.
185 * lambda-code.c: Same.
186 * matrix-reorg.c: Same.
187 * tree-data-ref.c: Same.
188 * tree-if-conv.c: Same.
189 * tree-loop-distribu: Same.: Same.
190 * tree-loop-linear.c: Same.
191 * tree-parloops.c: Same.
192 * tree-predcom.c: Same.
193 * tree-vect-patterns.c: Same.
195 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
197 Partially revert the previous patch, except the following.
198 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
199 as parameters the operands of the not expression.
201 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
203 * tree-scalar-evolution.c (instantiate_scev_assign): New.
204 Do not call analyze_scalar_evolution on assignments.
205 (instantiate_scev_phi): Call analyze_scalar_evolution.
206 (instantiate_scev_name): Call instantiate_scev_assign and
207 instantiate_scev_phi.
208 (instantiate_scev_not): Adapted to pass as parameters the operands
209 of the not expression.
211 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
213 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
214 to pass as parameters the operands of the binary expression.
216 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
218 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
219 instantiate_scev_not. Handle NEGATE_EXPR.
220 (instantiate_scev_r): Handle NEGATE_EXPR.
222 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
224 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
226 (instantiate_scev_r): Move code in instantiate_scev_2
227 and instantiate_scev_1.
229 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
231 * tree-scalar-evolution.c (instantiate_scev_3): New.
232 (instantiate_scev_1): Move code in instantiate_scev_3.
234 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
236 * tree-scalar-evolution.c (instantiate_scev_poly): New.
237 (instantiate_scev_1): Move code in instantiate_scev_poly.
239 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
241 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
242 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
244 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
246 * tree-scalar-evolution.c (instantiate_scev_convert): New.
247 (instantiate_scev_1): Move code in instantiate_scev_convert.
249 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
251 * tree-scalar-evolution.c (instantiate_scev_binary): New.
252 (instantiate_scev_1): Move code in instantiate_scev_binary.
254 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
256 * tree-scalar-evolution.c (instantiate_scev_name): New.
257 (instantiate_scev_1): Move code in instantiate_scev_name.
259 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
261 * Merge from mainline (150992:151171).
263 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
265 * graphite-dependences.c (graphite_legal_transform_bb): Call
266 pbb_remove_duplicate_pdrs.
267 * graphite-poly.c (can_collapse_pdr): Removed.
268 (pdr_find_duplicate): Removed.
269 (can_collapse_pdrs): New.
270 (pbb_remove_duplicate_pdrs): New.
271 (new_poly_dr): Do not look for duplicates.
272 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
273 (PBB_PDR_DUPLICATES_REMOVED): New.
274 (pbb_remove_duplicate_pdrs): Declared.
276 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
278 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
279 the strides by multiplying by PDR_NB_REFS.
280 * graphite-poly.c (can_collapse_pdr): New.
281 (pdr_find_duplicate): New.
282 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
283 Initialize PDR_NB_REFS.
284 * graphite-poly.h (struct poly_dr): Add field nb_refs.
286 (new_poly_dr): Number of subscripts is a graphite_dim_t.
288 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
290 Revert one of the previous commits:
291 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
292 the computation of symmetric data dependence relations.
293 (dependency_between_pbbs_p): Same.
295 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
298 * graphite-poly.c (apply_poly_transforms): Remove legality test before
301 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
303 * graphite-dependences.c (pddr_original_scattering): Return NULL
304 for read-read dependence relations.
305 * graphite-poly.h (enum poly_dr_type): Fix comment.
308 (pdr_may_write_p): New.
310 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
312 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
313 (struct poly_dr): Same.
315 * graphite-poly.c (new_poly_dr): Same.
317 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
318 Sebastian Pop <sebastian.pop@amd.com>
320 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
321 pbb_strip_mine_time_depth. Changed the implementation so that
322 transformation is expressed as a transformation on
323 time (scatttering) dimensions. Also, ensures that the 2d+1
324 scheduling format is preserved.
325 (pbb_strip_mine_profitable_p): Profitability is based on the
326 iteration number of a given time (scattering) dimension,
327 and not on a original loop depth dimension.
328 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
329 (pbb_do_strip_mine): Call psct_dynamic_dim.
330 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
331 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
332 (pbb_nb_dynamic_scattering_transform): New.
333 (psct_dynamic_dim): New.
335 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
337 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
338 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
339 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
340 * graphite-interchange.c (build_linearized_memory_access): Same.
341 (memory_stride_in_loop): Same.
343 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
345 * graphite-dependences.c (pddr_original_scattering): New.
346 (graphite_legal_transform_dr): Call pddr_original_scattering.
349 * graphite-dependences.h (dot_deps): Declared.
350 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
351 (print_pdr): Print PDR_ID.
352 * graphite-poly.h (struct poly_dr): Add field id.
355 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
357 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
359 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
360 not delete the original dependence relation.
362 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
364 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
365 the computation of symmetric data dependence relations.
366 (dependency_between_pbbs_p): Same.
368 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
370 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
371 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
372 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
373 (free_poly_ddr): New.
374 (pddr_is_empty): New.
375 (dependence_polyhedron_1): Now returns a poly_ddr_p.
376 (dependence_polyhedron): Same. Remove useless gcc_assert.
378 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
379 (graphite_carried_dependence_level_k): Call pddr_is_empty.
380 * graphite-dependences.h (enum poly_dependence_kind): New.
381 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
382 (PDRP_SOURCE): Renamed PDDR_SOURCE.
383 (PDRP_SINK): Renamed PDDR_SINK.
384 (PDRP_DDP): Renamed PDDR_DDP.
386 (free_poly_ddr): Declared.
387 * graphite-poly.c (new_scop): Use the new hash function names.
388 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
390 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
392 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
394 * Merge from mainline (150764:150992).
396 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
398 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
399 bounds with LT_EXPR to make niter analysis more precise on code
400 generated by Graphite.
402 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
404 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
405 (graphite_legal_transform_bb): Same.
406 (poly_drs_may_alias_p): Same.
408 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
411 * graphite-ppl.c (ppl_max_for_le): Correct the use of
412 ppl_Pointset_Powerset_C_Polyhedron_maximize.
414 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
416 * graphite-poly.c (print_pbb): Print PBB index.
418 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
420 * Merge from mainline (r150672:150764).
422 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
424 * graphite-interchange.c (ppl_max_for_le): Moved...
425 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
426 * graphite-ppl.c (ppl_max_for_le): ... here.
427 * graphite-ppl.h (ppl_max_for_le): Declared.
429 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
431 * Merge from mainline (r150372:150672).
433 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
436 * sese.c (convert_for_phi_arg): New.
437 (add_guard_exit_phis): Use convert_for_phi_arg.
439 * testsuite/gfortran.dg/graphite/id-17.f: New.
441 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
443 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
444 unknown subscript upper bounds.
446 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
448 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
449 Pranav Garg <pranav.garg2107@gmail.com>
451 * graphite-interchange.c (gather_access_strides): Removed.
452 (ppl_max_for_le): New.
453 (build_linearized_memory_access): New.
454 (memory_stride_in_loop): New.
455 (pbb_interchange_profitable_p): Reimplemented.
456 * graphite-ppl.h (ppl_new_id_map): New.
457 (ppl_interchange): New.
459 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
461 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
463 * graphite-interchange.c (compute_subscript): Removed.
464 (compute_array_size_cstr): Removed.
465 (compute_array_size_poly): Removed.
466 (compute_array_size): Removed.
467 (gather_access_strides_poly): Removed.
468 (gather_access_strides): Empty.
470 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
472 * graphite-dependences.c (dependence_polyhedron_1): Replace
473 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
474 (graphite_legal_transform_dr): Same.
475 (graphite_carried_dependence_level_k): Same.
476 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
477 Initialize PDR_NB_SUBSCRIPTS.
478 (print_pdr_access_layout): Replace pdr_nb_subscripts with
480 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
481 (PDR_NB_SUBSCRIPTS): New.
482 (pdr_nb_subscripts): Removed.
483 (pdr_dim): Simplified.
484 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
485 with PDR_NB_SUBSCRIPTS.
487 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
489 * graphite-interchange.c (compute_array_size): Remove use of
491 * graphite-poly.c (new_poly_dr): Remove argument data_container.
492 Do not initialize PDR_DATA_CONTAINER.
493 (print_pdr): Do not print PDR_DATA_CONTAINER.
494 * graphite-poly.h (struct poly_dr): Remove data_container field.
495 (PDR_DATA_CONTAINER): Removed.
496 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
498 (build_poly_dr): Same.
500 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
502 * testsuite/gcc.dg/graphite/interchange-9.c: New.
504 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
505 Sebastian Pop <sebastian.pop@amd.com>
507 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
508 copy of the dependence polyhedron. Free the temporary objects.
509 (graphite_carried_dependence_level_k): Free unused objects before
512 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
513 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
514 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
515 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
516 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
518 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
520 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
521 Early return without analyzing the data dependences if no
522 transform has been done. Call restore_scattering if the transform
524 (graphite-interchange.c): Same.
525 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
526 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
527 (apply_poly_transforms): Do not gcc_assert that
528 the transform is legal.
529 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
530 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
531 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
532 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
533 * graphite-poly.h (struct poly_scattering): New.
534 (struct poly_bb): Add original, transformed, and saved fields.
535 Remove transformed_scattering, original_scattering, nb_local_variables,
536 and nb_scattering_transform fields.
537 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
538 (poly_scattering_new): New.
539 (poly_scattering_free): New.
540 (poly_scattering_copy): New.
541 (store_scattering_pbb): New.
542 (store_scattering): New.
543 (restore_scattering_pbb): New.
544 (restore_scattering): New.
545 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
546 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
548 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
550 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
553 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
555 * Makefile.in (graphite.o): Depends on PREDICT_H.
556 * graphite.c: Include predict.h.
557 (graphite_finalize): Call tree_estimate_probability.
558 * predict.c (predict_loops): Do not call scev_initialize and
560 (tree_estimate_probability_bb): New.
561 (tree_estimate_probability): Do not initialize loops: move that
562 code to the driver. Call tree_estimate_probability_bb.
563 (tree_estimate_probability_driver): New.
564 (pass_profile): Use tree_estimate_probability_driver.
565 * predict.h (tree_estimate_probability): Declared.
567 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
569 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
570 * graphite-dependences.c (graphite_legal_transform): Add time to
571 TV_GRAPHITE_DATA_DEPS.
572 (dependency_between_pbbs_p): Same.
573 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
575 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
577 * Merge from mainline (r149952:150372).
579 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
581 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
582 * graphite-blocking.c: Same.
583 * graphite-clast-to-gimple.c: Same.
584 * graphite-dependences.c: Same.
585 * graphite-poly.c: Same.
586 * graphite-poly.h: Same.
587 * graphite-ppl.c: Same.
588 * graphite-scop-detection.c: Same.
589 * graphite-sese-to-poly.c: Same.
592 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
594 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
595 (remove_simple_copy_phi): New.
596 (remove_invariant_phi): New.
597 (simple_copy_phi_p): New.
598 (reduction_phi_p): New.
599 (gsi_for_ssa_name_def): New.
600 (insert_out_of_ssa_copy): New.
601 (insert_out_of_ssa_copy_on_edge): New.
602 (create_zero_dim_array): New.
603 (scalar_close_phi_node_p): New.
604 (rewrite_close_phi_out_of_ssa): New.
605 (rewrite_phi_out_of_ssa): New.
606 (rewrite_reductions_out_of_ssa): New.
607 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
609 * testsuite/gcc.dg/graphite/id-11.c: New.
610 * testsuite/gcc.dg/graphite/id-15.c: New.
611 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
612 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
613 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
614 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
615 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
616 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
617 * testsuite/gfortran.dg/graphite/id-13.f: New.
618 * testsuite/gfortran.dg/graphite/id-5.f: New.
620 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
622 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
623 check that nb_reductions_in_loop is zero.
624 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
626 (nb_reductions_in_loop): Removed.
627 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
628 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
629 (bb_contains_non_iv_scalar_phi_nodes): Removed.
630 (scop_contains_non_iv_scalar_phi_nodes): Removed.
631 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
633 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
635 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
636 statements that have an empty iteration domain.
637 * testsuite/gfortran.dg/graphite/id-16.f: New.
639 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
641 * tree-scalar-evolution.c (instantiate_scev_1): Return
642 chrec_dont_know when the result is not above instantiate_below.
643 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
644 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
645 the tree has a known scalar evolution.
646 * testsuite/gfortran.dg/graphite/id-14.f: New.
647 * testsuite/gfortran.dg/graphite/id-15.f: New.
649 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
651 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
653 (rename_variables): Keep inserting renames after the ones already
656 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
658 * graphite-sese-to-poly.c (compare_bb_depths): New.
659 (graphite_sort_dominated_info): New.
660 (build_scop_bbs_1): Call graphite_sort_dominated_info.
661 (build_scop_scattering): Fix comment.
663 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
665 * graphite.c (graphite_finalize): Call print_loops instead of
666 dump_function_to_file.
667 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
668 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
669 loops generated in the graphite output file.
670 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
671 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
672 * testsuite/gfortran.dg/graphite/id-12.f: New.
674 2009-07-24 Li Feng <nemokingdom@gmail.com>
676 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
679 2009-07-24 Li Feng <nemokingdom@gmail.com>
680 Tobias Grosser <grosser@fim.uni-passau.de>
682 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
683 alias set number build alias in ACCESSES polyhedron.
684 (build_alias_set_for_drs): New.
685 (build_pbb_drs): Added build_alias_set_for_drs.
686 * graphite-dependences.c (poly_drs_may_alias_p): New.
687 (graphite_carried_dependence_level_k): Check alias information
688 before building polyhedron.
690 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
692 * Makefile.in (lambda-code.o): Fix formatting.
694 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
696 * Merge from mainline (r149350-149952)
698 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
700 * graphite-poly.c (apply_poly_transforms): Move strip_mine
701 before interchange to prepare for loop blocking.
703 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
705 * graphite-poly.c (apply_poly_transforms): Add checks after every
707 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
708 done in apply_poly_transforms.
710 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
712 * graphite-dependences.c (build_lexicographically_gt_constraint):
713 Replace RES parameter with *RES.
714 (dependence_polyhedron_1): Pass an address of the parameter RES
715 instead of value of RES.
717 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
719 * graphite.c (graphite_finalize): Fix comment.
720 (graphite_transform_loops): Reset scev info after code generation
723 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
725 * graphite.c (graphite_finalize): Call scev_reset.
727 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
729 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
730 GBB_CLOOG_IV_TYPES hash table twice.
731 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
732 (add_condition_to_domain): Clear GMP values.
734 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
736 * graphite-dependences.c: Fix formatting.
737 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
738 (pbb_number_of_iterations): Free ppl_Linear_Expression.
739 * graphite-sese-to-poly.c: Fix formatting.
740 * graphite.c (graphite_transform_loops): Create the hash table
741 after the early return.
743 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
745 * testsuite/gcc.dg/graphite/id-14.c: New.
746 * testsuite/gcc.dg/graphite/pr40157.c: New.
747 * testsuite/gfortran.dg/graphite/id-11.f: New.
749 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
751 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
752 (build_poly_scop): Return false when there are no pbbs within
753 loops to avoid to pass to cloog scops with no loops.
755 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
757 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
758 useless test "i % 2".
759 (build_pbb_scattering_polyhedrons): Fix formatting.
760 (build_poly_dr): Same.
761 * graphite.c (graphite_transform_loops): Restructure.
763 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
765 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
766 reduction_list parameter.
767 (rewrite_all_phi_nodes_with_iv): Same.
768 (canonicalize_loop_ivs): Same.
769 * tree-parloops.c (struct brli): Removed.
770 (build_reduction_list_info): Removed.
771 (build_new_reduction): New.
772 (analyze_reduction_list): Removed.
773 (gather_scalar_reductions): Find reductions instead of phi
774 nodes that can't be canonicalized.
775 (try_create_reduction_list): Remove reduction_list parameter.
776 (gen_parallel_loop): Same.
777 (parallelize_loops): Remove analyze_reductions variable,
778 initialization and free.
779 Change reduction_list htab initialization to reduction_info
780 elements instead of ssa names.
781 Call try_create_reduction_list and gen_parallel_loop without
782 analyzed_reduction argument.
783 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
784 canonicalize_loop_ivs with one less argument.
785 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
787 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
789 * graphite-dependences.c (new_poly_dr_pair): New.
790 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
791 (new_poly_dr_pair): New.
792 (eq_poly_dr_pair_p): New.
793 (hash_poly_dr_pair_p): New.
794 * graphite-dependences.h (struct poly_dr_pair): New.
795 (eq_poly_dr_pair_p): Declared.
796 (hash_poly_dr_pair_p): Declared.
797 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
798 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
799 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
800 * Makefile.in (graphite-poly.o): Add dependence on
801 graphite-dependences.h.
803 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
805 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
806 polynomials of degree > 1 pass to Graphite.
807 * tree-chrec.c (scev_is_linear_expression): Call
808 evolution_function_is_affine_multivariate_p.
809 * testsuite/gfortran.dg/graphite/id-10.f90: New.
811 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
813 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
814 Instantiate scevs varying in outer loops.
815 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
817 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
819 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
820 redundant constraint.
822 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
824 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
825 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
826 based on the file names as in the C testsuite.
827 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
828 * testsuite/gfortran.dg/graphite/block-2.f: Same.
829 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
830 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
831 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
832 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
833 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
834 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
835 * testsuite/gfortran.dg/graphite/id-6.f: Same.
836 * testsuite/gfortran.dg/graphite/id-9.f: Same.
837 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
838 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
839 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
841 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
843 * sese.c (expand_scalar_variables_call): New.
844 (expand_scalar_variables_ssa_name): Handle calls in expander.
846 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
848 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
849 Expect to see the pattern twice.
850 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
851 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
852 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
854 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
856 * testsuite/gcc.dg/graphite/id-10.c: New.
857 * testsuite/gcc.dg/graphite/id-12.c: New.
858 * testsuite/gfortran.dg/graphite/id-7.f: New.
859 * testsuite/gfortran.dg/graphite/id-8.f: New.
861 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
863 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
866 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
868 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
870 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
872 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
874 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
876 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
877 building PDR subscripts.
879 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
881 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
882 computation of array sizes.
884 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
886 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
888 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
890 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
891 build_pairwise_constraint, dr_equality_constraints,
892 build_pairwise_scheduling_equality,
893 build_pairwise_scheduling_inequality, lexicographically_gt_p,
894 build_lexicographically_gt_constraint, dependence_polyhedron,
895 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
896 Move from NNC_Polyhedron to C_Polyhedron.
897 * graphite-interchange.c (compute_array_size_poly,
898 gather_access_strides): Dito.
899 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
900 free_scop, pbb_number_of_iterations): Dito.
901 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
902 pbb_dim_iter_domain, struct scop): Dito.
903 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
904 new_Cloog_Domain_from_ppl_Polyhedron,
905 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
906 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
907 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
908 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
909 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
910 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
911 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
912 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
913 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
914 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
915 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
916 build_scop_iteration_domain, build_poly_dr): Dito
918 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
920 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
922 * testsuite/gcc.dg/graphite/run-id-1.c: New.
924 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
926 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
927 positivity constraint on the symbolic number of iterations.
929 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
931 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
933 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
934 Tobias Grosser <grosser@fim.uni-passau.de>
936 * graphite-clast-to-gimple.c (build_scop_context): Removed.
937 (build_cloog_prog): Directly use SCOP_CONTEXT.
938 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
939 (free_scop): Free SCOP_CONTEXT.
940 (print_scop_context): New.
941 (print_scop): Call print_scop_context.
942 (debug_scop_context): New.
943 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
944 (struct scop): Added field context.
946 * graphite-sese-to-poly.c (add_param_constraints): New.
947 (build_scop_context): New.
948 (build_poly_scop): Call build_scop_context.
950 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
952 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
953 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
954 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
955 * graphite-ppl.h: Include double-int.h and tree.h.
956 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
957 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
958 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
959 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
961 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
964 POINTER_PLUS_EXPR for pointer types.
965 (clast_to_gcc_expression): Same.
967 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
969 * graphite-poly.c (print_scattering_function): Early return when
970 PBB_TRANSFORMED_SCATTERING is not initialized.
971 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
973 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
975 * tree-parloops.c (analyze_reduction_list): Remove unused variable
978 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
980 * tree-parloops.c (analyze_reduction_list): Change return
982 (try_create_reduction_list): Move the call to
983 analyze_reduction_list to the beginining.
984 Call reduction_phi with analyzed_reductions as argument
985 instead of reduction_list.
987 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
989 * Merge from mainline (r148296:149346)
991 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
993 * graphite-scop-detection.c (graphite_can_represent_init): New.
994 (graphite_can_represent_scev): Call graphite_can_represent_init:
995 check that the initial value does not contain multiplications of
997 (stmt_has_simple_data_refs_p): New.
998 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
999 (is_simple_operand): Fix formatting.
1000 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1002 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1004 * testsuite/gcc.dg/graphite/id-13.c: New.
1005 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1006 analyze_scalar_evolution, use scalar_evolution_in_region.
1007 (scan_tree_for_params_right_scev): Add extra assert.
1008 (parameter_index_in_region_1): Split from parameter_index_in_region.
1009 (idx_record_params): Use scalar_evolution_in_region.
1010 (find_params_in_bb): Same.
1011 (find_scop_parameters): Same.
1012 (build_loop_iteration_domains): Same.
1013 (create_linear_expr_from_tree): Same.
1014 * sese.c (scalar_evolution_in_region): New.
1015 * sese.h (scalar_evolution_in_region): Declared.
1016 (defined_in_sese_p): New.
1017 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1019 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1022 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1024 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1025 TREE_DATA_REF_H also implies SCEV_H.
1027 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1029 * graphite-poly.c (print_scop_params): New.
1030 (print_scop): Call print_scop_params.
1031 (debug_scop_params): New.
1032 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1034 2009-07-07 Li Feng <nemokingdom@gmail.com>
1036 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1037 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1038 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1039 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1040 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1041 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1043 2009-07-07 Li Feng <nemokingdom@gmail.com>
1045 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1046 for dependency checking part.
1047 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1048 tests for dependency checking.
1049 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1050 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1051 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1052 flag -fdump-tree-graphite-all for autopar testsuites.
1054 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1056 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1057 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1058 canonicalize_loop_ivs): Moved...
1059 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1061 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1063 * tree-parloops.c (try_create_reduction_list): Pass an extra
1064 argument analyzed_reductions. Call analyze_reduction_list.
1065 (gen_parallel_loop): Do not call analyze_reduction_list.
1066 (parallelize_loops): Init and finalize analyzed_reductions.
1068 2009-07-06 Li Feng <nemokingdom@gmail.com>
1070 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1071 Added flag -fno-loop-strip-mine for autopar testcase.
1073 2009-07-04 Li Feng <nemokingdom@gmail.com>
1075 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1076 transformed scattering dimension instead of unmatch orignal when
1077 calling dependence_polyhedron.
1079 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1081 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1083 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1085 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1086 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1088 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1090 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1091 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1092 * graphite-poly.c (pbb_number_of_iterations): New.
1093 * graphite-poly.h (pbb_number_of_iterations): Declared.
1094 (pbb_iterator_dim, pbb_parameter_dim): New.
1096 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1098 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1099 last commit on type of lower and upper bound of loops.
1101 2009-06-29 Li Feng <nemokingdom@gmail.com>
1103 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1104 graphite-dependences.h.
1105 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1106 (mark_bb_with_pbb): New.
1107 (get_stmtfor_depth): New.
1108 (find_pbb_via_hash): New.
1109 (dependency_in_loop_p): New.
1110 (mark_loops_parallel): New.
1111 (free_aux_in_new_loops): New.
1112 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1113 bb with it's relevant pbb. Mark newly created loops. Remove mark
1114 innermost loop parallel without checking.
1115 (gloog): Add parameter BB_PBB_MAPPING.
1116 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1117 (gloog): Change declaration.
1118 (mark_loop_parallel): Make extern.
1119 (free_aux_in_new_loops): Declare.
1120 (bb_pbb_map_hash): New.
1121 (eq_bb_pbb_map): New.
1122 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1123 auto parallelization when flag_graphite_force_parallel is set.
1124 (graphite_finalize): Added free_aux_in_new_loops.
1125 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1126 the innermost loop that marked parallel. Use
1127 flag_graphite_force_parallel instead of loop->can_be_parallel.
1128 (loop_parallel_p): Move inner most checking out of function.
1130 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1132 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1133 type of lower and upper bound of loops signed long int.
1135 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1137 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1138 expression outside the loop.
1140 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1142 * gcc.dg/graphite/interchange-8.c: New.
1144 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1146 * gcc.dg/graphite/interchange-0.c: XFailed.
1147 * gcc.dg/graphite/interchange-5.c: XFailed.
1148 * gcc.dg/graphite/interchange-6.c: XFailed.
1150 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1152 * graphite-interchange.c (compute_array_size_poly): The end of the
1153 recursion should return 1.
1155 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1157 * graphite-interchange.c (compute_array_size_cstr): Allow the
1158 subscript multiplier to be -1.
1159 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1160 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1161 data_container. Initializes PDR_DATA_CONTAINER.
1162 (print_pdr_access_layout): New.
1163 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1164 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1166 (PDR_DATA_CONTAINER): New.
1167 (new_poly_dr): Update declaration.
1168 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1169 (build_poly_dr): Call pdr_add_data_dimensions.
1171 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1173 * graphite-poly.h (struct poly_dr): Fix comment.
1174 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1175 (pdr_add_memory_accesses): New.
1176 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1178 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1180 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1181 (print_pbb): Add call to print_pdrs.
1182 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1184 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1185 Li Feng <nemokingdom@gmail.com>
1187 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1188 (dependency_between_pbbs_p): New.
1189 (lexicographically_gt_p): Assure !empty_p before polyhedron
1190 intersection assign.
1191 (build_lexicographically_gt_constraint): Correct lexicographically
1193 * graphite-dependences.h: New.
1194 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1196 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1198 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1199 (gloog): Print to dump_file the generated clast.
1200 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1201 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1203 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1205 * graphite-poly.c (extend_scattering): Increment
1206 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1208 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1210 * graphite-interchange.c (compute_array_size_poly): Added exit of
1211 recursion condition. Continue iterating even after the first equality.
1212 (compute_array_size): Same.
1214 2009-06-24 Li Feng <nemokingdom@gmail.com>
1216 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1217 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1218 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1219 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1220 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1222 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1224 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1225 only when the use verifies is_gimple_reg.
1227 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1229 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1230 Allocate scaldims after call to unify_scattering_dimensions.
1232 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1234 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1236 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1237 Albert Cohen <albert.cohen@inria.fr>
1239 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1240 variables for the strip mining.
1242 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1243 Pranav Garg <pranav.garg2107@gmail.com>
1245 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1246 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1247 (graphite-blocking.o): New rule.
1248 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1249 * graphite-blocking.c: New.
1250 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1251 flag_loop_strip_mine.
1252 (psct_scattering_dim_for_loop_depth): New.
1253 * graphite-poly.h (scop_do_strip_mine): Declared.
1254 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1255 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1256 flag_loop_strip_mine.
1258 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1260 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1261 a GMP value and a PPL coefficient at each iteration of a loop.
1263 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1265 * graphite-dependences.c (dependence_polyhedron): Do not use
1266 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1267 pbb_nb_scattering_transform.
1268 (graphite_legal_transform_dr): Same.
1269 * graphite-poly.c (extend_scattering): Same.
1270 (unify_scattering_dimensions): Same.
1271 (print_scattering_function): Same.
1272 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1273 PBB_NB_LOCAL_VARIABLES.
1274 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1275 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1276 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1277 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1278 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1279 (pbb_nb_scattering_transform): New.
1280 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1281 (psco_scattering_dim): Add assert on parameters.
1282 (psct_scattering_dim): Same.
1283 (psct_scattering_dim_for_loop_depth): Declared.
1284 (psct_local_var_dim): New.
1285 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1286 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1287 correct layout, call pbb_nb_local_vars.
1288 (psct_add_local_variable, psct_add_scattering_dimension): New.
1289 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1290 Initialize PBB_NB_SCATTERING_TRANSFORM.
1292 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1294 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1295 (set_coef): Renamed ppl_set_coef.
1296 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1298 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1300 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1301 test a boolean against 1.
1302 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1303 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1304 (pbb_do_interchange): Returns true when a transform has been performed.
1305 (scop_do_interchange): Same.
1306 * graphite-poly.c (apply_poly_transforms): Use the return value of
1307 scop_do_interchange.
1308 * graphite-poly.h (scop_do_interchange): Update declaration.
1310 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1312 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1314 * sese.c (sese_reset_aux_in_loops): New.
1315 * sese.h (sese_reset_aux_in_loops): New.
1317 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1319 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1320 multiplier and multiply the constant by the multiplier.
1321 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1322 (build_poly_dr): Do not use the multiplier to define the subscript.
1324 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1326 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1327 compiler's data reference. Initialize PDR_CDR.
1328 (print_pdr): Call dump_data_reference.
1329 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1330 Add compiler_dr field.
1331 (PDR_BB): Renamed PDR_PBB.
1333 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1334 GCC's data reference representation.
1335 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1336 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1338 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1340 * graphite-poly.c (print_scattering_function): Also print the layout.
1341 * graphite-poly.h (pbb_nb_local_vars): New.
1343 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1345 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1347 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1349 * graphite-poly.c (print_pdr, debug_pdr): New.
1350 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1351 (PDR_BASE): Removed.
1353 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1355 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1358 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1360 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1361 subscript identification column.
1362 (pbb_do_interchange): Print to dump_file that some loops "will be
1363 interchanged". Rely on that chain of characters in the testcases.
1364 * gcc.dg/graphite/interchange-0.c: New.
1365 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1366 interchange-*.c files and compile them with -floop-interchange.
1368 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1370 * graphite-interchange.c (interchange_profitable_p): Renamed
1371 pbb_interchange_profitable_p.
1373 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1374 Harsha Jagasia <harsha.jagasia@amd.com>
1375 Pranav Garg <pranav.garg2107@gmail.com>
1377 * graphite-interchange.c (interchange_profitable_p): Make static.
1378 (pbb_interchange_loop_depths, pbb_do_interchange,
1379 scop_do_interchange): New.
1380 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1381 for flag_loop_interchange.
1382 * graphite-poly.h (scop_do_interchange): Declared.
1383 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1384 flag_loop_interchange is used.
1386 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1388 * graphite-dependences.c (dependence_polyhedron): Update use of
1389 pbb_nb_scattering_dims.
1390 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1391 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1392 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1393 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1395 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1397 * graphite.c: Cleanup foo.
1399 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1401 * Merge from mainline (r143684:148293).
1402 * Disabled libpcp until it gets fixed.
1404 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1405 Harsha Jagasia <harsha.jagasia@amd.com>
1407 * graphite-interchange.c: New.
1408 * Makefile.in (graphite-interchange.o): New.
1409 * graphite-poly.h (interchange_profitable_p): Declared.
1410 * graphite-ppl.h (value_max): New.
1412 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1415 * graphite-poly.h: Fix some comments.
1419 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1422 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1423 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1424 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1425 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1426 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1427 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1428 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1429 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1430 * graphite-clast-to-gimple.c: Same.
1431 * graphite-dependences.c: Same.
1432 * graphite-poly.c: Same.
1433 * graphite-sese-to-poly.c: Same.
1435 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1437 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1438 expressions for an IV rename, as returned by clast_to_gcc_expression.
1439 (copy_renames): Rename new_name to expr.
1440 * sese.c (debug_rename_elt): Same.
1443 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1444 the information from the rename map.
1445 (rename_variables_in_stmt): Same.
1446 (add_loop_exit_phis): Rename new_name to expr.
1447 (insert_loop_close_phis): Same.
1448 (add_guard_exit_phis): Same. Call force_gimple_operand.
1449 * sese.h (struct rename_map_elt): Rename new_name to expr.
1450 (new_rename_map_elt): Same.
1452 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1454 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1455 * sese.c (set_rename): Make it extern.
1456 * sese.h (set_rename): Declared.
1458 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1460 * graphite-poly.c (extend_scattering): Free values.
1461 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1463 (ppl_print_powerset_matrix): Same.
1464 * graphite-scop-detection.c (free_scops_1): New.
1465 (limit_scops): Call free_scops_1.
1466 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1467 (build_poly_dr): Free PPL coefficients.
1468 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1470 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1472 * graphite-dependences.c: New.
1473 * graphite-data-ref.c: Removed.
1474 * graphite-data-ref.h: Removed.
1475 * Makefile.in (graphite-data-ref.o): Removed.
1476 (graphite-dependences.o): Added.
1477 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1478 * graphite-poly.c: Same.
1479 Move the data dependence testing to graphite-dependences.c.
1481 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1483 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1484 from graphite_cannot_represent_loop. Code refactored.
1485 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1487 2009-05-17 Li Feng <nemokingdom@gmail.com>
1489 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1490 Cover all the testcases (not only the filtered ones).
1492 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1494 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1495 unnecessary check. Update comments. Move check for REAL_TYPE here.
1496 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1497 done in (stmt_simple_for_scop_p).
1499 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1501 * graphite.c (print_global_statistics): New.
1502 (print_graphite_scop_statistic): New.
1503 (print_graphite_statistics): New.
1504 (graphite_initialize, graphite_transform_loops): Print statistics.
1505 * graphite-scop-detection (build_scops): Print statistics.
1506 (print_graphite_scop_statistics): New.
1507 (print_graphite_statistics): New.
1509 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1511 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1512 (debug_clast_name_index): Removed.
1513 (debug_clast_name_indexes_1): Removed.
1514 (debug_clast_name_indexes): Removed.
1515 (clast_name_index_elt_info): Removed.
1516 (eq_clast_name_indexes): Removed.
1517 (clast_name_to_index): Removed.
1518 (new_clast_name_index): Removed.
1519 (save_clast_name_index): Removed.
1520 (save_var_name): Moved...
1521 (init_sese_params_index): Removed.
1522 (clast_name_to_gcc): Remove use of name_tree.
1523 (initialize_cloog_names): Same.
1524 (gloog): Do not call init_sese_params_index.
1525 * graphite-sese-to-poly.c (save_var_name): ...here.
1526 (parameter_index_in_region): New.
1527 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1528 (parameter_index_in_region): Removed.
1529 (is_parameter): Remove use of name_tree.
1530 * sese.h (struct name_tree): Removed.
1531 (struct sese): Remove use of name_tree. New field params_names.
1532 (SESE_PARAMS_NAMES): New.
1533 (SESE_PARAMS): Remove duplicate.
1534 (parameter_index_in_region): Removed.
1535 (sese_nb_params): Remove use of name_tree.
1536 (struct clast_name_index): New.
1537 (new_clast_name_index): New.
1538 (clast_name_to_index): New.
1539 (save_clast_name_index): New.
1540 (debug_clast_name_index): New.
1541 (debug_clast_name_indexes_1): New.
1542 (debug_clast_name_indexes): New.
1543 (clast_name_index_elt_info): New.
1544 (eq_clast_name_indexes): New.
1546 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1548 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1549 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1550 (graphite_loop_normal_form): Do not pass region. Do not
1551 initialize SESE_OLDIVS.
1552 (build_graphite_loop_normal_form): Update call to
1553 graphite_loop_normal_form.
1554 * sese.c (debug_oldivs): Removed.
1555 (new_sese): Do not initialize SESE_OLDIVS.
1556 (free_sese): Do not free SESE_OLDIVS.
1557 (oldiv_for_loop): Removed.
1558 * sese.h (struct sese): Remove old_ivs.
1559 (SESE_OLDIVS): Removed.
1560 (oldiv_for_loop): Removed.
1562 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1564 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1565 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1566 replaced by a call to newivs_to_depth_to_newiv.
1567 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1568 (clast_to_gcc_expression_red): Same.
1569 (gcc_type_for_clast_expr): Same.
1570 (gcc_type_for_clast_eq): Same.
1571 (graphite_translate_clast_equation): Same.
1572 (graphite_create_guard_cond_expr): Same.
1573 (graphite_create_new_guard): Same.
1574 (graphite_create_new_loop): Same.
1575 (build_iv_mapping): Same.
1576 (translate_clast): Same.
1578 (loop_iv_stack_patch_for_consts): Removed. *
1579 sese.c (iv_stack_entry_is_constant): Removed.
1580 (iv_stack_entry_is_iv): Removed.
1581 (loop_iv_stack_push_iv): Removed.
1582 (loop_iv_stack_insert_constant): Removed.
1583 (loop_iv_stack_pop): Removed.
1584 (loop_iv_stack_get_iv): Removed.
1585 (loop_iv_stack_get_iv_from_name): Removed.
1586 (debug_loop_iv_stack): Removed.
1587 (free_loop_iv_stack): Removed.
1588 (loop_iv_stack_remove_constants): Removed. *
1589 sese.h (iv_stack_entry_kind): Removed.
1590 (iv_stack_entry_data_union): Removed.
1591 (iv_stack_entry_struct): Removed.
1592 (iv_stack_entry_p): Removed.
1593 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1594 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1595 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1596 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1597 (gbb_loop_at_index): Fix indenting.
1598 (gbb_loop_index): Removed.
1600 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1602 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1603 Call clast_name_to_index.
1605 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1607 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1608 do not pass params. Get params from SESE_PARAMS.
1609 (clast_to_gcc_expression): Same.
1610 (clast_to_gcc_expression_red): Same.
1611 (gcc_type_for_clast_eq): Same.
1612 (graphite_translate_clast_equation): Same.
1613 (graphite_create_new_loop): Same.
1614 * sese.c (rename_variables_in_stmt): Fix comment.
1616 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1618 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1620 Call save_clast_name_index.
1621 (translate_clast): Pass newivs_index.
1622 (gloog): Create and free newivs_index.
1624 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1626 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1627 (clast_name_index_p): New type.
1628 (debug_clast_name_index): New.
1629 (debug_clast_name_indexes_1): New.
1630 (debug_clast_name_indexes): New.
1631 (clast_name_index_elt_info): New.
1632 (eq_clast_name_indexes): New.
1633 (clast_name_to_index): New.
1634 (new_clast_name_index): New.
1635 (save_clast_name_index): New.
1636 (init_sese_params_index): New.
1637 (gloog): Call init_sese_params_index.
1638 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1639 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1640 (free_sese): Free SESE_PARAMS_INDEX.
1641 * sese.h (struct sese): Add params_index.
1642 (SESE_PARAMS_INDEX): New.
1644 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1646 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1647 (graphite_create_new_loop): Pass the newivs vector. Push the
1648 newly created IV to newivs.
1649 (translate_clast): Pass the newivs vector.
1650 (gloog): Create and destroy the newivs vector.
1652 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1654 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1655 (graphite_loop_normal_form): Initialize loop->aux with the unique
1656 IV that has been created.
1658 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1660 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1661 scev with parameters in the base part. They where forbidden
1664 2009-05-11 Li Feng <nemokingdom@gmail.com>
1666 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1667 compile options by file names.
1668 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1669 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1670 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1671 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1673 2009-05-08 Li Feng <nemokingdom@gmail.com>
1675 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1676 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1677 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1678 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1680 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1682 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1685 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1687 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1688 allow integer constant strides.
1689 (graphite_can_represent_expr): Depend on outermost_loop.
1690 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1691 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1692 build_scops_1): Same.
1693 (scopdet_basic_block_info): Same and insert layered SCoP
1695 (try_generate_gimple_bb): Cleanup.
1696 (build_scops): Enable data references.
1698 * testsuite/gcc.dg/graphite/id-5.c: New.
1699 * testsuite/gcc.dg/graphite/id-9.c: New.
1700 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1701 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1703 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1705 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1706 that we have not yet built for this SCoP.
1708 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1710 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1711 for complex numbers.
1713 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1715 * graphite-ppl.c: Fix build if cloog is not available.
1717 2009-05-04 Li Feng <nemokingdom@gmail.com>
1719 * tree-parloops.c (loop_parallel_p): Remove construction of
1720 NITER and REDUCTION_LIST.
1721 (try_get_loop_niter): New.
1722 (try_create_reduction_list): New.
1723 (parallelize_loops): Bypass the failed checkings in autopar
1724 when can_be_parallel in loop structure is set to true.
1726 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1728 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1729 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1731 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1733 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1734 Enable EQ_EXPR and NE_EXPR again.
1736 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1738 * graphite-scop-detection.c (graphite_can_represent_scev):
1739 Add check if scev is affine multivariate.
1740 (harmful_stmt_in_bb): Check if we can represent the conditions.
1741 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1743 * testsuite/gcc.dg/graphite/id-7.c: New.
1745 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1747 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1748 Check all bbs in region, not only the bbs that are represented in
1750 (build_poly_scop): Add newline.
1751 * testsuite/gcc.dg/graphite/id-8.c: New.
1753 2009-04-30 Li Feng <nemokingdom@gmail.com>
1755 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1756 when loop initialize.
1757 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1758 * common.opt: Declare flag_graphite_force_parallel.
1759 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1761 * graphite-poly.c (apply_poly_transforms): Introduce
1762 flag_graphite_force_parallel.
1763 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1764 * toplev.c (process_options): ditto and replace a not correctly
1767 2009-04-30 Li Feng <nemokingdom@gmail.com>
1769 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1770 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1771 to the redefinition.
1772 (compute_cloog_iv_types_1): ditto.
1773 (build_iv_mapping): ditto.
1774 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1776 (free_gimple_bb): Removed GBB_LOOPS related free part.
1777 (build_bb_loops): Removed.
1778 * sese.h (struct gimple_bb): Removed loops.
1779 (GBB_LOOPS): Removed.
1780 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1781 (gbb_loop_index): ditto.
1783 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1785 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1786 allow non constant strides.
1787 * testsuite/gcc.dg/graphite/scop-20.c: New.
1789 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1791 * graphite-scop-detection.c (dot_all_scops): Fix system call
1792 return value warning.
1795 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1797 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1798 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1800 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1802 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1803 build_pairwise_constraint, dr_equality_constraints,
1804 build_pairwise_scheduling_equality,
1805 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1806 build_lexicographically_gt_constraint, dependence_polyhedron,
1807 graphite_legal_transform_dr, graphite_legal_transform_bb,
1808 graphite_legal_transform): New.
1809 * graphite-poly.h (graphite_legal_transform): Declared.
1810 * graphite-sese-to-poly.c (build_poly_scop): Call to
1811 graphite_legal_transform is disabled for the moment.
1813 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1815 * graphite-poly.h (pbb_nb_scattering_dims): New.
1816 (pbb_nb_scattering): Use it.
1818 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1820 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1821 Pointset_Powerset version of ppl_insert_dimensions.
1822 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1824 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1826 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1828 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1830 * graphite-poly.h: Fix comment.
1832 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1834 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1836 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1838 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1841 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1843 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1844 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1847 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1849 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1850 handle EQ_EXPR and NE_EXPR.
1852 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1854 * graphite-poly.h (poly_dr): Fix comment.
1856 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1857 Tobias Grosser <grosser@fim.uni-passau.de>
1859 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1860 with a zero dimension polyhedron.
1861 (find_scop_parameters): Move the call to scop_set_nb_params here.
1862 (build_loop_iteration_domains): Store in loop->aux the iteration
1864 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1865 by any loop in scop.
1866 (build_poly_scop): Do not call scop_set_nb_params.
1868 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1869 Tobias Grosser <grosser@fim.uni-passau.de>
1871 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1872 add_condition_to_domain not GT_EXPR.
1874 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1876 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1877 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1878 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1879 upper_bound_assign to calculate unions.
1880 * testsuite/gcc.dg/graphite/id-6.c: New.
1882 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1884 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1885 handle abnormal edges.
1887 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1889 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1890 (free_poly_bb): Also free poly_drs.
1891 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1892 (poly_dr): Polyhedron to Pointset_Powerset.
1893 (pdr_accessp_nb_subscripts): Same.
1894 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1897 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1899 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1900 names into more meaningful names.
1902 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1904 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1905 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1907 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1909 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1911 * tree-parloops.c (rewrite_phi_with_iv): New.
1912 (rewrite_all_phi_nodes_with_iv): New.
1913 (canonicalize_loop_ivs): Call them.
1915 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1917 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1918 graphite_find_data_references_in_stmt.
1919 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1920 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1922 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1924 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1926 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1928 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1929 instead of bb_in_region.
1930 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1931 (build_sese_conditions): Use flag_bb_in_sese.
1932 * sese.c (register_bb_in_sese): Removed.
1933 (new_sese): Remove initialization of SESE_REGION_BBS.
1934 (free_sese): Do not free SESE_REGION_BBS.
1935 * sese.h (struct sese): Remove field region_basic_blocks.
1936 (SESE_REGION_BBS): Removed.
1937 (bb_in_sese_p): Implement in function of bb_in_region.
1939 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1941 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1944 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1946 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1948 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1949 (add_condition_to_domain): New.
1950 (add_condition_to_pbb): New.
1951 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1952 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1954 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1956 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1957 ppl_Pointset_Powerset.
1958 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1959 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1960 (pbb_nb_loops): Same.
1961 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1962 add_conditions_to_domain): Same.
1963 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1964 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1965 ppl_const_Polyhedron_t.
1966 (ppl_print_powerset_matrix): New.
1967 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1968 ppl_print_powerset_matrix): New.
1969 (ppl_print_polyhedron_matrix): Updated.
1971 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1973 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1975 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1977 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1978 (print_iteration_domains, debug_iteration_domain,
1979 debug_iteration_domains): New.
1980 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1981 debug_iteration_domains): Declared.
1982 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1985 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1986 Sebastian Pop <sebastian.pop@amd.com>
1988 * graphite-poly.h (print_iteration_domain): New.
1989 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1990 (build_sese_conditions_1, build_sese_conditions_after,
1991 build_sese_conditions_before): New.
1992 (build_sese_conditions): Rewritten.
1994 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1995 Tobias Grosser <grosser@fim.uni-passau.de>
1997 Cleanup of code generation liveouts.
1998 * graphite-clast-to-gimple.c (translate_clast): Use a single
1999 rename_map instead of one per translated statement.
2000 Do not use SESE_LIVEOUT_RENAMES.
2001 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2002 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2003 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2004 phi node of a reduction: when a loop contains a reduction used outside
2005 the loop, there should be a scalar close phi node on the exit block.
2006 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2007 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2008 (free_sese): Do not free them.
2009 (sese_build_liveouts_use): Do not use them.
2010 (sese_build_liveouts_bb): Same.
2011 (sese_build_liveouts): Same.
2012 (sese_insert_phis_for_liveouts): Same.
2013 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2014 (defined_in_loop_p): New.
2015 (alive_after_loop): New.
2016 (close_phi_not_yet_inserted_p): New.
2017 (struct alep, alep_p): New.
2018 (add_loop_exit_phis): Remove from the rename_map all the names defined
2019 in the code generated loop.
2020 (insert_loop_close_phis): Traverse the rename_map passed to it.
2021 Don't use SESE_LIVEOUT_RENAMES.
2022 (default_liveout_before_guard): Renamed default_before_guard.
2023 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2024 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2025 (register_sese_liveout_renames): Removed.
2026 (copy_bb_and_scalar_dependences): Do not call it.
2027 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2029 (SESE_LIVEOUT): Removed.
2030 (SESE_LIVEOUT_RENAMES): Removed.
2031 (SESE_REDUCTION_LIST): Removed.
2032 (sese_build_liveouts): Removed.
2033 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2034 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2035 (insert_guard_phis): Same.
2036 (rename_map_elt): Declare a VEC of them.
2037 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2038 trees not pointers to trees.
2040 Rewrite in canonical close SSA form:
2041 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2042 (limit_scops): Close the scop after the block containing the close phi
2044 (canonicalize_loop_closed_ssa): New.
2045 (canonicalize_loop_closed_ssa_form): New.
2046 (build_scops): Call canonicalize_loop_closed_ssa_form.
2048 * graphite-sese-to-poly.c: Fix typos.
2050 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2052 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2054 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2055 (print_pbb): Add conditions.
2057 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2058 Sebastian Pop <sebastian.pop@amd.com>
2060 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2061 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2062 (build_scop_bbs_1): New.
2063 (build_scop_bbs): Rewrite.
2064 * sese.h (bb_in_region): New.
2066 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2068 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2070 (print_scop): Style.
2071 * graphite-poly.h (poly_bb): Add drs vector.
2072 (PBB_DRS): Add accessor.
2073 * graphite-sese-to-poly.c (build_poly_dr): New.
2074 (build_pbb_drs, build_scop_drs): New.
2075 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2077 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2079 * tree-ssa-loop.c: Include forgotten toplev.h
2081 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2083 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2084 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2085 * testsuite/gcc.dg/graphite/pr37928.c: Same
2086 * testsuite/gcc.dg/graphite/pr38409.c: Same
2087 * testsuite/gcc.dg/graphite/pr38498.c: Same
2088 * testsuite/gcc.dg/graphite/pr38559.c: Same
2089 * testsuite/gcc.dg/graphite/pr39335.c: Same
2090 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2091 * testsuite/gfortran.dg/graphite/block-2.f: Same
2092 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2095 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2097 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2098 build_access_matrix, build_scop_data_accesses): Remove access function
2099 building. (We get a new version soon).
2100 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2101 * sese.h (nb_loops_around_loop_in_sese): Remove.
2102 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2104 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2105 Sebastian Pop <sebastian.pop@amd.com>
2107 * graphite-scop-detection.c (struct scopdet_info): Rename last
2109 (scopdet_basic_block_info, build_scops_1): Don't use
2110 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2112 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2113 Sebastian Pop <sebastian.pop@amd.com>
2115 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2116 * sese.c (sese_build_liveouts_use): Renamed from
2117 sese_build_livein_liveouts_use. Remove liveins.
2118 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2119 Call sese_build_liveouts_use.
2120 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2121 Call sese_build_liveouts_bb.
2122 (new_sese, free_sese): Remove liveins.
2123 (sese_add_exit_phis_var): Deleted.
2124 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2126 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2128 * sese.h (sese): Remove num_ver and livein.
2129 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2131 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2133 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2135 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2137 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2138 (build_scop_scattering): Do not use compare_prefix_loops any more.
2139 (nb_common_loops): New.
2141 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2143 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2144 (register_old_and_new_names): Renamed set_rename.
2146 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2148 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2149 of the decl from the previous commit.
2151 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2153 * graphite-scop-detection.c (dot_scop): New.
2154 * graphite-scop-detection.h (dot_scop): Declared.
2156 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2158 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2160 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2162 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2163 condition at the end of the loop.
2164 * graphite.c (graphite_initialize, graphite_finalize): Print to
2165 dump_file the compiled function.
2166 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2167 of create_empty_loop_on_edge.
2168 (translate_clast): Update the code generation of loops for the new
2170 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2172 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2174 Reverted the patch from 2009-03-19.
2176 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2178 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2180 (print_scop): Style.
2181 * graphite-poly.h (poly_bb): Add drs vector.
2182 (PBB_DRS): Add accessor.
2183 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2184 (build_access_matrix_with_af, build_access_matrix,
2185 build_scop_data_accesses): Delete.
2186 (build_poly_dr): New.
2187 (build_pbb_drs, build_scop_drs): New.
2188 (build_poly_scop): call build_scop_drs.
2190 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2192 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2193 once per basic block.
2195 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2197 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2198 (graphite_can_represent_expr): Renamed from loop_affine_expr
2200 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2201 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2202 (scopdet_basic_block_info): Actually define entry_block.
2203 (stmt_simple_memref_p): Moved here from ...
2205 * tree-data-ref.c (stmt_simple_memref_p): here.
2206 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2208 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2210 * testsuite/gcc.dg/graphite/id-4.c: New.
2212 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2214 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2215 (register_old_and_new_names): Update the content of the map.
2216 When there was already a rename_map_elt in the map at that
2218 (copy_bb_and_scalar_dependences): Do rename_variables after
2219 expand_scalar_variables.
2220 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2221 of the map. When there was already a rename_map_elt in the
2222 map at that location, free it.
2223 (translate_clast): Pass the rename_map. Do not initialize and free
2224 a rename_map per stmt_user.
2225 (gloog): Initialize and free one rename_map and pass it to
2228 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2230 * sese.c (expand_scalar_variables_stmt,
2231 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2233 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2234 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2235 the gimple_stmt_iterator of the statement to be expanded.
2236 * graphite-scop-detection.c (is_simple_operand): Do handle
2239 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2241 * graphite-scop-detection.c (is_simple_operand): Do not handle
2243 * testsuite/gcc.dg/graphite/id-2.c: New.
2245 * graphite-sese-to-poly.c (build_bb_loops,
2246 add_value_to_dim, scan_tree_for_params_right_scev,
2247 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2248 find_params_in_bb, build_loop_iteration_domains,
2249 add_conditions_to_domain): Remove subtract.
2251 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2253 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2254 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2255 pbb_loop_at_index -> gbb_loop_at_index.
2256 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2257 (debug_loop_vec): Delete.
2258 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2259 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2260 (PBB_LOOPS): Removed.
2261 (PBB_BLACK_BOX): Insert cast.
2262 (pbb_set_black_box): New setter.
2263 (pbb_loop_at_index, pbb_loop_index): Removed.
2264 (scop_set_region, scop_set_nb_params): New.
2265 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2266 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2267 (build_poly_scop): Use scop_set_nb_params.
2268 * sese.h (gimple_bb): Add LOOPS.
2269 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2271 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2273 Revert previous commit.
2275 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2277 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2278 (register_old_and_new_names): Update the content of the map.
2279 When there was already a rename_map_elt in the map at that
2281 (copy_bb_and_scalar_dependences): Do rename_variables after
2282 expand_scalar_variables.
2283 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2284 of the map. When there was already a rename_map_elt in the
2285 map at that location, free it.
2286 (translate_clast): Pass the rename_map. Do not initialize and free
2287 a rename_map per stmt_user.
2288 (gloog): Initialize and free one rename_map and pass it to
2291 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2293 Remove forgotten line in revert.
2295 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2297 Revert previous commit.
2299 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2301 * sese.c (register_old_and_new_names): Update the content
2302 of the map. When there was already a rename_map_elt in the
2303 map at that location, free it.
2304 (copy_bb_and_scalar_dependences): Do rename_variables after
2305 expand_scalar_variables.
2306 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2307 of the map. When there was already a rename_map_elt in the
2308 map at that location, free it.
2309 (translate_clast): Pass the rename_map. Do not initialize and free
2310 a rename_map per stmt_user.
2311 (gloog): Initialize and free one rename_map and pass it to
2314 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2316 * graphite-clast-to-gimple.c (translate_clast): context_loop
2319 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2320 Sebastian Pop <sebastian.pop@amd.com>
2322 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2323 of the use of ppl_Polyhedron_map_space_dimensions.
2325 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2326 Sebastian Pop <sebastian.pop@amd.com>
2328 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2329 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2330 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2331 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2332 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2333 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2334 pbb_nb_params): New.
2335 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2336 nb_loops_around_pbb): Adapt return types.
2338 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2340 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2341 graphite-clast-to-gimple.o, graphite-data-ref.o,
2342 graphite-scop-detection.o, graphite-poly.o): Add
2345 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2347 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2348 graphite-clast-to-gimple.o, graphite-data-ref.o,
2349 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2351 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2353 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2354 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2355 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2356 * testsuite/gcc.dg/graphite/block-0.c: Same.
2357 * testsuite/gcc.dg/graphite/block-1.c: Same.
2358 * testsuite/gcc.dg/graphite/block-2.c: Same.
2359 * testsuite/gcc.dg/graphite/block-3.c: Same.
2360 * testsuite/gcc.dg/graphite/block-4.c: Same.
2361 * testsuite/gcc.dg/graphite/block-5.c: Same.
2362 * testsuite/gcc.dg/graphite/block-6.c: Same.
2363 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2364 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2365 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2366 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2367 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2368 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2369 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2370 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2371 * opts.c: Remove -floop-block from -O2.
2372 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2373 -floop-strip-mine are used.
2375 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2376 Sebastian Pop <sebastian.pop@amd.com>
2378 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2380 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2381 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2382 strip_mine_profitable_p, is_interchange_valid,
2383 graphite_trans_bb_block, graphite_trans_loop_block,
2384 graphite_trans_scop_block): Temporary removed.
2385 (extend_scattering, unify_scattering_dimensions): New.
2386 (print_scattering_function, graphite_read_transforms):
2387 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2388 (graphite_generate_scattering_fns): Removed.
2389 (apply_poly_transforms): Cleanup.
2390 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2391 (schedule_to_scattering): Moved.
2392 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2393 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2394 (pbb_nb_scattering): New.
2395 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2396 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2398 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2400 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2401 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2402 -> PBB_TRANSFORMED_SCATTERING.
2403 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2404 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2405 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2406 (check_poly_representation): Do not return bool.
2407 (graphite_transform_loops): Reformat.
2408 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2410 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2412 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2413 debug_pbb_domain, debug_pbb, debug_scop): New.
2414 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2415 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2417 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2420 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2421 when the type precision of the induction variable should be
2422 larger than the type precision of nit.
2423 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2424 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2425 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2427 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2428 * testsuite/gcc.dg/graphite/pr39335.c: New.
2430 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2432 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2433 SSA_NAMES not struct reduction_info.
2435 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2437 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2439 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2440 Tobias Grosser <grosser@fim.uni-passau.de>
2442 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2443 (free_sese): Free SESE_REDUCTION_LIST.
2444 * sese.h (struct sese): Add field reduction_list.
2445 (SESE_REDUCTION_LIST): New.
2446 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2447 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2449 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2450 Tobias Grosser <grosser@fim.uni-passau.de>
2452 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2455 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2456 Tobias Grosser <grosser@fim.uni-passau.de>
2458 * tree-parloops.c (struct brli, build_reduction_list_info,
2459 analyze_reduction_list, gather_scalar_reductions): New.
2460 (loop_parallel_p): Build a reduction list containing only
2461 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2462 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2463 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2464 * tree-flow.h (gather_scalar_reductions): Declared.
2466 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2469 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2470 number_of_iterations_exit from a gcc_assert.
2472 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2473 Jan Sjodin <jan.sjodin@amd.com>
2475 * output.h (graphite_out_file, graphite_in_file): Declared.
2476 * toplev.c (graphite_out_file, graphite_in_file): New.
2477 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2478 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2479 Don't call schedule_to_scattering.
2480 * common.opt (fgraphite-write, fgraphite-read): New.
2481 * graphite-poly.c: Include output.h.
2482 (print_scattering_function, print_scattering_functions,
2483 debug_scattering_function, debug_scattering_functions,
2484 graphite_write_transforms, graphite_read_transforms,
2485 graphite_generate_scattering_fns): New.
2486 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2487 Call graphite_generate_scattering_fns, graphite_write_transforms,
2488 graphite_read_transforms.
2489 (new_poly_bb): Initialize PBB_SCATTERING.
2490 (free_poly_bb): Free PBB_SCATTERING.
2491 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2492 * graphite-poly.h (struct poly_bb): Add field scattering.
2493 (PBB_SCATTERING): New.
2494 (print_scattering_function, print_scattering_functions,
2495 debug_scattering_function, debug_scattering_functions): Declared.
2496 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2497 GMP values, not integers!
2498 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2499 ppl_read_polyhedron_matrix): New.
2500 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2501 debug_ppl_polyhedron_matrix,
2502 ppl_read_polyhedron_matrix): Declared.
2503 * Makefile.in (graphite-poly.o): Depends on output.h.
2505 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2506 Tobias Grosser <grosser@fim.uni-passau.de>
2509 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2510 scalar evolutions in the scop_entry->loop_father.
2512 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2513 Tobias Grosser <grosser@fim.uni-passau.de>
2515 * graphite.h (ref_nb_loops): Remove declaration.
2516 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2517 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2518 debug_gbb): Moved to sese.h.
2521 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2522 Tobias Grosser <grosser@fim.uni-passau.de>
2524 * graphite-data-ref.[ch]: Disable.
2526 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2527 Tobias Grosser <grosser@fim.uni-passau.de>
2529 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2530 scalar evolutions in the scop_entry->loop_father.
2532 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2534 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2535 (graphite_cannot_represent_loop_niter): Renamed
2536 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2537 (limit_scops): build_sese_loop_nests does not return a bool.
2538 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2539 * sese.c (nb_reductions_in_loop): ... from here.
2540 (graphite_loop_normal_form): ... from here.
2541 (sese_record_loop): Does not fail, so does not return a bool.
2542 (build_sese_loop_nests): Same.
2543 * sese.h (build_sese_loop_nests): Update declaration.
2544 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2545 (build_graphite_loop_normal_form): New.
2546 (gloog): Call build_graphite_loop_normal_form.
2547 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2548 build_sese_loop_nests.
2550 * testsuite/gcc.dg/graphite/id-1.c: New.
2552 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2553 Tobias Grosser <grosser@fim.uni-passau.de>
2555 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2556 The SCoP detection fix is sufficient.
2558 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2560 PR tree-optimization/39260
2561 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2562 the basic block contains a condition with a real type.
2563 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2565 * gcc.dg/graphite/pr39260.c: New.
2567 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2569 * graphite-poly.c: Inlcude params.h.
2570 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2572 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2573 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2575 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2576 Tobias Grosser <grosser@fim.uni-passau.de>
2578 * graphite-scop-detection.c (dot_all_scops_1,
2579 dot_all_scops): Moved here.
2580 * graphite-scop-detection.h (dot_all_scops): Declared here.
2581 * graphite.c (graphite_initialize, graphite_finalize): New.
2582 (graphite_transform_loops): Cleaned up.
2583 * sese.c (debug_oldivs): Moved here.
2584 * graphite-poly.c (graphite_apply_transformations): Renamed
2585 apply_poly_transforms.
2586 (debug_loop_vec): Moved here.
2587 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2588 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2589 find_scop_parameters, build_scop_iteration_domain,
2590 add_conditions_to_constraints, build_scop_canonical_schedules,
2591 build_scop_data_accesses): Now static.
2592 (build_poly_scop, check_poly_representation): New.
2594 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2596 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2597 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2598 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2599 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2600 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2601 scan_tree_for_params, struct irp_data, dx_record_params,
2602 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2603 build_loop_iteration_domains, add_conditions_to_domain,
2604 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2605 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2606 build_sese_conditions, add_conditions_to_constraints,
2607 build_scop_iteration_domain, build_access_matrix_with_af,
2608 build_access_matrix,
2609 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2611 * graphite-sese-to-poly.c: New.
2612 * graphite-sese-to-poly.h: New.
2614 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2616 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2618 * graphite.c: Split graphite code generation to a new file.
2619 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2620 max_precision_type, clast_to_gcc_expression_red,
2621 clast_to_gcc_expression, gcc_type_for_clast_expr,
2622 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2623 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2624 graphite_create_new_guard, clast_get_body_of_loop,
2625 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2626 graphite_create_new_loop, build_iv_mapping, copy_renames,
2627 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2628 compute_cloog_iv_types, free_scattering, save_var_name,
2629 initialize_cloog_names, build_scop_context, build_cloog_prog,
2630 set_cloog_options, debug_clast_stmt, scop_to_clast,
2631 print_generated_program, debug_generated_program,
2632 gloog): Moved to graphite-clast-to-gimple.c.
2634 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2636 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2637 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2638 loop_iv_stack_pop, loop_iv_stack_get_iv,
2639 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2640 free_loop_iv_stack, loop_iv_stack_remove_constants,
2641 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2642 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2643 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2644 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2645 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2646 get_vdef_before_sese, sese_adjust_vphi,
2647 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2648 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2649 is_iv, expand_scalar_variables_ssa_name,
2650 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2651 expand_scalar_variables, rename_variables, remove_condition,
2652 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2653 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2654 default_liveout_before_guard, add_guard_exit_phis,
2655 insert_guard_phis, register_old_and_new_names,
2656 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2657 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2658 if_region_set_false_region, create_if_region_on_edge,
2659 move_sese_in_condition): Moved to sese.c.
2661 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2662 if_region_exit, if_region_get_condition_block,
2663 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2664 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2665 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2666 ivtype_map_elt, new_ivtype_map_elt,
2667 recompute_all_dominators): Moved to sese.h.
2669 * graphite-clast-to-gimple.c: New.
2670 * graphite-clast-to-gimple.h: New.
2671 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2672 * sese.c: Modified as said above.
2675 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2677 * graphite.c: Split scop detection to a new file.
2678 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2679 move_sd_regions, loop_affine_expr, exclude_component_ref,
2680 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2681 graphite_cannot_represent_loop_niter, struct scopdet_info,
2682 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2683 find_single_entry_edge, find_single_exit_edge,
2684 create_single_entry_edge, sd_region_without_exit,
2685 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2686 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2687 Moved to graphite-scop-detection.c.
2689 * graphite-scop-detection.c: New.
2690 * graphite-scop-detection.h: New.
2691 * Makefile.in: Add new rule for graphite-scop-detection.o.
2693 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2694 tree-scalar-evolution.h.
2695 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2696 build_sese_loop_nests): Moved here from graphite.c.
2697 (param_index): Renamed parameter_index_in_region.
2699 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2700 Sebastian Pop <sebastian.pop@amd.com>
2702 * gcc.dg/graphite/block-0.c: Expected to fail now.
2703 * gcc.dg/graphite/block-1.c: Same.
2704 * gcc.dg/graphite/block-5.c: Same.
2705 * gcc.dg/graphite/block-6.c: Same.
2707 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2708 Sebastian Pop <sebastian.pop@amd.com>
2710 * graphite.h: Separate from graphite_bb_p the polyhedral
2711 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2712 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2713 graphite-data-ref.h.
2714 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2715 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2716 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2717 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2718 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2719 scop_nb_params): Moved to graphite-poly.h.
2720 * graphite-data-ref.c: Same.
2721 * graphite-data-ref.h: New.
2723 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2724 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2725 is_interchange_valid, graphite_trans_bb_block,
2726 graphite_trans_loop_block, scop_max_loop_depth,
2727 graphite_trans_scop_block, graphite_apply_transformations,
2728 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2730 * graphite-poly.h: New.
2731 * graphite-poly.c: New.
2732 * Makefile.in (OBJS-common): Add graphite-poly.o.
2733 (graphite-poly.o): New rule.
2734 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2737 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2738 Tobias Grosser <grosser@fim.uni-passau.de>
2740 * graphite.c: Replace gb -> gbb.
2742 * graphite-data-ref.c: Same.
2744 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2745 Tobias Grosser <grosser@fim.uni-passau.de>
2747 * Makefile.in (OBJS-commmon): Add sese.o.
2749 (graphite.o): Add sese.h.
2750 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2751 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2752 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2754 (block_before_scop): Add missing return.
2755 (new_scop, free_scop): Remove SESE data structures.
2756 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2757 find_scop_parameters, build_loop_iteration_domains,
2758 add_conditions_to_domain, register_scop_liveout_renames,
2759 copy_bb_and_scalar_dependences): Scop -> SESE.
2761 (add_conditions_to_domain): SCoP -> SESE and remove check
2762 (scop_contains_non_iv_scalar_phi_nodes): New.
2763 (build_scop_conditions_1, build_scop_conditions): Remove check for
2764 non iv scalar phi nodes.
2765 (print_scop_statistics): New.
2766 (graphite_transform_loops): Cleanup.
2768 * graphite.h: Move to sese & cleanup.
2772 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2773 Tobias Grosser <grosser@fim.uni-passau.de>
2775 * graphite.c (build_scop_conditions_1): Conditions are only
2776 at the end of a basic block.
2778 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2779 Tobias Grosser <grosser@fim.uni-passau>
2781 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2783 (GBB_ALPHA): Removed.
2785 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2786 Tobias Grosser <grosser@fim.uni-passau.de>
2788 * graphite-data-ref.c (graphite_test_dependence): Don't use
2789 GBB_DYNAMIC_SCHEDULE.
2790 * graphite.c (new_graphite_bb): Same.
2791 (free_graphite_bb): Same.
2792 (build_scop_dynamic_schedules): Removed.
2793 (graphite_transform_loops): Don't call it.
2794 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2795 (GBB_DYNAMIC_SCHEDULE): Removed.
2797 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2798 Tobias Grosser <grosser@fim.uni-passau.de>
2800 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2801 (print_graphite_bb): Same.
2802 (build_cloog_prog): Same.
2804 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2805 Tobias Grosser <grosser@fim.uni-passau.de>
2807 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2809 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2810 Tobias Grosser <grosser@fim.uni-passau.de>
2812 * graphite.c (build_scop_context): Don't use CloogMatrix.
2813 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2814 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2816 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2817 Tobias Grosser <grosser@fim.uni-passau.de>
2819 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2820 liveout_renames, add_params fields...
2821 (struct sese): ... here.
2822 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2823 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2825 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2826 Tobias Grosser <grosser@fim.uni-passau.de>
2828 * graphite.c (print_scop): Do not print the CLooG program.
2829 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2830 build_cloog_prog, gloog): Don't use SCOP_PROG.
2831 (find_transform): Renamed scop_to_clast.
2832 (print_generated_program, debug_generated_program): New.
2833 (graphite_transform_loops): Adapt to new interface.
2834 * graphite.h (struct scop): Remove program field.
2835 (SCOP_PROG): Removed.
2836 (print_generated_program, debug_generated_program): Declared.
2838 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2840 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2841 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2842 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2843 free_graphite_bb, build_scop_canonical_schedules,
2844 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2845 schedules are now represented using a ppl_Linear_Expression_t.
2846 * graphite.h (struct graphite_bb): Same.
2847 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2848 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2850 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2852 * graphite.c: Free local memory.
2853 * graphite-ppl.c: Same.
2855 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2857 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2858 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2859 swap_constraint_variables, scale_constraint_variable): Removed.
2860 (graphite_trans_bb_strip_mine): Remove pong.
2861 * graphite-ppl.c: Include missing header files.
2862 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2863 * graphite-ppl.h (ppl_strip_loop): Declared.
2864 * Makefile.in (graphite-ppl.o): Adjust dependences.
2866 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2869 (build_scop_iteration_domain): Same.
2871 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2873 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2875 (add_value_to_dim, scan_tree_for_params_right_scev,
2876 scan_tree_for_params_int): New.
2877 * graphite-ppl.c (oppose_constraint): New.
2878 (insert_constraint_into_matrix): Implement missing cases.
2879 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2881 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2883 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2884 use ppl_move_dimension.
2886 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2888 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2891 * graphite-ppl.c: Same.
2892 * graphite-ppl.h: Same.
2894 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2896 Revert last 3 commits.
2898 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2900 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2902 (add_value_to_dim, scan_tree_for_params_right_scev,
2903 scan_tree_for_params_int): New.
2904 * graphite-ppl.c (oppose_constraint): New.
2905 (insert_constraint_into_matrix): Implement missing cases.
2906 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2908 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2910 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2912 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2913 Tobias Grosser <grosser@fim.uni-passau.de>
2915 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2916 use ppl_move_dimension.
2917 * graphite-ppl.c (ppl_move_dimension): New.
2918 * graphite-ppl.h (ppl_move_dimension): Declared.
2920 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2922 * graphite.c: Do not include cloog/cloog.h.
2923 (print_graphite_bb): Remove ping pong, call PPL print function.
2925 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2927 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2928 (graphite.o): Add dependence on graphite-ppl.h.
2929 (graphite-ppl.o): New.
2930 (graphite-data-ref.c): Ping pong between PPL data structures
2932 * graphite-ppl.c: New.
2933 * graphite-ppl.h: New.
2934 * graphite.c: Include graphite-ppl.h.
2935 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2936 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2937 Ping pong between PPL data structures and matrices.
2938 (new_graphite_bb): Create a PPL constraint system.
2939 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2940 (build_loop_iteration_domains): Use PPL functions.
2941 * graphite.h: Include graphite-ppl.h. Fix comments.
2942 (graphite_bb): Use a ppl_Constraint_System_t instead of
2943 CloogMatrix for representing the domain.
2944 (scop): Remove static_schedule.
2945 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2947 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2949 * graphite.c: Fix some comments.
2951 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2954 * graphite.c (if_region_set_false_region): After moving a region
2955 in the false branch of a condition, remove the empty dummy
2957 (gloog): Remove wrong fix for PR38953.
2959 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2961 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2962 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2963 register_bb_in_sese, new_sese, free_sese): Moved.
2964 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2965 outermost_loop_in_scop, build_scop_iteration_domain,
2966 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2967 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2968 Use loop_in_sese_p instead of loop_in_scop_p.
2969 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2970 (free_scop): Do not free SCOP_BBS_B.
2971 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2972 ref_nb_loops): Moved here...
2973 * graphite.h (ref_nb_loops): ... from here.
2974 (struct scop): Remove bbs_b bitmap.
2975 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2976 * testsuite/gcc.dg/graphite/scop-19.c: New
2978 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2980 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2983 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2985 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2986 eq_loop_to_cloog_loop): Remove.
2987 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2988 * graphite.h (struct scop): Remove loop2cloog_loop.
2989 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2991 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2993 * opts.c (decode_options): Only add graphite options to O2
2994 if we compile with graphite enabled.
2996 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2998 * Merge from mainline (r143163:143684).
3000 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3002 * graphite.c (debug_value): Removed.
3003 * graphite.h (debug_value): Removed.
3005 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3007 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3008 after graphite: pass_copy_prop does not maintain a proper loop closed
3009 SSA form. pass_copy_prop should be fixed.
3011 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3013 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3015 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3017 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3018 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3019 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3022 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3024 * graphite.c (gloog): Return true when code gen succeeded.
3025 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3026 the code of the function did not changed. After cleanup_tree_cfg
3027 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3030 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3032 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3033 gimple_call_lhs is NULL.
3035 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3036 Tobias Grosser <tobi.grosser@amd.com>
3038 * graphite.c (graphite_trans_scop_block): Do not block single
3041 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3042 Tobias Grosser <tobi.grosser@amd.com>
3044 * graphite.c (build_scop_canonical_schedules): Start schedules at
3047 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3048 Tobias Grosser <tobi.grosser@amd.com>
3050 * graphite.c (compare_prefix_loops): New.
3051 (build_scop_canonical_schedules): Rewritten.
3052 (graphite_transform_loops): Move build_scop_canonical_schedules
3053 after build_scop_iteration_domain.
3055 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3056 Tobias Grosser <tobi.grosser@amd.com>
3058 * graphite.c (add_conditions_to_domain): Add the loops to
3059 the dimension of the iteration domain. Do copy the domain
3060 only when it exists.
3061 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3062 (add_conditions_to_constraints): New.
3063 (can_generate_code_stmt, can_generate_code): Removed.
3064 (gloog): Do not call can_generate_code.
3065 (graphite_transform_loops): Call add_conditions_to_constraints
3066 after building the iteration domain.
3068 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3069 Tobias Grosser <tobi.grosser@amd.com>
3070 Jan Sjodin <jan.sjodin@amd.com>
3072 * graphite.c (scan_tree_for_params): On substractions negate
3073 all the coefficients of the term.
3074 (clast_to_gcc_expression_red): New. Handle reduction expressions
3075 of more than two operands.
3076 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3077 (get_vdef_before_scop): Handle also the case of default definitions.
3079 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3082 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3083 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3084 (gloog): Do not call cleanup_tree_cfg.
3085 (graphite_transform_loops): Call cleanup_tree_cfg after all
3086 scops have been code generated.
3088 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3090 * passes.c (init_optimization_passes): Schedule after
3091 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3093 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3095 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3097 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3098 Set the type of an expression to the type of its assign statement.
3099 (expand_scalar_variables_expr): Do not pass loop_p.
3100 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3101 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3102 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3104 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3106 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3107 an expression to the gimple_expr_type of its assign statement.
3108 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3111 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3113 PR tree-optimization/38786
3114 * testsuite/gcc.dg/graphite/pr38786.c: New.
3115 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3116 the SSA_NAME case of expand_scalar_variables_expr.
3117 (expand_scalar_variables_expr): Also gather the scalar computation
3118 used to index the memory access.
3119 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3120 the gimple_stmt_iterator where it inserts new code.
3122 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3124 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3126 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3128 * opts.c (decode_options): Enable flag_graphite_identity and
3129 flag_loop_block in -O2 and above.
3131 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3133 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3134 Fix merge problem: replace with the file from trunk.
3136 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3138 * Merge from mainline (r141727:143163).
3140 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3141 Jan Sjodin <jan.sjodin@amd.com>
3143 PR tree-optimization/38559
3144 * testsuite/gcc.dg/graphite/pr38559.c: New.
3146 * graphite.c (debug_value, copy_constraint,
3147 swap_constraint_variables, scale_constraint_variable, ): New.
3148 (get_lower_bound, get_upper_bound): Removed.
3149 (graphite_trans_bb_strip_mine): Clean up this code that works
3150 only for constant number of iterations. Fully copy upper and
3151 lower bound constraints, not only the constant part of them.
3152 * graphite.h (debug_value): Declared.
3154 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3156 PR tree-optimization/38492
3157 PR tree-optimization/38498
3158 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3159 * tree-chrec.h (scev_is_linear_expression): Declared.
3160 * graphite.c (graphite_cannot_represent_loop_niter): New.
3161 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3162 (graphite_loop_normal_form): Use gcc_assert.
3163 (scan_tree_for_params): Use CASE_CONVERT.
3164 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3165 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3166 Use gcc_assert. Discard scops that contain unhandled cases.
3167 (build_scop_conditions): Return a boolean status for unhandled cases.
3168 (strip_mine_profitable_p): Print the loop number, not its depth.
3169 (is_interchange_valid): Pass the depth of the loop nest, don't
3170 recompute it wrongly.
3171 (graphite_trans_bb_block): Same.
3172 (graphite_trans_bb_block): Print tentative of loop blocking.
3173 (graphite_trans_scop_block): Do not print that the loop has been
3175 (graphite_transform_loops): Do not handle scops that contain condition
3178 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3180 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3181 * testsuite/gcc.dg/graphite/block-1.c: Same.
3182 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3184 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3185 * testsuite/gcc.dg/graphite/block-3.c: New.
3186 * testsuite/gcc.dg/graphite/pr38498.c: New.
3188 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3190 PR tree-optimization/38510
3191 * gcc.dg/graphite/pr38510.c: New.
3192 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3193 (translate_clast): Call recompute_all_dominators before
3195 (gloog): Call recompute_all_dominators before graphite_verify.
3197 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3199 PR tree-optimization/38492
3200 * graphite.c (rename_map_elt, debug_rename_elt,
3201 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3202 rename_map_elt_info, eq_rename_map_elts,
3203 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3204 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3205 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3206 (sese_build_livein_liveouts): New.
3207 (new_sese, free_sese): New.
3208 (new_scop): Call new_sese.
3209 (free_scop): Call free_sese.
3210 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3211 (register_old_new_names): Renamed register_old_and_new_names.
3212 (register_scop_liveout_renames, add_loop_exit_phis,
3213 insert_loop_close_phis, struct igp,
3214 default_liveout_before_guard, add_guard_exit_phis,
3215 insert_guard_phis, copy_renames): New.
3216 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3217 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3218 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3219 (scop_adjust_phis_for_liveouts): New.
3220 (gloog): Call scop_adjust_phis_for_liveouts.
3222 * graphite.h (struct sese): Documented. Added fields liveout,
3224 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3225 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3226 (struct scop): Added field liveout_renames.
3227 (SCOP_LIVEOUT_RENAMES): New.
3229 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3231 PR tree-optimization/38409
3232 * gcc.dg/graphite/pr38409.c: New.
3233 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3235 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3237 * graphite.c (gcc_type_for_cloog_iv): By default return
3239 (graphite_create_new_loop): Don't fold_convert the already
3240 fold_convert-ed expression.
3242 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3244 PR tree-optimization/38446
3245 * gcc.dg/graphite/pr38446.c: New.
3246 * graphite.c (register_bb_in_sese): New.
3247 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3248 looking at the bbs in the region.
3249 * graphite.h (sese): Add region_basic_blocks pointer set to
3250 structure and initialize at the time of defining new scop.
3252 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3254 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3255 (find_params_in_bb): Do not free data refs.
3256 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3258 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3260 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3261 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3262 * testsuite/gcc.dg/graphite/block-5.c: New.
3263 * testsuite/gcc.dg/graphite/block-6.c: New.
3264 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3265 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3266 * testsuite/gcc.dg/graphite/block-2.c: Same.
3268 * graphite.c (struct ivtype_map_elt): New.
3269 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3270 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3271 gcc_type_for_cloog_iv): New.
3272 (loop_iv_stack_patch_for_consts): Use the type of the induction
3273 variable from the original loop, except for the automatically
3274 generated loops, i.e., in the case of a strip-mined loop, in
3275 which case there is no original loop: in that case just use
3277 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3278 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3279 (clast_name_to_gcc): Accept params to be NULL.
3280 (clast_to_gcc_expression): Take an extra parameter for the type.
3281 Convert to that type all the expressions built by this function.
3282 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3283 (graphite_translate_clast_equation): Compute the type of the
3284 clast_equation before translating its LHS and RHS.
3285 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3286 (graphite_create_new_loop): Compute the type of the induction
3287 variable before translating the lower and upper bounds and before
3288 creating the induction variable.
3289 (rename_variables_from_edge, rename_phis_end_scop): New.
3290 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3291 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3292 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3293 compute_cloog_iv_types): New.
3294 (gloog): Call compute_cloog_iv_types before starting the
3295 translation of the clast.
3297 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3298 (GBB_CLOOG_IV_TYPES): New.
3299 (debug_ivtype_map): Declared.
3300 (oldiv_for_loop): New.
3302 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3305 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3306 (param_index): Assert if parameter is not know after parameter
3308 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3309 (find_scop_parameters): Mark, that we have finished parameter
3311 (graphite_transform_loops): Move condition detection before parameter
3313 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3314 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3316 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3318 * graphite.c (graphite_transform_loops): Always call find_transform ()
3319 in ENABLE_CHECKING. So we test these code paths, even if we do not
3322 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3324 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3325 (print_scop): Ditto.
3327 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3330 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3331 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3332 regions more than once.
3334 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3336 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3337 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3340 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3342 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3343 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3344 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3345 (max_precision_type): New.
3346 (value_clast): Removed.
3347 (clast_to_gcc_expression): Be more careful to types of expressions.
3348 Use max_precision_type and update use of gmp_cst_to_tree.
3349 (graphite_translate_clast_equation): Use max_precision_type.
3350 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3351 use the type of the condition.
3352 (graphite_create_new_loop): Do not use integer_type_node, use the
3353 max_precision_type of lb and ub.
3355 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3357 * graphite.c (build_scops_1): Initialize open_scop.exit
3360 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3362 * testsuite/gcc.dg/graphite/pr38084.c: New.
3363 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3364 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3365 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3366 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3367 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3369 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3370 Jan Sjodin <jan.sjodin@amd.com>
3371 Harsha Jagasia <harsha.jagasia@amd.com>
3383 * testsuite/gcc.dg/graphite/pr38073.c: New.
3384 * testsuite/gcc.dg/graphite/pr37928.c: New.
3385 * testsuite/gcc.dg/graphite/pr37883.c: New.
3386 * testsuite/gcc.dg/graphite/pr38125.c: New.
3387 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3388 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3389 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3391 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3392 the number of detected scops. Copy exact same test for loop
3394 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3395 loops to be blocked as reductions are not handled.
3396 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3398 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3399 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3401 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3402 * Makefile.in (graphite.o): Depend on value-prof.h.
3403 (graphite.o-warn): Removed -Wno-error.
3404 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3405 to be a NULL pointer. Call update_stmt. Return the newly created
3406 cannonical induction variable.
3408 * graphite.h (debug_rename_map): Declared. Fix some comments.
3410 * graphite.c: Reimplement the code generation from graphite to gimple.
3411 Include value-prof.h.
3412 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3413 (get_old_iv_from_ssa_name): Removed.
3414 (graphite_stmt_p): New.
3415 (new_graphite_bb): Test for useful statements before building a
3416 graphite statement for the basic block.
3417 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3418 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3420 (recompute_all_dominators, graphite_verify,
3421 nb_reductions_in_loop, graphite_loop_normal_form): New.
3422 (scop_record_loop): Call graphite_loop_normal_form.
3423 (build_scop_loop_nests): Iterate over all the blocks of the
3424 function instead of relying on the incomplete information from
3425 SCOP_BBS. Return the success of the operation.
3426 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3427 (add_bb_domains): Removed.
3428 (build_loop_iteration_domains): Don't call add_bb_domains.
3429 Add the iteration domain only to the basic blocks that have been
3430 translated to graphite.
3431 (build_scop_conditions_1): Add constraints only if the basic
3432 block have been translated to graphite.
3433 (build_scop_data_accesses): Completely disabled until data
3434 dependence is correctly implemented.
3435 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3436 (remove_all_edges_1, remove_all_edges): Removed.
3437 (get_new_name_from_old_name): New.
3438 (graphite_rename_variables_in_stmt): Renamed
3439 rename_variables_in_stmt. Call get_new_name_from_old_name.
3440 Use replace_exp and update_stmt.
3441 (is_old_iv): Renamed is_iv.
3442 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3443 Use replace_exp and update_stmt.
3444 (expand_scalar_variables_expr): Same. Use the map to get the
3445 new names for the renaming of induction variables and for the
3446 renaming of variables after a basic block has been copied.
3447 (expand_scalar_variables): Same.
3448 (graphite_rename_variables): Renamed rename_variables.
3449 (move_phi_nodes): Removed.
3450 (get_false_edge_from_guard_bb): New.
3451 (build_iv_mapping): Do not insert the induction variable of a
3452 loop in the renaming iv map if the basic block does not belong
3454 (register_old_new_names, graphite_copy_stmts_from_block,
3455 copy_bb_and_scalar_dependences): New.
3456 (translate_clast): Heavily reimplemented: copy basic blocks,
3457 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3458 At each translation step call graphite_verify ensuring the
3459 consistency of the SSA, loops and dominators information.
3460 (collect_virtual_phis, find_vdef_for_var_in_bb,
3461 find_vdef_for_var_1, find_vdef_for_var,
3462 patch_phis_for_virtual_defs): Removed huge hack.
3463 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3464 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3465 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3466 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3467 if_region_get_condition_block, if_region_set_false_region,
3468 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3469 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3470 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3471 rewrite_into_sese_closed_ssa): New.
3472 (gloog): Remove dead code. Early return if code cannot be
3473 generated. Call cleanup_tree_cfg once the scop has been code
3475 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3476 block loops with less than two loops.
3477 (graphite_apply_transformations): Remove the call to
3478 scop_remove_ignoreable_gbbs.
3479 (limit_scops): When build_scop_loop_nests fails, continue on
3480 the next scop. Fix open_scop.entry.
3481 (graphite_transform_loops): Call recompute_all_dominators: force the
3482 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3483 Call initialize_original_copy_tables and free_original_copy_tables
3484 to be able to copy basic blocks during code generation.
3485 When build_scop_loop_nests fails, continue on next scop.
3486 (value_clast): New union.
3487 (clast_to_gcc_expression): Fix type cast warning.
3489 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3491 * Merge from mainline (r140838:141727).
3493 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3497 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3499 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3503 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3504 exits and conditions.
3505 * testsuite/gcc.dg/graphite/pr37943.c: New.
3507 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3510 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3512 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3514 * doc/invoke.texi: Fix spaces.
3516 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3518 PR tree-optimization/37891
3519 Reverted last commit.
3520 * graphite.c (create_single_entry_edge): Set
3521 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3523 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3524 Mitul Thakkar <mitul.thakkar@amd.com>
3526 * graphite.c (create_single_entry_edge): Set
3527 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3529 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3531 * doc/invoke.texi: Add -fgraphite-identity.
3532 * graphite.c (graphite_apply_transformations): Check for
3533 -fgraphite-identity.
3534 * toplev.c (process_options): Add flag_graphite_identity.
3535 * tree-ssa-loop.c: Add flag_graphite_identity.
3537 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3539 Undo changes from 2008-10-02:
3540 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3541 operand type when copying the operand to a variable of different type.
3542 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3543 with the IV name after increment.
3545 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3546 Harsha Jagasia <harsha.jagasia@amd.com>
3548 PR tree-optimization/37828
3549 * testsuite/gcc.dg/graphite/pr37828.c: New.
3550 * graphite.c (graphite_trans_loop_block): Do not loop block
3551 single nested loops.
3553 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3554 Sebastian Pop <sebastian.pop@amd.com>
3556 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3557 rename_map_elt_info, eq_rename_map_elts): New.
3558 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3559 (expand_scalar_variables_expr): Change parameters.
3560 (expand_scalar_variables_stmt): Same.
3561 (expand_scalar_variables): Same.
3562 (graphite_rename_ivs): Rename graphite_rename_variables.
3563 (build_iv_mapping): New.
3564 (translate_clast): Call build_iv_mapping.
3565 * graphite.h (gbb_p): New name.
3567 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3569 PR tree-optimization/37684
3570 * gcc.dg/graphite/pr37684.c: New.
3571 * graphite.c (exclude_component_ref): New.
3572 (is_simple_operand): Call exclude_component_ref.
3574 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3575 Harsha Jagasia <harsha.jagasia@amd.com>
3577 PR tree-optimization/37485
3578 * gcc.dg/graphite/block-2.c: New
3579 * graphite.c (gmp_cst_to_tree): Moved.
3580 (iv_stack_entry_is_constant): New.
3581 (iv_stack_entry_is_iv): New.
3582 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3583 (loop_iv_stack_insert_constant): New.
3584 (loop_iv_stack_pop): Use new datatpype.
3585 (loop_iv_stack_get_iv): Same.
3586 (loop_iv_stack_get_iv_from_name): Same.
3587 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3588 (loop_iv_stack_patch_for_consts): New.
3589 (loop_iv_stack_remove_constants): New.
3590 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3591 (translate_clast): Call loop_iv_stack_patch_for_consts and
3592 loop_iv_stack_remove_constants.
3593 (gloog): Use new datatype. Redirect construction edge to end
3594 block to avoid accidental deletion.
3595 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3597 (union iv_stack_entry_data): New. Data in iv stack entry.
3598 (struct iv_stack_entry): New. Datatype for iv stack entries.
3600 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3602 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3603 operand type when copying the operand to a variable of different type.
3605 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3607 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3608 with the IV name after increment.
3610 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3612 * Merge from mainline (r140164:140838).
3614 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3616 * graphite-data-ref.c: New.
3617 * graphite.c (print_scop): Also dump the dependence graph.
3618 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3619 (new_scop): Initialize SCOP_DEP_GRAPH.
3620 (build_scop_dynamic_schedules): New.
3621 (build_access_matrix_with_af): Fixed column numbering.
3622 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3623 * graphite.h: Add ifndef/define guards against multiple inclusion.
3624 (struct scop): Add dep_graph field.
3625 (SCOP_DEP_GRAPH): Defined.
3626 (ref_nb_loops): Fixed and moved to other position.
3627 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3628 (nb_loops_around_loop_in_scop): New.
3629 (graphite_dump_dependence_graph): Declared.
3630 (graphite_build_rdg_all_levels): Declared.
3631 (graphite_test_dependence): Declared.
3632 * Makefile.in (graphite-data-ref.o): New target.
3634 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3636 * Merge from mainline (139870:140164).
3638 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3640 * Merge from mainline (138275:139870).
3641 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3642 the commits from trunk broke the niter detection.
3644 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3646 * graphite.c: Add more documentation. Fix formatting.
3647 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3648 loop_iv_stack_debug): Moved...
3649 (schedule_to_scattering): Move before use.
3650 (dot_all_scops): Include in "#if 0" the code for system
3653 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3654 loop_iv_stack_debug): ...here.
3656 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3658 * tree-phinodes.c (make_phi_node): Extern.
3659 (add_phi_node_to_bb): New.
3660 (create_phi_node): Call add_phi_node_to_bb.
3661 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3662 (remove_statement): Handle case where stored phi was updated
3663 and is no longer the same.
3664 * graphite.c (is_parameter): New.
3666 (expand_scalar_variables_expr): New.
3667 (expand_scalar_variables_stmt): New.
3668 (expand_scalar_variables): New.
3669 (move_phi_nodes): Create new phi instead of moving old one.
3670 (translate_clast): Call expand_scalar_variables.
3671 (find_vdef_for_var_in_bb): Also scan regular definitions.
3672 (skip_phi_defs): New.
3673 (collect_scop_exit_phi_args): New.
3674 (patch_scop_exit_phi_args): New.
3675 (gloog): Patch phis after scop.
3676 * tree-flow.h: (add_phi_node_to_bb): Declared.
3677 (make_phi_node): Declared.
3679 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3681 * graphite.c (end_scop): Split the entry of the scop when it
3682 is the header of the loop in which the scop is ending.
3683 (build_scops_1, limit_scops): Update uses of end_scop.
3685 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3687 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3688 SCOP_ENTRY or SCOP_EXIT.
3690 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3692 * graphite.c (get_construction_edge): Removed.
3693 (gloog): Construction edge is the scop entry edge.
3695 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3697 * graphite.c (can_generate_for_scop): Removed.
3698 (gloog): Do not call it.
3700 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3702 * graphite.c (new_scop): Entry of a scop is an edge.
3703 Initialize SESE region.
3704 (free_scop): Free SESE region.
3705 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3706 (split_difficult_bb): New, split from end_scop.
3707 (end_scop): Exit of a scop is an edge.
3708 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3709 not automatically updated and thus is always wrong.
3710 * graphite.h (struct sese): New.
3713 (struct scop): New field for a SESE region. Remove entry, exit.
3714 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3715 semantics as before. Moved comment around.
3717 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3718 Sebastian Pop <sebastian.pop@amd.com>
3720 * graphite.c (graphite_transform_loops): Always enable gloog
3721 and find_transform when ENABLE_CHECKING.
3723 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3725 * graphite.c (graphite_transform_loops): Move pretty printer
3726 of SCOPs before doing any transform. Remove call to print_scops
3727 and dot_all_scops_1.
3729 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3731 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3732 (print_graphite_bb): Same.
3734 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3736 * graphite.c (dot_all_scops_1): Cleanup.
3737 (move_scops): Fix comment.
3739 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3741 * graphite.c (build_scop_bbs): Revert commit 139355:
3743 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3744 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3746 * graphite.c (build_scop_bbs): Factor up code.
3748 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3750 * graphite.c (gloog): Update dominator info.
3752 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3754 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3756 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3758 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3760 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3761 (translate_clast): Correct formatting.
3762 * graphite.h (struct num_map): Removed.
3763 (struct graphite_bb): Remove num_map field.
3764 (GBB_INDEX_TO_NUM_MAP): Removed.
3766 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3768 * graphite.c (build_access_matrix_with_af): Fix comments.
3769 (build_scop_data_accesses): Same.
3771 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3773 * graphite.c (build_scop_data_accesses): Don't construct
3774 access matrices. Add a FIXME and an assert condition that
3775 should pass when the access matrices will be needed.
3777 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3779 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3781 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3782 Moved close by free_graphite_bb.
3783 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3784 (new_scop): Move close by free_scop.
3785 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3787 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3789 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3790 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3791 instead of recursive call.
3792 (graphite_translate_clast_equation): New.
3793 (graphite_create_guard_cond_expr): New.
3794 (graphite_create_new_guard): New.
3795 (get_stack_index_from_iv): Removed.
3796 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3797 (get_true_edge_from_guard_bb): New.
3798 (translate_clast): Handle stmt_guard in clast.
3799 (get_construction_edge): Allow construction edge detection for
3800 a scope entry with multiple predecessors if one predecessor is
3801 the immediate dominator of scope entry.
3802 (can_generate_code_stmt): Enable code generation for clast_guard.
3803 (gloog): Use correct context loop. Removed check for post dominators.
3804 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3806 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3808 * graphite.c (remove_dead_loops): Document better which
3811 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3813 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3815 (graphite.o): Also depends on pointer-set.h.
3817 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3819 * graphite.c (scop_record_loop): Fix compile warning.
3821 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3822 Sebastian Pop <sebastian.pop@amd.com>
3824 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3826 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3828 * graphite.c (build_graphite_bb): Initialize bb->aux to
3829 point to the graphite_bb_p.
3830 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3832 (add_bb_domains): Does not use the scop parameter.
3833 (graphite_transform_loops): Clean bb->aux at the end.
3835 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3836 Sebastian Pop <sebastian.pop@amd.com>
3838 * testsuite/lib/target-supports.exp
3839 (check_effective_target_fgraphite): New.
3841 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3842 check_effective_target_fgraphite returns false.
3843 Set dg-do-what-default to compile.
3844 (scan-graphite-dump-times): Removed.
3845 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3847 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3848 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3849 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3850 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3851 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3852 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3853 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3854 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3855 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3856 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3857 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3858 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3859 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3860 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3861 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3862 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3863 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3864 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3865 * testsuite/gcc.dg/graphite/block-0.c: Same.
3866 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3867 * testsuite/gcc.dg/graphite/block-1.c: Same.
3868 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3869 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3870 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3871 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3872 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3874 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3876 * graphite.c: Fix some XXX comments.
3877 (build_scop_dynamic_schedules): Removed.
3879 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3881 * graphite.h (scop_max_loop_depth): Moved...
3882 * graphite.c (scop_max_loop_depth): ...here.
3883 (remove_all_edges_1): New.
3884 (remove_all_edges): Factored code.
3885 (remove_cond_exprs): Check only the last statement for
3886 a GIMPLE_COND expression.
3888 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3890 * graphite.c (scan_tree_for_params): Early return when the
3891 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3892 (find_scop_parameters): Factor out code.
3893 (graphite_trans_bb_strip_mine): Remove dead code.
3895 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>