1 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-sese-to-poly.c (build_alias_set_optimal_p): Initialize
4 all_components_are_cliques to 1.
6 2009-10-20 Li Feng <nemokingdom@gmail.com>
8 * graphite-sese-to-poly.c (free_data_refs_aux): Update to free
10 (pdr_add_alias_set): Update retrieving alias_set_num.
11 (build_poly_dr): Update retrieving dr_base_object_set.
12 (partition_drs_to_sets): Remove.
13 (build_alias_set_optimal_p): New.
14 (build_alias_set_for_drs): Rename.
15 (build_scop_drs): Update.
16 * graphite-sese-to-poly.h (struct base_alias_pair): New.
17 (ALIAS_SET_INDEX): Remove.
18 (BASE_OBJECT_SET_INDEX): Remove.
20 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
22 * sese.c (get_vdef_before_sese): Handle GIMPLE_ASSIGN and GIMPLE_CALL.
24 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
26 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Do not infer
27 loop upper bounds for 1-element arrays at end of structures.
28 * tree-flow.h (array_at_struct_end_p): Declared.
29 * tree-ssa-loop-niter.c (array_at_struct_end_p): Not static anymore.
31 2009-10-20 Sebastian Pop <sebastian.pop@amd.com>
33 * g++.dg/graphite/pr41305.C: New.
35 2009-10-20 Alexander Monakov <amonakov@ispras.ru>
37 * graphite-sese-to-poly.c (build_loop_iteration_domains): Generalize
38 construction of parameter constraints from loop iteration analysis.
39 * gcc.dg/graphite/run-id-2.c: New test.
41 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
43 * graphite-interchange.c (memory_stride_in_loop): Delete p1, lma
46 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
48 * graphite-dependences.c (dependence_polyhedron_1): Remove
49 unused gdim dimensions from the DDR polyhedron.
51 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
53 * graphite-dependences.c (pddr_transformed_scattering): New.
54 (dot_original_deps_stmt_1): New.
55 (dot_transformed_deps_stmt_1): New.
56 (dot_deps_stmt_1): Call dot_original_deps_stmt_1 and
57 dot_transformed_deps_stmt_1.
58 (dot_original_deps): New.
59 (dot_transformed_deps): New.
60 (dot_deps_1): Call dot_original_deps and dot_transformed_deps.
62 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
64 * graphite-dependences.c (reduction_dr_1): Remove wrong
65 assert: reduction BBs can have multiple reduction writes
66 to memory. interchange-3.f90 is an example.
68 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
70 * gfortran.dg/graphite/interchange-3.f90: New.
72 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
74 * gcc.dg/graphite/interchange-1.c: Un-XFAILed.
76 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
78 * graphite-dependences.c (dependence_polyhedron_1): Add the
79 context to the dependence polyhedron.
81 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
83 * graphite-poly.c (pbb_remove_duplicate_pdrs): Initialize
84 PBB_PDR_DUPLICATES_REMOVED.
87 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
89 * graphite-sese-to-poly.c (find_scop_parameters): Initialize
91 (build_loop_iteration_domains): Extract bounds on parameters
92 based on the data size.
93 (build_scop_context): Do not initialize SCOP_CONTEXT;
96 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
98 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
99 * graphite-ppl.h (graphite-ppl.h): Declared.
101 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
103 * graphite-ppl.c (ppl_print_linear_expr): New.
104 (debug_ppl_linear_expr): New.
105 * graphite-ppl.h (ppl_print_linear_expr): Declared.
106 (debug_ppl_linear_expr): Declared.
108 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
110 * graphite-interchange.c: Fix comments.
111 * gcc.dg/graphite/block-1.c: Fix comments.
113 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
115 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
116 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
118 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
120 Reapply the patch from Alexander Monakov that disappeared during
121 the last merges from trunk.
123 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
125 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
126 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
128 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
130 * graphite-interchange.c (memory_stride_in_loop): The depth
131 argument corresponds to a dynamic time dimension, so use
132 psct_dynamic_dim to refer to the transformed scattering dimension.
134 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
136 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
138 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
140 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
142 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
144 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
146 (print_lst): Print the root of LST in a different format.
147 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
149 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
153 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
155 * doc/passes.texi: Document the Graphite infrastructure.
157 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
159 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
160 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
161 and check the SSA representation.
163 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
165 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
167 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
169 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
171 * gcc.dg/graphite/interchange-11.c: New.
173 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
175 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
177 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
179 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
180 Add -fno-loop-strip-mine and -fno-loop-interchange.
181 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
182 -fno-loop-strip-mine.
183 * gfortran.dg/graphite/graphite.exp: Same.
185 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
187 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
188 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
189 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
190 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
191 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
192 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
193 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
194 DEFAULT_FLAGS_GRAPHITE_SCOP.
195 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
196 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
198 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
200 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
202 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
203 Sebastian Pop <sebastian.pop@amd.com>
205 * graphite-interchange.c (build_linearized_memory_access): Pass an
207 (memory_stride_in_loop): Include transform scattering in the
208 access functions to be able to querry the strides in the
210 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
211 not the psct_iterator_dim.
213 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
215 * graphite-blocking.c (pbb_do_strip_mine): Removed.
216 (lst_do_strip_mine_loop): New.
217 (lst_do_strip_mine): New.
218 (scop_do_strip_mine): Call lst_do_strip_mine.
219 * graphite-poly.h (lst_add_loop_under_loop): New.
220 (lst_find_first_pbb): New.
222 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
224 * graphite-poly.c (loop_to_lst): Fix LST creation.
226 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
228 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
229 sizeof(unsigned long) to make it run on 32bit systems.
231 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
233 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
236 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
238 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
240 (write_alias_graph_to_ascii_dot): New.
241 (write_alias_graph_to_ascii_ecc): Ditto.
242 (partition_drs_to_sets): Add testing of optimality of current method
243 which assigns alias numbers according to DFS Comopnent number. used
244 as heuristic for the upcoming ECC algorithm.
245 (build_scop_drs): Write to file also with the ecc and dot format.
247 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
249 * gfortran.dg/graphite/interchange-1.f: XFail.
251 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
253 * graphite.c (graphite_initialize): Do not handle functions with
254 more than 100 basic blocks.
256 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
258 * graphite-blocking.c (pbb_do_strip_mine): Use
259 PARAM_LOOP_BLOCK_TILE_SIZE.
261 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
263 * graphite-poly.c (dot_lst_1): New.
265 * graphite-poly.h (dot_lst): Declared.
267 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
269 * graphite-dependences.c (dot_deps_stmt_1): New.
270 (dot_deps_stmt): New.
271 * graphite-dependences.h (dot_deps_stmt): Declared.
273 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
275 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
276 not replace cross BB scalar dependences ending on PHI nodes.
277 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
279 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
281 * graphite-poly.c (apply_poly_transforms): Implement the high
282 level driver for flag_loop_block.
283 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
286 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
288 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
291 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
293 * graphite-poly.h (lst_find_pbb): New.
294 (find_lst_loop): New.
296 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
298 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
299 * graphite-poly.h (struct scop): Remove dep_graph field.
300 (SCOP_DEP_GRAPH): Removed.
302 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
304 * graphite-poly.h (copy_lst): Do full copy of LST.
306 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
308 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
309 when the loop stride is zero.
311 * gcc.dg/graphite/id-16.c: New.
313 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
315 * graphite-dependences.c (reduction_dr_1): New.
316 (reduction_dr_p): New.
317 (graphite_legal_transform_dr): Call reduction_dr_p.
318 (reduction_ddr): Renamed reduction_ddr_p.
319 * graphite-poly.h (same_pdr_p): New.
320 (number_of_write_pdrs): New.
321 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
322 (split_reduction_stmt): Do not split reduction statements
323 when there are no writes to memory.
324 (translate_scalar_reduction_to_array_for_stmt): Insert the
325 memory reduction statement just after the scalar reduction statement.
327 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
329 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
330 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
332 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
334 * graphite-interchange.c (lst_apply_interchange): New.
335 (lst_interchange_profitable_p): New.
336 (lst_try_interchange_loops): New.
337 (lst_try_interchange): New.
338 (lst_do_interchange): New.
339 (pbb_do_interchange): Removed.
340 (scop_do_interchange): Call lst_do_interchange.
342 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
344 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
345 SCOP_TRANSFORMED_SCHEDULE.
350 * graphite-poly.h (lst_p): New.
353 (LST_LOOP_FATHER): New.
356 (scop_to_lst): Declared.
357 (print_lst): Declared.
358 (debug_lst): Declared.
363 (lst_dewey_number): New.
364 (struct scop): Add original_schedule and transformed_schedule fields.
365 (SCOP_ORIGINAL_SCHEDULE): New.
366 (SCOP_TRANSFORMED_SCHEDULE): New.
367 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
369 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
371 * graphite-dependences.c (reduction_ddr): New.
372 (graphite_legal_transform_bb): Call reduction_ddr.
373 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
374 Initialize PBB_IS_REDUCTION.
375 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
376 (PBB_IS_REDUCTION): New.
377 (new_poly_bb): Update declaration.
378 * graphite-scop-detection.h (build_scop_bbs): Removed.
379 (nb_reductions_in_loop): Removed.
380 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
381 parameter for reductions.
382 (try_generate_gimple_bb): Update call to new_poly_bb.
383 (build_scop_bbs_1): Same.
384 (build_scop_bbs): Same.
385 (gsi_for_phi_node): New.
386 (scalar_close_phi_node_p): Remove gcc_assert.
387 (split_reduction_stmt): New.
388 (is_reduction_operation_p): New.
389 (phi_contains_arg): New.
390 (follow_ssa_with_commutative_ops): New.
391 (detect_commutative_reduction_arg): New.
392 (detect_commutative_reduction_assign): New.
393 (follow_inital_value_to_phi): New.
394 (edge_initial_value_for_loop_phi): New.
395 (initial_value_for_loop_phi): New.
396 (detect_commutative_reduction): New.
397 (translate_scalar_reduction_to_array_for_stmt): New.
398 (insert_copyout): New.
399 (insert_copyin): New.
400 (translate_scalar_reduction_to_array): New.
401 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
402 (rewrite_commutative_reductions_out_of_ssa_loop): New.
403 (rewrite_commutative_reductions_out_of_ssa): New.
404 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
405 * sese.h (split_region_for_bb): New.
407 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
408 * gcc.dg/graphite/interchange-1.c: Fix format.
409 * gcc.dg/graphite/interchange-10.c: New.
411 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
413 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
416 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
418 * graphite-sese-to-poly.c (scev_analyzable_p): New.
419 (rewrite_cross_bb_scalar_dependence): New.
420 (rewrite_cross_bb_scalar_deps): New.
421 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
422 Call rewrite_cross_bb_scalar_deps.
424 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
426 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
427 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
430 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
432 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
433 * graphite-interchange.c (pbb_do_interchange): Same.
434 * graphite-poly.c (print_scattering_function): Same.
436 * graphite-poly.h (pbb_loop): New.
437 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
439 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
441 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
443 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
445 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
446 so don't pass a pointer to it.
447 (build_alias_set_for_drs): Same.
448 (build_base_obj_set_for_drs): Same.
449 (build_scop_drs): Same.
451 2009-09-26 Li Feng <nemokingdom@gmail.com>
453 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
454 the alias graph of data references.
456 2009-09-25 Li Feng <nemokingdom@gmail.com>
458 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
459 (build_scop_drs): When debugging, write the alias graph to file,
460 otherwise, should be disabled.
462 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
464 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
465 (is_simple_operand): Remove call to stmt_simple_memref_p.
466 (stmt_simple_for_scop_p): Update call to is_simple_operand.
468 2009-09-17 David Edelsohn <edelsohn@gnu.org>
470 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
471 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
472 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
473 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
474 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
476 2009-09-17 Li Feng <nemokingdom@gmail.com>
479 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
480 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
481 (graphite_carried_dependence_level_k): Ditto.
482 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
483 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
484 (new_poly_dr): Adjust declaration.
485 * graphite-sese-to-poly.c (free_data_refs_aux): New.
486 (free_gimple_bb): Added free_data_refs_aux.
487 (build_poly_dr): Add dr_base_object_set.
488 (partition_drs_to_sets): New.
489 (dr_same_base_object_p): New.
490 (build_alias_set_for_drs): New.
491 (build_base_object_set_for_drs): New.
492 (build_scop_drs): Add build_base_obj_set_for_drs.
493 * graphite-sese-to-poly.h: Added #define for alias set number index and
494 base object set index.
495 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
496 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
498 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
500 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
501 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
503 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
505 * graphite-sese-to-poly.c (struct irp_data): Removed.
506 (idx_record_params): Removed.
507 (find_params_in_bb): Scan for parameters the access functions; don't
508 parse the tree representation.
510 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
512 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
513 passes at -O1 and below.
515 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
517 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
518 tree-scalar-evolution.h, and then tree-data-ref.h.
519 * graphite-clast-to-gimple.c: Same.
520 * graphite-dependences.c: Same.
521 * graphite-interchange.c: Same.
522 * graphite-poly.c: Same.
523 * graphite-scop-detection.c: Same.
524 * graphite-sese-to-poly.c: Same.
526 * lambda-code.c: Same.
527 * matrix-reorg.c: Same.
528 * tree-data-ref.c: Same.
529 * tree-if-conv.c: Same.
530 * tree-loop-distribu: Same.: Same.
531 * tree-loop-linear.c: Same.
532 * tree-parloops.c: Same.
533 * tree-predcom.c: Same.
534 * tree-vect-patterns.c: Same.
536 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
538 Partially revert the previous patch, except the following.
539 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
540 as parameters the operands of the not expression.
542 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
544 * tree-scalar-evolution.c (instantiate_scev_assign): New.
545 Do not call analyze_scalar_evolution on assignments.
546 (instantiate_scev_phi): Call analyze_scalar_evolution.
547 (instantiate_scev_name): Call instantiate_scev_assign and
548 instantiate_scev_phi.
549 (instantiate_scev_not): Adapted to pass as parameters the operands
550 of the not expression.
552 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
554 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
555 to pass as parameters the operands of the binary expression.
557 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
559 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
560 instantiate_scev_not. Handle NEGATE_EXPR.
561 (instantiate_scev_r): Handle NEGATE_EXPR.
563 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
565 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
567 (instantiate_scev_r): Move code in instantiate_scev_2
568 and instantiate_scev_1.
570 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
572 * tree-scalar-evolution.c (instantiate_scev_3): New.
573 (instantiate_scev_1): Move code in instantiate_scev_3.
575 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
577 * tree-scalar-evolution.c (instantiate_scev_poly): New.
578 (instantiate_scev_1): Move code in instantiate_scev_poly.
580 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
582 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
583 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
585 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
587 * tree-scalar-evolution.c (instantiate_scev_convert): New.
588 (instantiate_scev_1): Move code in instantiate_scev_convert.
590 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
592 * tree-scalar-evolution.c (instantiate_scev_binary): New.
593 (instantiate_scev_1): Move code in instantiate_scev_binary.
595 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
597 * tree-scalar-evolution.c (instantiate_scev_name): New.
598 (instantiate_scev_1): Move code in instantiate_scev_name.
600 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
602 * Merge from mainline (150992:151171).
604 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
606 * graphite-dependences.c (graphite_legal_transform_bb): Call
607 pbb_remove_duplicate_pdrs.
608 * graphite-poly.c (can_collapse_pdr): Removed.
609 (pdr_find_duplicate): Removed.
610 (can_collapse_pdrs): New.
611 (pbb_remove_duplicate_pdrs): New.
612 (new_poly_dr): Do not look for duplicates.
613 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
614 (PBB_PDR_DUPLICATES_REMOVED): New.
615 (pbb_remove_duplicate_pdrs): Declared.
617 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
619 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
620 the strides by multiplying by PDR_NB_REFS.
621 * graphite-poly.c (can_collapse_pdr): New.
622 (pdr_find_duplicate): New.
623 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
624 Initialize PDR_NB_REFS.
625 * graphite-poly.h (struct poly_dr): Add field nb_refs.
627 (new_poly_dr): Number of subscripts is a graphite_dim_t.
629 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
631 Revert one of the previous commits:
632 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
633 the computation of symmetric data dependence relations.
634 (dependency_between_pbbs_p): Same.
636 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
639 * graphite-poly.c (apply_poly_transforms): Remove legality test before
642 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
644 * graphite-dependences.c (pddr_original_scattering): Return NULL
645 for read-read dependence relations.
646 * graphite-poly.h (enum poly_dr_type): Fix comment.
649 (pdr_may_write_p): New.
651 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
653 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
654 (struct poly_dr): Same.
656 * graphite-poly.c (new_poly_dr): Same.
658 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
659 Sebastian Pop <sebastian.pop@amd.com>
661 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
662 pbb_strip_mine_time_depth. Changed the implementation so that
663 transformation is expressed as a transformation on
664 time (scatttering) dimensions. Also, ensures that the 2d+1
665 scheduling format is preserved.
666 (pbb_strip_mine_profitable_p): Profitability is based on the
667 iteration number of a given time (scattering) dimension,
668 and not on a original loop depth dimension.
669 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
670 (pbb_do_strip_mine): Call psct_dynamic_dim.
671 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
672 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
673 (pbb_nb_dynamic_scattering_transform): New.
674 (psct_dynamic_dim): New.
676 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
678 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
679 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
680 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
681 * graphite-interchange.c (build_linearized_memory_access): Same.
682 (memory_stride_in_loop): Same.
684 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
686 * graphite-dependences.c (pddr_original_scattering): New.
687 (graphite_legal_transform_dr): Call pddr_original_scattering.
690 * graphite-dependences.h (dot_deps): Declared.
691 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
692 (print_pdr): Print PDR_ID.
693 * graphite-poly.h (struct poly_dr): Add field id.
696 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
698 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
700 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
701 not delete the original dependence relation.
703 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
705 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
706 the computation of symmetric data dependence relations.
707 (dependency_between_pbbs_p): Same.
709 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
711 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
712 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
713 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
714 (free_poly_ddr): New.
715 (pddr_is_empty): New.
716 (dependence_polyhedron_1): Now returns a poly_ddr_p.
717 (dependence_polyhedron): Same. Remove useless gcc_assert.
719 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
720 (graphite_carried_dependence_level_k): Call pddr_is_empty.
721 * graphite-dependences.h (enum poly_dependence_kind): New.
722 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
723 (PDRP_SOURCE): Renamed PDDR_SOURCE.
724 (PDRP_SINK): Renamed PDDR_SINK.
725 (PDRP_DDP): Renamed PDDR_DDP.
727 (free_poly_ddr): Declared.
728 * graphite-poly.c (new_scop): Use the new hash function names.
729 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
731 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
733 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
735 * Merge from mainline (150764:150992).
737 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
739 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
740 bounds with LT_EXPR to make niter analysis more precise on code
741 generated by Graphite.
743 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
745 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
746 (graphite_legal_transform_bb): Same.
747 (poly_drs_may_alias_p): Same.
749 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
752 * graphite-ppl.c (ppl_max_for_le): Correct the use of
753 ppl_Pointset_Powerset_C_Polyhedron_maximize.
755 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
757 * graphite-poly.c (print_pbb): Print PBB index.
759 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
761 * Merge from mainline (r150672:150764).
763 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
765 * graphite-interchange.c (ppl_max_for_le): Moved...
766 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
767 * graphite-ppl.c (ppl_max_for_le): ... here.
768 * graphite-ppl.h (ppl_max_for_le): Declared.
770 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
772 * Merge from mainline (r150372:150672).
774 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
777 * sese.c (convert_for_phi_arg): New.
778 (add_guard_exit_phis): Use convert_for_phi_arg.
780 * testsuite/gfortran.dg/graphite/id-17.f: New.
782 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
784 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
785 unknown subscript upper bounds.
787 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
789 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
790 Pranav Garg <pranav.garg2107@gmail.com>
792 * graphite-interchange.c (gather_access_strides): Removed.
793 (ppl_max_for_le): New.
794 (build_linearized_memory_access): New.
795 (memory_stride_in_loop): New.
796 (pbb_interchange_profitable_p): Reimplemented.
797 * graphite-ppl.h (ppl_new_id_map): New.
798 (ppl_interchange): New.
800 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
802 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
804 * graphite-interchange.c (compute_subscript): Removed.
805 (compute_array_size_cstr): Removed.
806 (compute_array_size_poly): Removed.
807 (compute_array_size): Removed.
808 (gather_access_strides_poly): Removed.
809 (gather_access_strides): Empty.
811 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
813 * graphite-dependences.c (dependence_polyhedron_1): Replace
814 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
815 (graphite_legal_transform_dr): Same.
816 (graphite_carried_dependence_level_k): Same.
817 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
818 Initialize PDR_NB_SUBSCRIPTS.
819 (print_pdr_access_layout): Replace pdr_nb_subscripts with
821 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
822 (PDR_NB_SUBSCRIPTS): New.
823 (pdr_nb_subscripts): Removed.
824 (pdr_dim): Simplified.
825 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
826 with PDR_NB_SUBSCRIPTS.
828 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
830 * graphite-interchange.c (compute_array_size): Remove use of
832 * graphite-poly.c (new_poly_dr): Remove argument data_container.
833 Do not initialize PDR_DATA_CONTAINER.
834 (print_pdr): Do not print PDR_DATA_CONTAINER.
835 * graphite-poly.h (struct poly_dr): Remove data_container field.
836 (PDR_DATA_CONTAINER): Removed.
837 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
839 (build_poly_dr): Same.
841 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
843 * testsuite/gcc.dg/graphite/interchange-9.c: New.
845 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
846 Sebastian Pop <sebastian.pop@amd.com>
848 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
849 copy of the dependence polyhedron. Free the temporary objects.
850 (graphite_carried_dependence_level_k): Free unused objects before
853 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
854 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
855 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
856 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
857 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
859 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
861 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
862 Early return without analyzing the data dependences if no
863 transform has been done. Call restore_scattering if the transform
865 (graphite-interchange.c): Same.
866 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
867 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
868 (apply_poly_transforms): Do not gcc_assert that
869 the transform is legal.
870 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
871 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
872 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
873 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
874 * graphite-poly.h (struct poly_scattering): New.
875 (struct poly_bb): Add original, transformed, and saved fields.
876 Remove transformed_scattering, original_scattering, nb_local_variables,
877 and nb_scattering_transform fields.
878 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
879 (poly_scattering_new): New.
880 (poly_scattering_free): New.
881 (poly_scattering_copy): New.
882 (store_scattering_pbb): New.
883 (store_scattering): New.
884 (restore_scattering_pbb): New.
885 (restore_scattering): New.
886 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
887 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
889 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
891 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
894 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
896 * Makefile.in (graphite.o): Depends on PREDICT_H.
897 * graphite.c: Include predict.h.
898 (graphite_finalize): Call tree_estimate_probability.
899 * predict.c (predict_loops): Do not call scev_initialize and
901 (tree_estimate_probability_bb): New.
902 (tree_estimate_probability): Do not initialize loops: move that
903 code to the driver. Call tree_estimate_probability_bb.
904 (tree_estimate_probability_driver): New.
905 (pass_profile): Use tree_estimate_probability_driver.
906 * predict.h (tree_estimate_probability): Declared.
908 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
910 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
911 * graphite-dependences.c (graphite_legal_transform): Add time to
912 TV_GRAPHITE_DATA_DEPS.
913 (dependency_between_pbbs_p): Same.
914 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
916 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
918 * Merge from mainline (r149952:150372).
920 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
922 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
923 * graphite-blocking.c: Same.
924 * graphite-clast-to-gimple.c: Same.
925 * graphite-dependences.c: Same.
926 * graphite-poly.c: Same.
927 * graphite-poly.h: Same.
928 * graphite-ppl.c: Same.
929 * graphite-scop-detection.c: Same.
930 * graphite-sese-to-poly.c: Same.
933 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
935 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
936 (remove_simple_copy_phi): New.
937 (remove_invariant_phi): New.
938 (simple_copy_phi_p): New.
939 (reduction_phi_p): New.
940 (gsi_for_ssa_name_def): New.
941 (insert_out_of_ssa_copy): New.
942 (insert_out_of_ssa_copy_on_edge): New.
943 (create_zero_dim_array): New.
944 (scalar_close_phi_node_p): New.
945 (rewrite_close_phi_out_of_ssa): New.
946 (rewrite_phi_out_of_ssa): New.
947 (rewrite_reductions_out_of_ssa): New.
948 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
950 * testsuite/gcc.dg/graphite/id-11.c: New.
951 * testsuite/gcc.dg/graphite/id-15.c: New.
952 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
953 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
954 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
955 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
956 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
957 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
958 * testsuite/gfortran.dg/graphite/id-13.f: New.
959 * testsuite/gfortran.dg/graphite/id-5.f: New.
961 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
964 check that nb_reductions_in_loop is zero.
965 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
967 (nb_reductions_in_loop): Removed.
968 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
969 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
970 (bb_contains_non_iv_scalar_phi_nodes): Removed.
971 (scop_contains_non_iv_scalar_phi_nodes): Removed.
972 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
974 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
976 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
977 statements that have an empty iteration domain.
978 * testsuite/gfortran.dg/graphite/id-16.f: New.
980 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
982 * tree-scalar-evolution.c (instantiate_scev_1): Return
983 chrec_dont_know when the result is not above instantiate_below.
984 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
985 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
986 the tree has a known scalar evolution.
987 * testsuite/gfortran.dg/graphite/id-14.f: New.
988 * testsuite/gfortran.dg/graphite/id-15.f: New.
990 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
992 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
994 (rename_variables): Keep inserting renames after the ones already
997 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
999 * graphite-sese-to-poly.c (compare_bb_depths): New.
1000 (graphite_sort_dominated_info): New.
1001 (build_scop_bbs_1): Call graphite_sort_dominated_info.
1002 (build_scop_scattering): Fix comment.
1004 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
1006 * graphite.c (graphite_finalize): Call print_loops instead of
1007 dump_function_to_file.
1008 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
1009 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
1010 loops generated in the graphite output file.
1011 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
1012 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
1013 * testsuite/gfortran.dg/graphite/id-12.f: New.
1015 2009-07-24 Li Feng <nemokingdom@gmail.com>
1017 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
1020 2009-07-24 Li Feng <nemokingdom@gmail.com>
1021 Tobias Grosser <grosser@fim.uni-passau.de>
1023 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
1024 alias set number build alias in ACCESSES polyhedron.
1025 (build_alias_set_for_drs): New.
1026 (build_pbb_drs): Added build_alias_set_for_drs.
1027 * graphite-dependences.c (poly_drs_may_alias_p): New.
1028 (graphite_carried_dependence_level_k): Check alias information
1029 before building polyhedron.
1031 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1033 * Makefile.in (lambda-code.o): Fix formatting.
1035 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
1037 * Merge from mainline (r149350-149952)
1039 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1041 * graphite-poly.c (apply_poly_transforms): Move strip_mine
1042 before interchange to prepare for loop blocking.
1044 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
1046 * graphite-poly.c (apply_poly_transforms): Add checks after every
1048 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
1049 done in apply_poly_transforms.
1051 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1053 * graphite-dependences.c (build_lexicographically_gt_constraint):
1054 Replace RES parameter with *RES.
1055 (dependence_polyhedron_1): Pass an address of the parameter RES
1056 instead of value of RES.
1058 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1060 * graphite.c (graphite_finalize): Fix comment.
1061 (graphite_transform_loops): Reset scev info after code generation
1064 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1066 * graphite.c (graphite_finalize): Call scev_reset.
1068 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1070 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
1071 GBB_CLOOG_IV_TYPES hash table twice.
1072 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
1073 (add_condition_to_domain): Clear GMP values.
1075 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1077 * graphite-dependences.c: Fix formatting.
1078 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
1079 (pbb_number_of_iterations): Free ppl_Linear_Expression.
1080 * graphite-sese-to-poly.c: Fix formatting.
1081 * graphite.c (graphite_transform_loops): Create the hash table
1082 after the early return.
1084 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1086 * testsuite/gcc.dg/graphite/id-14.c: New.
1087 * testsuite/gcc.dg/graphite/pr40157.c: New.
1088 * testsuite/gfortran.dg/graphite/id-11.f: New.
1090 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1092 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
1093 (build_poly_scop): Return false when there are no pbbs within
1094 loops to avoid to pass to cloog scops with no loops.
1096 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1098 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1099 useless test "i % 2".
1100 (build_pbb_scattering_polyhedrons): Fix formatting.
1101 (build_poly_dr): Same.
1102 * graphite.c (graphite_transform_loops): Restructure.
1104 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1106 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1107 reduction_list parameter.
1108 (rewrite_all_phi_nodes_with_iv): Same.
1109 (canonicalize_loop_ivs): Same.
1110 * tree-parloops.c (struct brli): Removed.
1111 (build_reduction_list_info): Removed.
1112 (build_new_reduction): New.
1113 (analyze_reduction_list): Removed.
1114 (gather_scalar_reductions): Find reductions instead of phi
1115 nodes that can't be canonicalized.
1116 (try_create_reduction_list): Remove reduction_list parameter.
1117 (gen_parallel_loop): Same.
1118 (parallelize_loops): Remove analyze_reductions variable,
1119 initialization and free.
1120 Change reduction_list htab initialization to reduction_info
1121 elements instead of ssa names.
1122 Call try_create_reduction_list and gen_parallel_loop without
1123 analyzed_reduction argument.
1124 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1125 canonicalize_loop_ivs with one less argument.
1126 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1128 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1130 * graphite-dependences.c (new_poly_dr_pair): New.
1131 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1132 (new_poly_dr_pair): New.
1133 (eq_poly_dr_pair_p): New.
1134 (hash_poly_dr_pair_p): New.
1135 * graphite-dependences.h (struct poly_dr_pair): New.
1136 (eq_poly_dr_pair_p): Declared.
1137 (hash_poly_dr_pair_p): Declared.
1138 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1139 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1140 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1141 * Makefile.in (graphite-poly.o): Add dependence on
1142 graphite-dependences.h.
1144 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1146 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1147 polynomials of degree > 1 pass to Graphite.
1148 * tree-chrec.c (scev_is_linear_expression): Call
1149 evolution_function_is_affine_multivariate_p.
1150 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1152 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1154 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1155 Instantiate scevs varying in outer loops.
1156 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1158 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1160 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1161 redundant constraint.
1163 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1165 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1166 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1167 based on the file names as in the C testsuite.
1168 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1169 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1170 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1171 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1172 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1173 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1174 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1175 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1176 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1177 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1178 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1179 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1180 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1182 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1184 * sese.c (expand_scalar_variables_call): New.
1185 (expand_scalar_variables_ssa_name): Handle calls in expander.
1187 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1189 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1190 Expect to see the pattern twice.
1191 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1192 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1193 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1195 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1197 * testsuite/gcc.dg/graphite/id-10.c: New.
1198 * testsuite/gcc.dg/graphite/id-12.c: New.
1199 * testsuite/gfortran.dg/graphite/id-7.f: New.
1200 * testsuite/gfortran.dg/graphite/id-8.f: New.
1202 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1204 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1207 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1209 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1211 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1213 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1215 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1217 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1218 building PDR subscripts.
1220 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1223 computation of array sizes.
1225 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1227 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1229 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1231 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1232 build_pairwise_constraint, dr_equality_constraints,
1233 build_pairwise_scheduling_equality,
1234 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1235 build_lexicographically_gt_constraint, dependence_polyhedron,
1236 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1237 Move from NNC_Polyhedron to C_Polyhedron.
1238 * graphite-interchange.c (compute_array_size_poly,
1239 gather_access_strides): Dito.
1240 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1241 free_scop, pbb_number_of_iterations): Dito.
1242 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1243 pbb_dim_iter_domain, struct scop): Dito.
1244 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1245 new_Cloog_Domain_from_ppl_Polyhedron,
1246 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1247 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1248 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1249 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1250 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1251 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1252 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1253 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1254 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1255 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1256 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1257 build_scop_iteration_domain, build_poly_dr): Dito
1259 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1261 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1263 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1265 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1267 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1268 positivity constraint on the symbolic number of iterations.
1270 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1272 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1274 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1275 Tobias Grosser <grosser@fim.uni-passau.de>
1277 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1278 (build_cloog_prog): Directly use SCOP_CONTEXT.
1279 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1280 (free_scop): Free SCOP_CONTEXT.
1281 (print_scop_context): New.
1282 (print_scop): Call print_scop_context.
1283 (debug_scop_context): New.
1284 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1285 (struct scop): Added field context.
1286 (SCOP_CONTEXT): New.
1287 * graphite-sese-to-poly.c (add_param_constraints): New.
1288 (build_scop_context): New.
1289 (build_poly_scop): Call build_scop_context.
1291 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1293 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1294 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1295 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1296 * graphite-ppl.h: Include double-int.h and tree.h.
1297 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1298 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1299 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1300 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1302 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1304 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1305 POINTER_PLUS_EXPR for pointer types.
1306 (clast_to_gcc_expression): Same.
1308 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-poly.c (print_scattering_function): Early return when
1311 PBB_TRANSFORMED_SCATTERING is not initialized.
1312 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1314 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1316 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1319 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1321 * tree-parloops.c (analyze_reduction_list): Change return
1323 (try_create_reduction_list): Move the call to
1324 analyze_reduction_list to the beginining.
1325 Call reduction_phi with analyzed_reductions as argument
1326 instead of reduction_list.
1328 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1330 * Merge from mainline (r148296:149346)
1332 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1334 * graphite-scop-detection.c (graphite_can_represent_init): New.
1335 (graphite_can_represent_scev): Call graphite_can_represent_init:
1336 check that the initial value does not contain multiplications of
1338 (stmt_has_simple_data_refs_p): New.
1339 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1340 (is_simple_operand): Fix formatting.
1341 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1343 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1345 * testsuite/gcc.dg/graphite/id-13.c: New.
1346 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1347 analyze_scalar_evolution, use scalar_evolution_in_region.
1348 (scan_tree_for_params_right_scev): Add extra assert.
1349 (parameter_index_in_region_1): Split from parameter_index_in_region.
1350 (idx_record_params): Use scalar_evolution_in_region.
1351 (find_params_in_bb): Same.
1352 (find_scop_parameters): Same.
1353 (build_loop_iteration_domains): Same.
1354 (create_linear_expr_from_tree): Same.
1355 * sese.c (scalar_evolution_in_region): New.
1356 * sese.h (scalar_evolution_in_region): Declared.
1357 (defined_in_sese_p): New.
1358 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1360 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1363 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1365 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1366 TREE_DATA_REF_H also implies SCEV_H.
1368 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1370 * graphite-poly.c (print_scop_params): New.
1371 (print_scop): Call print_scop_params.
1372 (debug_scop_params): New.
1373 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1375 2009-07-07 Li Feng <nemokingdom@gmail.com>
1377 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1378 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1379 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1380 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1381 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1382 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1384 2009-07-07 Li Feng <nemokingdom@gmail.com>
1386 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1387 for dependency checking part.
1388 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1389 tests for dependency checking.
1390 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1391 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1392 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1393 flag -fdump-tree-graphite-all for autopar testsuites.
1395 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1397 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1398 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1399 canonicalize_loop_ivs): Moved...
1400 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1402 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1404 * tree-parloops.c (try_create_reduction_list): Pass an extra
1405 argument analyzed_reductions. Call analyze_reduction_list.
1406 (gen_parallel_loop): Do not call analyze_reduction_list.
1407 (parallelize_loops): Init and finalize analyzed_reductions.
1409 2009-07-06 Li Feng <nemokingdom@gmail.com>
1411 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1412 Added flag -fno-loop-strip-mine for autopar testcase.
1414 2009-07-04 Li Feng <nemokingdom@gmail.com>
1416 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1417 transformed scattering dimension instead of unmatch orignal when
1418 calling dependence_polyhedron.
1420 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1422 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1424 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1426 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1427 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1429 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1431 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1432 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1433 * graphite-poly.c (pbb_number_of_iterations): New.
1434 * graphite-poly.h (pbb_number_of_iterations): Declared.
1435 (pbb_iterator_dim, pbb_parameter_dim): New.
1437 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1440 last commit on type of lower and upper bound of loops.
1442 2009-06-29 Li Feng <nemokingdom@gmail.com>
1444 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1445 graphite-dependences.h.
1446 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1447 (mark_bb_with_pbb): New.
1448 (get_stmtfor_depth): New.
1449 (find_pbb_via_hash): New.
1450 (dependency_in_loop_p): New.
1451 (mark_loops_parallel): New.
1452 (free_aux_in_new_loops): New.
1453 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1454 bb with it's relevant pbb. Mark newly created loops. Remove mark
1455 innermost loop parallel without checking.
1456 (gloog): Add parameter BB_PBB_MAPPING.
1457 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1458 (gloog): Change declaration.
1459 (mark_loop_parallel): Make extern.
1460 (free_aux_in_new_loops): Declare.
1461 (bb_pbb_map_hash): New.
1462 (eq_bb_pbb_map): New.
1463 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1464 auto parallelization when flag_graphite_force_parallel is set.
1465 (graphite_finalize): Added free_aux_in_new_loops.
1466 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1467 the innermost loop that marked parallel. Use
1468 flag_graphite_force_parallel instead of loop->can_be_parallel.
1469 (loop_parallel_p): Move inner most checking out of function.
1471 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1473 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1474 type of lower and upper bound of loops signed long int.
1476 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1478 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1479 expression outside the loop.
1481 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1483 * gcc.dg/graphite/interchange-8.c: New.
1485 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1487 * gcc.dg/graphite/interchange-0.c: XFailed.
1488 * gcc.dg/graphite/interchange-5.c: XFailed.
1489 * gcc.dg/graphite/interchange-6.c: XFailed.
1491 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1493 * graphite-interchange.c (compute_array_size_poly): The end of the
1494 recursion should return 1.
1496 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1498 * graphite-interchange.c (compute_array_size_cstr): Allow the
1499 subscript multiplier to be -1.
1500 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1501 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1502 data_container. Initializes PDR_DATA_CONTAINER.
1503 (print_pdr_access_layout): New.
1504 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1505 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1507 (PDR_DATA_CONTAINER): New.
1508 (new_poly_dr): Update declaration.
1509 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1510 (build_poly_dr): Call pdr_add_data_dimensions.
1512 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1514 * graphite-poly.h (struct poly_dr): Fix comment.
1515 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1516 (pdr_add_memory_accesses): New.
1517 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1519 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1521 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1522 (print_pbb): Add call to print_pdrs.
1523 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1525 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1526 Li Feng <nemokingdom@gmail.com>
1528 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1529 (dependency_between_pbbs_p): New.
1530 (lexicographically_gt_p): Assure !empty_p before polyhedron
1531 intersection assign.
1532 (build_lexicographically_gt_constraint): Correct lexicographically
1534 * graphite-dependences.h: New.
1535 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1537 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1539 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1540 (gloog): Print to dump_file the generated clast.
1541 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1542 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1544 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1546 * graphite-poly.c (extend_scattering): Increment
1547 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1549 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1551 * graphite-interchange.c (compute_array_size_poly): Added exit of
1552 recursion condition. Continue iterating even after the first equality.
1553 (compute_array_size): Same.
1555 2009-06-24 Li Feng <nemokingdom@gmail.com>
1557 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1558 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1559 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1560 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1561 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1563 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1565 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1566 only when the use verifies is_gimple_reg.
1568 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1570 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1571 Allocate scaldims after call to unify_scattering_dimensions.
1573 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1575 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1577 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1578 Albert Cohen <albert.cohen@inria.fr>
1580 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1581 variables for the strip mining.
1583 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1584 Pranav Garg <pranav.garg2107@gmail.com>
1586 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1587 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1588 (graphite-blocking.o): New rule.
1589 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1590 * graphite-blocking.c: New.
1591 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1592 flag_loop_strip_mine.
1593 (psct_scattering_dim_for_loop_depth): New.
1594 * graphite-poly.h (scop_do_strip_mine): Declared.
1595 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1596 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1597 flag_loop_strip_mine.
1599 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1601 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1602 a GMP value and a PPL coefficient at each iteration of a loop.
1604 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1606 * graphite-dependences.c (dependence_polyhedron): Do not use
1607 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1608 pbb_nb_scattering_transform.
1609 (graphite_legal_transform_dr): Same.
1610 * graphite-poly.c (extend_scattering): Same.
1611 (unify_scattering_dimensions): Same.
1612 (print_scattering_function): Same.
1613 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1614 PBB_NB_LOCAL_VARIABLES.
1615 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1616 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1617 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1618 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1619 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1620 (pbb_nb_scattering_transform): New.
1621 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1622 (psco_scattering_dim): Add assert on parameters.
1623 (psct_scattering_dim): Same.
1624 (psct_scattering_dim_for_loop_depth): Declared.
1625 (psct_local_var_dim): New.
1626 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1627 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1628 correct layout, call pbb_nb_local_vars.
1629 (psct_add_local_variable, psct_add_scattering_dimension): New.
1630 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1631 Initialize PBB_NB_SCATTERING_TRANSFORM.
1633 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1635 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1636 (set_coef): Renamed ppl_set_coef.
1637 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1639 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1641 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1642 test a boolean against 1.
1643 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1644 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1645 (pbb_do_interchange): Returns true when a transform has been performed.
1646 (scop_do_interchange): Same.
1647 * graphite-poly.c (apply_poly_transforms): Use the return value of
1648 scop_do_interchange.
1649 * graphite-poly.h (scop_do_interchange): Update declaration.
1651 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1653 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1655 * sese.c (sese_reset_aux_in_loops): New.
1656 * sese.h (sese_reset_aux_in_loops): New.
1658 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1660 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1661 multiplier and multiply the constant by the multiplier.
1662 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1663 (build_poly_dr): Do not use the multiplier to define the subscript.
1665 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1667 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1668 compiler's data reference. Initialize PDR_CDR.
1669 (print_pdr): Call dump_data_reference.
1670 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1671 Add compiler_dr field.
1672 (PDR_BB): Renamed PDR_PBB.
1674 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1675 GCC's data reference representation.
1676 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1677 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1679 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1681 * graphite-poly.c (print_scattering_function): Also print the layout.
1682 * graphite-poly.h (pbb_nb_local_vars): New.
1684 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1686 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1688 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1690 * graphite-poly.c (print_pdr, debug_pdr): New.
1691 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1692 (PDR_BASE): Removed.
1694 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1696 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1699 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1701 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1702 subscript identification column.
1703 (pbb_do_interchange): Print to dump_file that some loops "will be
1704 interchanged". Rely on that chain of characters in the testcases.
1705 * gcc.dg/graphite/interchange-0.c: New.
1706 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1707 interchange-*.c files and compile them with -floop-interchange.
1709 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1711 * graphite-interchange.c (interchange_profitable_p): Renamed
1712 pbb_interchange_profitable_p.
1714 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1715 Harsha Jagasia <harsha.jagasia@amd.com>
1716 Pranav Garg <pranav.garg2107@gmail.com>
1718 * graphite-interchange.c (interchange_profitable_p): Make static.
1719 (pbb_interchange_loop_depths, pbb_do_interchange,
1720 scop_do_interchange): New.
1721 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1722 for flag_loop_interchange.
1723 * graphite-poly.h (scop_do_interchange): Declared.
1724 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1725 flag_loop_interchange is used.
1727 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1729 * graphite-dependences.c (dependence_polyhedron): Update use of
1730 pbb_nb_scattering_dims.
1731 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1732 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1733 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1734 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1736 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1738 * graphite.c: Cleanup foo.
1740 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1742 * Merge from mainline (r143684:148293).
1743 * Disabled libpcp until it gets fixed.
1745 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1746 Harsha Jagasia <harsha.jagasia@amd.com>
1748 * graphite-interchange.c: New.
1749 * Makefile.in (graphite-interchange.o): New.
1750 * graphite-poly.h (interchange_profitable_p): Declared.
1751 * graphite-ppl.h (value_max): New.
1753 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1755 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1756 * graphite-poly.h: Fix some comments.
1760 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1763 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1764 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1765 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1766 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1767 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1768 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1769 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1770 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1771 * graphite-clast-to-gimple.c: Same.
1772 * graphite-dependences.c: Same.
1773 * graphite-poly.c: Same.
1774 * graphite-sese-to-poly.c: Same.
1776 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1778 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1779 expressions for an IV rename, as returned by clast_to_gcc_expression.
1780 (copy_renames): Rename new_name to expr.
1781 * sese.c (debug_rename_elt): Same.
1784 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1785 the information from the rename map.
1786 (rename_variables_in_stmt): Same.
1787 (add_loop_exit_phis): Rename new_name to expr.
1788 (insert_loop_close_phis): Same.
1789 (add_guard_exit_phis): Same. Call force_gimple_operand.
1790 * sese.h (struct rename_map_elt): Rename new_name to expr.
1791 (new_rename_map_elt): Same.
1793 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1795 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1796 * sese.c (set_rename): Make it extern.
1797 * sese.h (set_rename): Declared.
1799 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1801 * graphite-poly.c (extend_scattering): Free values.
1802 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1804 (ppl_print_powerset_matrix): Same.
1805 * graphite-scop-detection.c (free_scops_1): New.
1806 (limit_scops): Call free_scops_1.
1807 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1808 (build_poly_dr): Free PPL coefficients.
1809 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1811 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1813 * graphite-dependences.c: New.
1814 * graphite-data-ref.c: Removed.
1815 * graphite-data-ref.h: Removed.
1816 * Makefile.in (graphite-data-ref.o): Removed.
1817 (graphite-dependences.o): Added.
1818 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1819 * graphite-poly.c: Same.
1820 Move the data dependence testing to graphite-dependences.c.
1822 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1824 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1825 from graphite_cannot_represent_loop. Code refactored.
1826 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1828 2009-05-17 Li Feng <nemokingdom@gmail.com>
1830 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1831 Cover all the testcases (not only the filtered ones).
1833 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1835 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1836 unnecessary check. Update comments. Move check for REAL_TYPE here.
1837 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1838 done in (stmt_simple_for_scop_p).
1840 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1842 * graphite.c (print_global_statistics): New.
1843 (print_graphite_scop_statistic): New.
1844 (print_graphite_statistics): New.
1845 (graphite_initialize, graphite_transform_loops): Print statistics.
1846 * graphite-scop-detection (build_scops): Print statistics.
1847 (print_graphite_scop_statistics): New.
1848 (print_graphite_statistics): New.
1850 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1852 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1853 (debug_clast_name_index): Removed.
1854 (debug_clast_name_indexes_1): Removed.
1855 (debug_clast_name_indexes): Removed.
1856 (clast_name_index_elt_info): Removed.
1857 (eq_clast_name_indexes): Removed.
1858 (clast_name_to_index): Removed.
1859 (new_clast_name_index): Removed.
1860 (save_clast_name_index): Removed.
1861 (save_var_name): Moved...
1862 (init_sese_params_index): Removed.
1863 (clast_name_to_gcc): Remove use of name_tree.
1864 (initialize_cloog_names): Same.
1865 (gloog): Do not call init_sese_params_index.
1866 * graphite-sese-to-poly.c (save_var_name): ...here.
1867 (parameter_index_in_region): New.
1868 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1869 (parameter_index_in_region): Removed.
1870 (is_parameter): Remove use of name_tree.
1871 * sese.h (struct name_tree): Removed.
1872 (struct sese): Remove use of name_tree. New field params_names.
1873 (SESE_PARAMS_NAMES): New.
1874 (SESE_PARAMS): Remove duplicate.
1875 (parameter_index_in_region): Removed.
1876 (sese_nb_params): Remove use of name_tree.
1877 (struct clast_name_index): New.
1878 (new_clast_name_index): New.
1879 (clast_name_to_index): New.
1880 (save_clast_name_index): New.
1881 (debug_clast_name_index): New.
1882 (debug_clast_name_indexes_1): New.
1883 (debug_clast_name_indexes): New.
1884 (clast_name_index_elt_info): New.
1885 (eq_clast_name_indexes): New.
1887 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1889 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1890 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1891 (graphite_loop_normal_form): Do not pass region. Do not
1892 initialize SESE_OLDIVS.
1893 (build_graphite_loop_normal_form): Update call to
1894 graphite_loop_normal_form.
1895 * sese.c (debug_oldivs): Removed.
1896 (new_sese): Do not initialize SESE_OLDIVS.
1897 (free_sese): Do not free SESE_OLDIVS.
1898 (oldiv_for_loop): Removed.
1899 * sese.h (struct sese): Remove old_ivs.
1900 (SESE_OLDIVS): Removed.
1901 (oldiv_for_loop): Removed.
1903 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1905 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1906 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1907 replaced by a call to newivs_to_depth_to_newiv.
1908 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1909 (clast_to_gcc_expression_red): Same.
1910 (gcc_type_for_clast_expr): Same.
1911 (gcc_type_for_clast_eq): Same.
1912 (graphite_translate_clast_equation): Same.
1913 (graphite_create_guard_cond_expr): Same.
1914 (graphite_create_new_guard): Same.
1915 (graphite_create_new_loop): Same.
1916 (build_iv_mapping): Same.
1917 (translate_clast): Same.
1919 (loop_iv_stack_patch_for_consts): Removed. *
1920 sese.c (iv_stack_entry_is_constant): Removed.
1921 (iv_stack_entry_is_iv): Removed.
1922 (loop_iv_stack_push_iv): Removed.
1923 (loop_iv_stack_insert_constant): Removed.
1924 (loop_iv_stack_pop): Removed.
1925 (loop_iv_stack_get_iv): Removed.
1926 (loop_iv_stack_get_iv_from_name): Removed.
1927 (debug_loop_iv_stack): Removed.
1928 (free_loop_iv_stack): Removed.
1929 (loop_iv_stack_remove_constants): Removed. *
1930 sese.h (iv_stack_entry_kind): Removed.
1931 (iv_stack_entry_data_union): Removed.
1932 (iv_stack_entry_struct): Removed.
1933 (iv_stack_entry_p): Removed.
1934 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1935 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1936 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1937 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1938 (gbb_loop_at_index): Fix indenting.
1939 (gbb_loop_index): Removed.
1941 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1943 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1944 Call clast_name_to_index.
1946 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1948 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1949 do not pass params. Get params from SESE_PARAMS.
1950 (clast_to_gcc_expression): Same.
1951 (clast_to_gcc_expression_red): Same.
1952 (gcc_type_for_clast_eq): Same.
1953 (graphite_translate_clast_equation): Same.
1954 (graphite_create_new_loop): Same.
1955 * sese.c (rename_variables_in_stmt): Fix comment.
1957 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1959 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1961 Call save_clast_name_index.
1962 (translate_clast): Pass newivs_index.
1963 (gloog): Create and free newivs_index.
1965 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1967 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1968 (clast_name_index_p): New type.
1969 (debug_clast_name_index): New.
1970 (debug_clast_name_indexes_1): New.
1971 (debug_clast_name_indexes): New.
1972 (clast_name_index_elt_info): New.
1973 (eq_clast_name_indexes): New.
1974 (clast_name_to_index): New.
1975 (new_clast_name_index): New.
1976 (save_clast_name_index): New.
1977 (init_sese_params_index): New.
1978 (gloog): Call init_sese_params_index.
1979 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1980 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1981 (free_sese): Free SESE_PARAMS_INDEX.
1982 * sese.h (struct sese): Add params_index.
1983 (SESE_PARAMS_INDEX): New.
1985 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1987 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1988 (graphite_create_new_loop): Pass the newivs vector. Push the
1989 newly created IV to newivs.
1990 (translate_clast): Pass the newivs vector.
1991 (gloog): Create and destroy the newivs vector.
1993 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1995 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1996 (graphite_loop_normal_form): Initialize loop->aux with the unique
1997 IV that has been created.
1999 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
2001 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
2002 scev with parameters in the base part. They where forbidden
2005 2009-05-11 Li Feng <nemokingdom@gmail.com>
2007 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
2008 compile options by file names.
2009 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
2010 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
2011 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
2012 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
2014 2009-05-08 Li Feng <nemokingdom@gmail.com>
2016 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
2017 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
2018 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
2019 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
2021 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2023 * graphite-scop-detection (build_scops_1): Fix little bug introduced
2026 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
2028 * graphite-scop-detection.c (graphite_can_represent_scev): Only
2029 allow integer constant strides.
2030 (graphite_can_represent_expr): Depend on outermost_loop.
2031 (stmt_simple_memref_p, graphite_cannot_represent_loop,
2032 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
2033 build_scops_1): Same.
2034 (scopdet_basic_block_info): Same and insert layered SCoP
2036 (try_generate_gimple_bb): Cleanup.
2037 (build_scops): Enable data references.
2039 * testsuite/gcc.dg/graphite/id-5.c: New.
2040 * testsuite/gcc.dg/graphite/id-9.c: New.
2041 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
2042 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
2044 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2046 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
2047 that we have not yet built for this SCoP.
2049 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2051 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
2052 for complex numbers.
2054 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
2056 * graphite-ppl.c: Fix build if cloog is not available.
2058 2009-05-04 Li Feng <nemokingdom@gmail.com>
2060 * tree-parloops.c (loop_parallel_p): Remove construction of
2061 NITER and REDUCTION_LIST.
2062 (try_get_loop_niter): New.
2063 (try_create_reduction_list): New.
2064 (parallelize_loops): Bypass the failed checkings in autopar
2065 when can_be_parallel in loop structure is set to true.
2067 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2069 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
2070 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
2072 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
2074 * graphite-scop-detection.c (stmt_simple_for_scop_p):
2075 Enable EQ_EXPR and NE_EXPR again.
2077 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2079 * graphite-scop-detection.c (graphite_can_represent_scev):
2080 Add check if scev is affine multivariate.
2081 (harmful_stmt_in_bb): Check if we can represent the conditions.
2082 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
2084 * testsuite/gcc.dg/graphite/id-7.c: New.
2086 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
2088 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
2089 Check all bbs in region, not only the bbs that are represented in
2091 (build_poly_scop): Add newline.
2092 * testsuite/gcc.dg/graphite/id-8.c: New.
2094 2009-04-30 Li Feng <nemokingdom@gmail.com>
2096 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2097 when loop initialize.
2098 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2099 * common.opt: Declare flag_graphite_force_parallel.
2100 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2102 * graphite-poly.c (apply_poly_transforms): Introduce
2103 flag_graphite_force_parallel.
2104 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2105 * toplev.c (process_options): ditto and replace a not correctly
2108 2009-04-30 Li Feng <nemokingdom@gmail.com>
2110 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2111 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2112 to the redefinition.
2113 (compute_cloog_iv_types_1): ditto.
2114 (build_iv_mapping): ditto.
2115 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2117 (free_gimple_bb): Removed GBB_LOOPS related free part.
2118 (build_bb_loops): Removed.
2119 * sese.h (struct gimple_bb): Removed loops.
2120 (GBB_LOOPS): Removed.
2121 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2122 (gbb_loop_index): ditto.
2124 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2126 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2127 allow non constant strides.
2128 * testsuite/gcc.dg/graphite/scop-20.c: New.
2130 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2132 * graphite-scop-detection.c (dot_all_scops): Fix system call
2133 return value warning.
2136 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2138 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2139 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2141 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2143 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2144 build_pairwise_constraint, dr_equality_constraints,
2145 build_pairwise_scheduling_equality,
2146 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2147 build_lexicographically_gt_constraint, dependence_polyhedron,
2148 graphite_legal_transform_dr, graphite_legal_transform_bb,
2149 graphite_legal_transform): New.
2150 * graphite-poly.h (graphite_legal_transform): Declared.
2151 * graphite-sese-to-poly.c (build_poly_scop): Call to
2152 graphite_legal_transform is disabled for the moment.
2154 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2156 * graphite-poly.h (pbb_nb_scattering_dims): New.
2157 (pbb_nb_scattering): Use it.
2159 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2161 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2162 Pointset_Powerset version of ppl_insert_dimensions.
2163 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2165 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2167 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2169 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2171 * graphite-poly.h: Fix comment.
2173 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2175 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2177 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2179 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2182 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2184 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2185 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2188 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2190 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2191 handle EQ_EXPR and NE_EXPR.
2193 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2195 * graphite-poly.h (poly_dr): Fix comment.
2197 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2198 Tobias Grosser <grosser@fim.uni-passau.de>
2200 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2201 with a zero dimension polyhedron.
2202 (find_scop_parameters): Move the call to scop_set_nb_params here.
2203 (build_loop_iteration_domains): Store in loop->aux the iteration
2205 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2206 by any loop in scop.
2207 (build_poly_scop): Do not call scop_set_nb_params.
2209 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2210 Tobias Grosser <grosser@fim.uni-passau.de>
2212 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2213 add_condition_to_domain not GT_EXPR.
2215 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2217 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2218 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2219 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2220 upper_bound_assign to calculate unions.
2221 * testsuite/gcc.dg/graphite/id-6.c: New.
2223 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2225 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2226 handle abnormal edges.
2228 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2230 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2231 (free_poly_bb): Also free poly_drs.
2232 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2233 (poly_dr): Polyhedron to Pointset_Powerset.
2234 (pdr_accessp_nb_subscripts): Same.
2235 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2238 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2240 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2241 names into more meaningful names.
2243 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2245 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2246 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2248 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2250 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2252 * tree-parloops.c (rewrite_phi_with_iv): New.
2253 (rewrite_all_phi_nodes_with_iv): New.
2254 (canonicalize_loop_ivs): Call them.
2256 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2258 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2259 graphite_find_data_references_in_stmt.
2260 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2261 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2263 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2265 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2267 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2269 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2270 instead of bb_in_region.
2271 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2272 (build_sese_conditions): Use flag_bb_in_sese.
2273 * sese.c (register_bb_in_sese): Removed.
2274 (new_sese): Remove initialization of SESE_REGION_BBS.
2275 (free_sese): Do not free SESE_REGION_BBS.
2276 * sese.h (struct sese): Remove field region_basic_blocks.
2277 (SESE_REGION_BBS): Removed.
2278 (bb_in_sese_p): Implement in function of bb_in_region.
2280 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2282 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2285 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2287 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2289 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2290 (add_condition_to_domain): New.
2291 (add_condition_to_pbb): New.
2292 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2293 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2295 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2297 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2298 ppl_Pointset_Powerset.
2299 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2300 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2301 (pbb_nb_loops): Same.
2302 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2303 add_conditions_to_domain): Same.
2304 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2305 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2306 ppl_const_Polyhedron_t.
2307 (ppl_print_powerset_matrix): New.
2308 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2309 ppl_print_powerset_matrix): New.
2310 (ppl_print_polyhedron_matrix): Updated.
2312 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2314 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2316 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2318 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2319 (print_iteration_domains, debug_iteration_domain,
2320 debug_iteration_domains): New.
2321 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2322 debug_iteration_domains): Declared.
2323 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2326 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2327 Sebastian Pop <sebastian.pop@amd.com>
2329 * graphite-poly.h (print_iteration_domain): New.
2330 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2331 (build_sese_conditions_1, build_sese_conditions_after,
2332 build_sese_conditions_before): New.
2333 (build_sese_conditions): Rewritten.
2335 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2336 Tobias Grosser <grosser@fim.uni-passau.de>
2338 Cleanup of code generation liveouts.
2339 * graphite-clast-to-gimple.c (translate_clast): Use a single
2340 rename_map instead of one per translated statement.
2341 Do not use SESE_LIVEOUT_RENAMES.
2342 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2343 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2344 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2345 phi node of a reduction: when a loop contains a reduction used outside
2346 the loop, there should be a scalar close phi node on the exit block.
2347 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2348 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2349 (free_sese): Do not free them.
2350 (sese_build_liveouts_use): Do not use them.
2351 (sese_build_liveouts_bb): Same.
2352 (sese_build_liveouts): Same.
2353 (sese_insert_phis_for_liveouts): Same.
2354 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2355 (defined_in_loop_p): New.
2356 (alive_after_loop): New.
2357 (close_phi_not_yet_inserted_p): New.
2358 (struct alep, alep_p): New.
2359 (add_loop_exit_phis): Remove from the rename_map all the names defined
2360 in the code generated loop.
2361 (insert_loop_close_phis): Traverse the rename_map passed to it.
2362 Don't use SESE_LIVEOUT_RENAMES.
2363 (default_liveout_before_guard): Renamed default_before_guard.
2364 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2365 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2366 (register_sese_liveout_renames): Removed.
2367 (copy_bb_and_scalar_dependences): Do not call it.
2368 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2370 (SESE_LIVEOUT): Removed.
2371 (SESE_LIVEOUT_RENAMES): Removed.
2372 (SESE_REDUCTION_LIST): Removed.
2373 (sese_build_liveouts): Removed.
2374 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2375 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2376 (insert_guard_phis): Same.
2377 (rename_map_elt): Declare a VEC of them.
2378 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2379 trees not pointers to trees.
2381 Rewrite in canonical close SSA form:
2382 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2383 (limit_scops): Close the scop after the block containing the close phi
2385 (canonicalize_loop_closed_ssa): New.
2386 (canonicalize_loop_closed_ssa_form): New.
2387 (build_scops): Call canonicalize_loop_closed_ssa_form.
2389 * graphite-sese-to-poly.c: Fix typos.
2391 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2393 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2395 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2396 (print_pbb): Add conditions.
2398 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2399 Sebastian Pop <sebastian.pop@amd.com>
2401 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2402 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2403 (build_scop_bbs_1): New.
2404 (build_scop_bbs): Rewrite.
2405 * sese.h (bb_in_region): New.
2407 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2409 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2411 (print_scop): Style.
2412 * graphite-poly.h (poly_bb): Add drs vector.
2413 (PBB_DRS): Add accessor.
2414 * graphite-sese-to-poly.c (build_poly_dr): New.
2415 (build_pbb_drs, build_scop_drs): New.
2416 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2418 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2420 * tree-ssa-loop.c: Include forgotten toplev.h
2422 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2424 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2425 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2426 * testsuite/gcc.dg/graphite/pr37928.c: Same
2427 * testsuite/gcc.dg/graphite/pr38409.c: Same
2428 * testsuite/gcc.dg/graphite/pr38498.c: Same
2429 * testsuite/gcc.dg/graphite/pr38559.c: Same
2430 * testsuite/gcc.dg/graphite/pr39335.c: Same
2431 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2432 * testsuite/gfortran.dg/graphite/block-2.f: Same
2433 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2436 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2438 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2439 build_access_matrix, build_scop_data_accesses): Remove access function
2440 building. (We get a new version soon).
2441 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2442 * sese.h (nb_loops_around_loop_in_sese): Remove.
2443 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2445 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2446 Sebastian Pop <sebastian.pop@amd.com>
2448 * graphite-scop-detection.c (struct scopdet_info): Rename last
2450 (scopdet_basic_block_info, build_scops_1): Don't use
2451 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2453 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2454 Sebastian Pop <sebastian.pop@amd.com>
2456 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2457 * sese.c (sese_build_liveouts_use): Renamed from
2458 sese_build_livein_liveouts_use. Remove liveins.
2459 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2460 Call sese_build_liveouts_use.
2461 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2462 Call sese_build_liveouts_bb.
2463 (new_sese, free_sese): Remove liveins.
2464 (sese_add_exit_phis_var): Deleted.
2465 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2467 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2469 * sese.h (sese): Remove num_ver and livein.
2470 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2472 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2474 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2476 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2478 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2479 (build_scop_scattering): Do not use compare_prefix_loops any more.
2480 (nb_common_loops): New.
2482 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2484 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2485 (register_old_and_new_names): Renamed set_rename.
2487 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2489 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2490 of the decl from the previous commit.
2492 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2494 * graphite-scop-detection.c (dot_scop): New.
2495 * graphite-scop-detection.h (dot_scop): Declared.
2497 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2499 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2501 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2503 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2504 condition at the end of the loop.
2505 * graphite.c (graphite_initialize, graphite_finalize): Print to
2506 dump_file the compiled function.
2507 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2508 of create_empty_loop_on_edge.
2509 (translate_clast): Update the code generation of loops for the new
2511 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2513 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2515 Reverted the patch from 2009-03-19.
2517 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2519 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2521 (print_scop): Style.
2522 * graphite-poly.h (poly_bb): Add drs vector.
2523 (PBB_DRS): Add accessor.
2524 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2525 (build_access_matrix_with_af, build_access_matrix,
2526 build_scop_data_accesses): Delete.
2527 (build_poly_dr): New.
2528 (build_pbb_drs, build_scop_drs): New.
2529 (build_poly_scop): call build_scop_drs.
2531 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2533 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2534 once per basic block.
2536 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2538 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2539 (graphite_can_represent_expr): Renamed from loop_affine_expr
2541 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2542 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2543 (scopdet_basic_block_info): Actually define entry_block.
2544 (stmt_simple_memref_p): Moved here from ...
2546 * tree-data-ref.c (stmt_simple_memref_p): here.
2547 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2549 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2551 * testsuite/gcc.dg/graphite/id-4.c: New.
2553 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2555 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2556 (register_old_and_new_names): Update the content of the map.
2557 When there was already a rename_map_elt in the map at that
2559 (copy_bb_and_scalar_dependences): Do rename_variables after
2560 expand_scalar_variables.
2561 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2562 of the map. When there was already a rename_map_elt in the
2563 map at that location, free it.
2564 (translate_clast): Pass the rename_map. Do not initialize and free
2565 a rename_map per stmt_user.
2566 (gloog): Initialize and free one rename_map and pass it to
2569 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2571 * sese.c (expand_scalar_variables_stmt,
2572 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2574 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2575 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2576 the gimple_stmt_iterator of the statement to be expanded.
2577 * graphite-scop-detection.c (is_simple_operand): Do handle
2580 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2582 * graphite-scop-detection.c (is_simple_operand): Do not handle
2584 * testsuite/gcc.dg/graphite/id-2.c: New.
2586 * graphite-sese-to-poly.c (build_bb_loops,
2587 add_value_to_dim, scan_tree_for_params_right_scev,
2588 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2589 find_params_in_bb, build_loop_iteration_domains,
2590 add_conditions_to_domain): Remove subtract.
2592 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2594 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2595 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2596 pbb_loop_at_index -> gbb_loop_at_index.
2597 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2598 (debug_loop_vec): Delete.
2599 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2600 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2601 (PBB_LOOPS): Removed.
2602 (PBB_BLACK_BOX): Insert cast.
2603 (pbb_set_black_box): New setter.
2604 (pbb_loop_at_index, pbb_loop_index): Removed.
2605 (scop_set_region, scop_set_nb_params): New.
2606 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2607 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2608 (build_poly_scop): Use scop_set_nb_params.
2609 * sese.h (gimple_bb): Add LOOPS.
2610 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2612 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2614 Revert previous commit.
2616 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2618 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2619 (register_old_and_new_names): Update the content of the map.
2620 When there was already a rename_map_elt in the map at that
2622 (copy_bb_and_scalar_dependences): Do rename_variables after
2623 expand_scalar_variables.
2624 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2625 of the map. When there was already a rename_map_elt in the
2626 map at that location, free it.
2627 (translate_clast): Pass the rename_map. Do not initialize and free
2628 a rename_map per stmt_user.
2629 (gloog): Initialize and free one rename_map and pass it to
2632 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2634 Remove forgotten line in revert.
2636 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2638 Revert previous commit.
2640 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2642 * sese.c (register_old_and_new_names): Update the content
2643 of the map. When there was already a rename_map_elt in the
2644 map at that location, free it.
2645 (copy_bb_and_scalar_dependences): Do rename_variables after
2646 expand_scalar_variables.
2647 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2648 of the map. When there was already a rename_map_elt in the
2649 map at that location, free it.
2650 (translate_clast): Pass the rename_map. Do not initialize and free
2651 a rename_map per stmt_user.
2652 (gloog): Initialize and free one rename_map and pass it to
2655 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2657 * graphite-clast-to-gimple.c (translate_clast): context_loop
2660 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2661 Sebastian Pop <sebastian.pop@amd.com>
2663 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2664 of the use of ppl_Polyhedron_map_space_dimensions.
2666 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2667 Sebastian Pop <sebastian.pop@amd.com>
2669 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2670 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2671 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2672 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2673 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2674 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2675 pbb_nb_params): New.
2676 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2677 nb_loops_around_pbb): Adapt return types.
2679 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2681 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2682 graphite-clast-to-gimple.o, graphite-data-ref.o,
2683 graphite-scop-detection.o, graphite-poly.o): Add
2686 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2688 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2689 graphite-clast-to-gimple.o, graphite-data-ref.o,
2690 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2692 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2694 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2695 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2696 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2697 * testsuite/gcc.dg/graphite/block-0.c: Same.
2698 * testsuite/gcc.dg/graphite/block-1.c: Same.
2699 * testsuite/gcc.dg/graphite/block-2.c: Same.
2700 * testsuite/gcc.dg/graphite/block-3.c: Same.
2701 * testsuite/gcc.dg/graphite/block-4.c: Same.
2702 * testsuite/gcc.dg/graphite/block-5.c: Same.
2703 * testsuite/gcc.dg/graphite/block-6.c: Same.
2704 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2705 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2706 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2707 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2708 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2709 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2710 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2711 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2712 * opts.c: Remove -floop-block from -O2.
2713 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2714 -floop-strip-mine are used.
2716 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2717 Sebastian Pop <sebastian.pop@amd.com>
2719 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2721 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2722 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2723 strip_mine_profitable_p, is_interchange_valid,
2724 graphite_trans_bb_block, graphite_trans_loop_block,
2725 graphite_trans_scop_block): Temporary removed.
2726 (extend_scattering, unify_scattering_dimensions): New.
2727 (print_scattering_function, graphite_read_transforms):
2728 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2729 (graphite_generate_scattering_fns): Removed.
2730 (apply_poly_transforms): Cleanup.
2731 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2732 (schedule_to_scattering): Moved.
2733 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2734 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2735 (pbb_nb_scattering): New.
2736 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2737 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2739 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2741 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2742 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2743 -> PBB_TRANSFORMED_SCATTERING.
2744 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2745 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2746 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2747 (check_poly_representation): Do not return bool.
2748 (graphite_transform_loops): Reformat.
2749 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2751 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2753 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2754 debug_pbb_domain, debug_pbb, debug_scop): New.
2755 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2756 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2758 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2761 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2762 when the type precision of the induction variable should be
2763 larger than the type precision of nit.
2764 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2765 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2766 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2768 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2769 * testsuite/gcc.dg/graphite/pr39335.c: New.
2771 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2773 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2774 SSA_NAMES not struct reduction_info.
2776 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2778 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2780 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2781 Tobias Grosser <grosser@fim.uni-passau.de>
2783 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2784 (free_sese): Free SESE_REDUCTION_LIST.
2785 * sese.h (struct sese): Add field reduction_list.
2786 (SESE_REDUCTION_LIST): New.
2787 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2788 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2790 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2791 Tobias Grosser <grosser@fim.uni-passau.de>
2793 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2796 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2797 Tobias Grosser <grosser@fim.uni-passau.de>
2799 * tree-parloops.c (struct brli, build_reduction_list_info,
2800 analyze_reduction_list, gather_scalar_reductions): New.
2801 (loop_parallel_p): Build a reduction list containing only
2802 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2803 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2804 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2805 * tree-flow.h (gather_scalar_reductions): Declared.
2807 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2810 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2811 number_of_iterations_exit from a gcc_assert.
2813 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2814 Jan Sjodin <jan.sjodin@amd.com>
2816 * output.h (graphite_out_file, graphite_in_file): Declared.
2817 * toplev.c (graphite_out_file, graphite_in_file): New.
2818 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2819 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2820 Don't call schedule_to_scattering.
2821 * common.opt (fgraphite-write, fgraphite-read): New.
2822 * graphite-poly.c: Include output.h.
2823 (print_scattering_function, print_scattering_functions,
2824 debug_scattering_function, debug_scattering_functions,
2825 graphite_write_transforms, graphite_read_transforms,
2826 graphite_generate_scattering_fns): New.
2827 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2828 Call graphite_generate_scattering_fns, graphite_write_transforms,
2829 graphite_read_transforms.
2830 (new_poly_bb): Initialize PBB_SCATTERING.
2831 (free_poly_bb): Free PBB_SCATTERING.
2832 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2833 * graphite-poly.h (struct poly_bb): Add field scattering.
2834 (PBB_SCATTERING): New.
2835 (print_scattering_function, print_scattering_functions,
2836 debug_scattering_function, debug_scattering_functions): Declared.
2837 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2838 GMP values, not integers!
2839 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2840 ppl_read_polyhedron_matrix): New.
2841 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2842 debug_ppl_polyhedron_matrix,
2843 ppl_read_polyhedron_matrix): Declared.
2844 * Makefile.in (graphite-poly.o): Depends on output.h.
2846 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2847 Tobias Grosser <grosser@fim.uni-passau.de>
2850 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2851 scalar evolutions in the scop_entry->loop_father.
2853 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2854 Tobias Grosser <grosser@fim.uni-passau.de>
2856 * graphite.h (ref_nb_loops): Remove declaration.
2857 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2858 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2859 debug_gbb): Moved to sese.h.
2862 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2863 Tobias Grosser <grosser@fim.uni-passau.de>
2865 * graphite-data-ref.[ch]: Disable.
2867 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2868 Tobias Grosser <grosser@fim.uni-passau.de>
2870 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2871 scalar evolutions in the scop_entry->loop_father.
2873 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2875 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2876 (graphite_cannot_represent_loop_niter): Renamed
2877 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2878 (limit_scops): build_sese_loop_nests does not return a bool.
2879 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2880 * sese.c (nb_reductions_in_loop): ... from here.
2881 (graphite_loop_normal_form): ... from here.
2882 (sese_record_loop): Does not fail, so does not return a bool.
2883 (build_sese_loop_nests): Same.
2884 * sese.h (build_sese_loop_nests): Update declaration.
2885 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2886 (build_graphite_loop_normal_form): New.
2887 (gloog): Call build_graphite_loop_normal_form.
2888 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2889 build_sese_loop_nests.
2891 * testsuite/gcc.dg/graphite/id-1.c: New.
2893 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2894 Tobias Grosser <grosser@fim.uni-passau.de>
2896 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2897 The SCoP detection fix is sufficient.
2899 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2901 PR tree-optimization/39260
2902 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2903 the basic block contains a condition with a real type.
2904 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2906 * gcc.dg/graphite/pr39260.c: New.
2908 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2910 * graphite-poly.c: Inlcude params.h.
2911 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2913 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2914 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2916 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2917 Tobias Grosser <grosser@fim.uni-passau.de>
2919 * graphite-scop-detection.c (dot_all_scops_1,
2920 dot_all_scops): Moved here.
2921 * graphite-scop-detection.h (dot_all_scops): Declared here.
2922 * graphite.c (graphite_initialize, graphite_finalize): New.
2923 (graphite_transform_loops): Cleaned up.
2924 * sese.c (debug_oldivs): Moved here.
2925 * graphite-poly.c (graphite_apply_transformations): Renamed
2926 apply_poly_transforms.
2927 (debug_loop_vec): Moved here.
2928 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2929 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2930 find_scop_parameters, build_scop_iteration_domain,
2931 add_conditions_to_constraints, build_scop_canonical_schedules,
2932 build_scop_data_accesses): Now static.
2933 (build_poly_scop, check_poly_representation): New.
2935 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2937 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2938 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2939 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2940 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2941 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2942 scan_tree_for_params, struct irp_data, dx_record_params,
2943 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2944 build_loop_iteration_domains, add_conditions_to_domain,
2945 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2946 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2947 build_sese_conditions, add_conditions_to_constraints,
2948 build_scop_iteration_domain, build_access_matrix_with_af,
2949 build_access_matrix,
2950 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2952 * graphite-sese-to-poly.c: New.
2953 * graphite-sese-to-poly.h: New.
2955 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2957 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2959 * graphite.c: Split graphite code generation to a new file.
2960 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2961 max_precision_type, clast_to_gcc_expression_red,
2962 clast_to_gcc_expression, gcc_type_for_clast_expr,
2963 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2964 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2965 graphite_create_new_guard, clast_get_body_of_loop,
2966 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2967 graphite_create_new_loop, build_iv_mapping, copy_renames,
2968 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2969 compute_cloog_iv_types, free_scattering, save_var_name,
2970 initialize_cloog_names, build_scop_context, build_cloog_prog,
2971 set_cloog_options, debug_clast_stmt, scop_to_clast,
2972 print_generated_program, debug_generated_program,
2973 gloog): Moved to graphite-clast-to-gimple.c.
2975 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2977 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2978 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2979 loop_iv_stack_pop, loop_iv_stack_get_iv,
2980 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2981 free_loop_iv_stack, loop_iv_stack_remove_constants,
2982 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2983 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2984 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2985 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2986 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2987 get_vdef_before_sese, sese_adjust_vphi,
2988 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2989 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2990 is_iv, expand_scalar_variables_ssa_name,
2991 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2992 expand_scalar_variables, rename_variables, remove_condition,
2993 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2994 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2995 default_liveout_before_guard, add_guard_exit_phis,
2996 insert_guard_phis, register_old_and_new_names,
2997 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2998 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2999 if_region_set_false_region, create_if_region_on_edge,
3000 move_sese_in_condition): Moved to sese.c.
3002 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
3003 if_region_exit, if_region_get_condition_block,
3004 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
3005 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
3006 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
3007 ivtype_map_elt, new_ivtype_map_elt,
3008 recompute_all_dominators): Moved to sese.h.
3010 * graphite-clast-to-gimple.c: New.
3011 * graphite-clast-to-gimple.h: New.
3012 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
3013 * sese.c: Modified as said above.
3016 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
3018 * graphite.c: Split scop detection to a new file.
3019 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
3020 move_sd_regions, loop_affine_expr, exclude_component_ref,
3021 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
3022 graphite_cannot_represent_loop_niter, struct scopdet_info,
3023 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
3024 find_single_entry_edge, find_single_exit_edge,
3025 create_single_entry_edge, sd_region_without_exit,
3026 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
3027 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
3028 Moved to graphite-scop-detection.c.
3030 * graphite-scop-detection.c: New.
3031 * graphite-scop-detection.h: New.
3032 * Makefile.in: Add new rule for graphite-scop-detection.o.
3034 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
3035 tree-scalar-evolution.h.
3036 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
3037 build_sese_loop_nests): Moved here from graphite.c.
3038 (param_index): Renamed parameter_index_in_region.
3040 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3041 Sebastian Pop <sebastian.pop@amd.com>
3043 * gcc.dg/graphite/block-0.c: Expected to fail now.
3044 * gcc.dg/graphite/block-1.c: Same.
3045 * gcc.dg/graphite/block-5.c: Same.
3046 * gcc.dg/graphite/block-6.c: Same.
3048 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
3049 Sebastian Pop <sebastian.pop@amd.com>
3051 * graphite.h: Separate from graphite_bb_p the polyhedral
3052 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
3053 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
3054 graphite-data-ref.h.
3055 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
3056 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
3057 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
3058 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
3059 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
3060 scop_nb_params): Moved to graphite-poly.h.
3061 * graphite-data-ref.c: Same.
3062 * graphite-data-ref.h: New.
3064 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
3065 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
3066 is_interchange_valid, graphite_trans_bb_block,
3067 graphite_trans_loop_block, scop_max_loop_depth,
3068 graphite_trans_scop_block, graphite_apply_transformations,
3069 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
3071 * graphite-poly.h: New.
3072 * graphite-poly.c: New.
3073 * Makefile.in (OBJS-common): Add graphite-poly.o.
3074 (graphite-poly.o): New rule.
3075 * tree-data-ref.h (struct data_reference): Remove unused scop field.
3078 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3079 Tobias Grosser <grosser@fim.uni-passau.de>
3081 * graphite.c: Replace gb -> gbb.
3083 * graphite-data-ref.c: Same.
3085 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
3086 Tobias Grosser <grosser@fim.uni-passau.de>
3088 * Makefile.in (OBJS-commmon): Add sese.o.
3090 (graphite.o): Add sese.h.
3091 * graphite.c (bb_in_ss_p, loop_in_sese_p,
3092 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
3093 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3095 (block_before_scop): Add missing return.
3096 (new_scop, free_scop): Remove SESE data structures.
3097 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3098 find_scop_parameters, build_loop_iteration_domains,
3099 add_conditions_to_domain, register_scop_liveout_renames,
3100 copy_bb_and_scalar_dependences): Scop -> SESE.
3102 (add_conditions_to_domain): SCoP -> SESE and remove check
3103 (scop_contains_non_iv_scalar_phi_nodes): New.
3104 (build_scop_conditions_1, build_scop_conditions): Remove check for
3105 non iv scalar phi nodes.
3106 (print_scop_statistics): New.
3107 (graphite_transform_loops): Cleanup.
3109 * graphite.h: Move to sese & cleanup.
3113 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3114 Tobias Grosser <grosser@fim.uni-passau.de>
3116 * graphite.c (build_scop_conditions_1): Conditions are only
3117 at the end of a basic block.
3119 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3120 Tobias Grosser <grosser@fim.uni-passau>
3122 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3124 (GBB_ALPHA): Removed.
3126 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3127 Tobias Grosser <grosser@fim.uni-passau.de>
3129 * graphite-data-ref.c (graphite_test_dependence): Don't use
3130 GBB_DYNAMIC_SCHEDULE.
3131 * graphite.c (new_graphite_bb): Same.
3132 (free_graphite_bb): Same.
3133 (build_scop_dynamic_schedules): Removed.
3134 (graphite_transform_loops): Don't call it.
3135 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3136 (GBB_DYNAMIC_SCHEDULE): Removed.
3138 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3139 Tobias Grosser <grosser@fim.uni-passau.de>
3141 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3142 (print_graphite_bb): Same.
3143 (build_cloog_prog): Same.
3145 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3146 Tobias Grosser <grosser@fim.uni-passau.de>
3148 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3150 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3151 Tobias Grosser <grosser@fim.uni-passau.de>
3153 * graphite.c (build_scop_context): Don't use CloogMatrix.
3154 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3155 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3157 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3158 Tobias Grosser <grosser@fim.uni-passau.de>
3160 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3161 liveout_renames, add_params fields...
3162 (struct sese): ... here.
3163 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3164 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3166 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3167 Tobias Grosser <grosser@fim.uni-passau.de>
3169 * graphite.c (print_scop): Do not print the CLooG program.
3170 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3171 build_cloog_prog, gloog): Don't use SCOP_PROG.
3172 (find_transform): Renamed scop_to_clast.
3173 (print_generated_program, debug_generated_program): New.
3174 (graphite_transform_loops): Adapt to new interface.
3175 * graphite.h (struct scop): Remove program field.
3176 (SCOP_PROG): Removed.
3177 (print_generated_program, debug_generated_program): Declared.
3179 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3181 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3182 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3183 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3184 free_graphite_bb, build_scop_canonical_schedules,
3185 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3186 schedules are now represented using a ppl_Linear_Expression_t.
3187 * graphite.h (struct graphite_bb): Same.
3188 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3189 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3191 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3193 * graphite.c: Free local memory.
3194 * graphite-ppl.c: Same.
3196 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3198 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3199 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3200 swap_constraint_variables, scale_constraint_variable): Removed.
3201 (graphite_trans_bb_strip_mine): Remove pong.
3202 * graphite-ppl.c: Include missing header files.
3203 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3204 * graphite-ppl.h (ppl_strip_loop): Declared.
3205 * Makefile.in (graphite-ppl.o): Adjust dependences.
3207 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3209 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3210 (build_scop_iteration_domain): Same.
3212 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3214 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3216 (add_value_to_dim, scan_tree_for_params_right_scev,
3217 scan_tree_for_params_int): New.
3218 * graphite-ppl.c (oppose_constraint): New.
3219 (insert_constraint_into_matrix): Implement missing cases.
3220 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3222 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3224 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3225 use ppl_move_dimension.
3227 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3229 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3232 * graphite-ppl.c: Same.
3233 * graphite-ppl.h: Same.
3235 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3237 Revert last 3 commits.
3239 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3241 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3243 (add_value_to_dim, scan_tree_for_params_right_scev,
3244 scan_tree_for_params_int): New.
3245 * graphite-ppl.c (oppose_constraint): New.
3246 (insert_constraint_into_matrix): Implement missing cases.
3247 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3249 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3251 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3253 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3254 Tobias Grosser <grosser@fim.uni-passau.de>
3256 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3257 use ppl_move_dimension.
3258 * graphite-ppl.c (ppl_move_dimension): New.
3259 * graphite-ppl.h (ppl_move_dimension): Declared.
3261 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3263 * graphite.c: Do not include cloog/cloog.h.
3264 (print_graphite_bb): Remove ping pong, call PPL print function.
3266 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3268 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3269 (graphite.o): Add dependence on graphite-ppl.h.
3270 (graphite-ppl.o): New.
3271 (graphite-data-ref.c): Ping pong between PPL data structures
3273 * graphite-ppl.c: New.
3274 * graphite-ppl.h: New.
3275 * graphite.c: Include graphite-ppl.h.
3276 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3277 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3278 Ping pong between PPL data structures and matrices.
3279 (new_graphite_bb): Create a PPL constraint system.
3280 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3281 (build_loop_iteration_domains): Use PPL functions.
3282 * graphite.h: Include graphite-ppl.h. Fix comments.
3283 (graphite_bb): Use a ppl_Constraint_System_t instead of
3284 CloogMatrix for representing the domain.
3285 (scop): Remove static_schedule.
3286 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3288 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3290 * graphite.c: Fix some comments.
3292 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3295 * graphite.c (if_region_set_false_region): After moving a region
3296 in the false branch of a condition, remove the empty dummy
3298 (gloog): Remove wrong fix for PR38953.
3300 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3302 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3303 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3304 register_bb_in_sese, new_sese, free_sese): Moved.
3305 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3306 outermost_loop_in_scop, build_scop_iteration_domain,
3307 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3308 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3309 Use loop_in_sese_p instead of loop_in_scop_p.
3310 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3311 (free_scop): Do not free SCOP_BBS_B.
3312 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3313 ref_nb_loops): Moved here...
3314 * graphite.h (ref_nb_loops): ... from here.
3315 (struct scop): Remove bbs_b bitmap.
3316 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3317 * testsuite/gcc.dg/graphite/scop-19.c: New
3319 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3321 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3324 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3326 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3327 eq_loop_to_cloog_loop): Remove.
3328 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3329 * graphite.h (struct scop): Remove loop2cloog_loop.
3330 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3332 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3334 * opts.c (decode_options): Only add graphite options to O2
3335 if we compile with graphite enabled.
3337 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3339 * Merge from mainline (r143163:143684).
3341 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3343 * graphite.c (debug_value): Removed.
3344 * graphite.h (debug_value): Removed.
3346 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3348 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3349 after graphite: pass_copy_prop does not maintain a proper loop closed
3350 SSA form. pass_copy_prop should be fixed.
3352 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3354 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3356 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3358 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3359 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3360 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3363 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3365 * graphite.c (gloog): Return true when code gen succeeded.
3366 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3367 the code of the function did not changed. After cleanup_tree_cfg
3368 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3371 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3373 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3374 gimple_call_lhs is NULL.
3376 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3377 Tobias Grosser <tobi.grosser@amd.com>
3379 * graphite.c (graphite_trans_scop_block): Do not block single
3382 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3383 Tobias Grosser <tobi.grosser@amd.com>
3385 * graphite.c (build_scop_canonical_schedules): Start schedules at
3388 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3389 Tobias Grosser <tobi.grosser@amd.com>
3391 * graphite.c (compare_prefix_loops): New.
3392 (build_scop_canonical_schedules): Rewritten.
3393 (graphite_transform_loops): Move build_scop_canonical_schedules
3394 after build_scop_iteration_domain.
3396 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3397 Tobias Grosser <tobi.grosser@amd.com>
3399 * graphite.c (add_conditions_to_domain): Add the loops to
3400 the dimension of the iteration domain. Do copy the domain
3401 only when it exists.
3402 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3403 (add_conditions_to_constraints): New.
3404 (can_generate_code_stmt, can_generate_code): Removed.
3405 (gloog): Do not call can_generate_code.
3406 (graphite_transform_loops): Call add_conditions_to_constraints
3407 after building the iteration domain.
3409 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3410 Tobias Grosser <tobi.grosser@amd.com>
3411 Jan Sjodin <jan.sjodin@amd.com>
3413 * graphite.c (scan_tree_for_params): On substractions negate
3414 all the coefficients of the term.
3415 (clast_to_gcc_expression_red): New. Handle reduction expressions
3416 of more than two operands.
3417 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3418 (get_vdef_before_scop): Handle also the case of default definitions.
3420 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3423 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3424 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3425 (gloog): Do not call cleanup_tree_cfg.
3426 (graphite_transform_loops): Call cleanup_tree_cfg after all
3427 scops have been code generated.
3429 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3431 * passes.c (init_optimization_passes): Schedule after
3432 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3434 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3436 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3438 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3439 Set the type of an expression to the type of its assign statement.
3440 (expand_scalar_variables_expr): Do not pass loop_p.
3441 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3442 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3443 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3445 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3447 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3448 an expression to the gimple_expr_type of its assign statement.
3449 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3452 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3454 PR tree-optimization/38786
3455 * testsuite/gcc.dg/graphite/pr38786.c: New.
3456 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3457 the SSA_NAME case of expand_scalar_variables_expr.
3458 (expand_scalar_variables_expr): Also gather the scalar computation
3459 used to index the memory access.
3460 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3461 the gimple_stmt_iterator where it inserts new code.
3463 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3465 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3467 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3469 * opts.c (decode_options): Enable flag_graphite_identity and
3470 flag_loop_block in -O2 and above.
3472 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3474 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3475 Fix merge problem: replace with the file from trunk.
3477 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3479 * Merge from mainline (r141727:143163).
3481 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3482 Jan Sjodin <jan.sjodin@amd.com>
3484 PR tree-optimization/38559
3485 * testsuite/gcc.dg/graphite/pr38559.c: New.
3487 * graphite.c (debug_value, copy_constraint,
3488 swap_constraint_variables, scale_constraint_variable, ): New.
3489 (get_lower_bound, get_upper_bound): Removed.
3490 (graphite_trans_bb_strip_mine): Clean up this code that works
3491 only for constant number of iterations. Fully copy upper and
3492 lower bound constraints, not only the constant part of them.
3493 * graphite.h (debug_value): Declared.
3495 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3497 PR tree-optimization/38492
3498 PR tree-optimization/38498
3499 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3500 * tree-chrec.h (scev_is_linear_expression): Declared.
3501 * graphite.c (graphite_cannot_represent_loop_niter): New.
3502 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3503 (graphite_loop_normal_form): Use gcc_assert.
3504 (scan_tree_for_params): Use CASE_CONVERT.
3505 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3506 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3507 Use gcc_assert. Discard scops that contain unhandled cases.
3508 (build_scop_conditions): Return a boolean status for unhandled cases.
3509 (strip_mine_profitable_p): Print the loop number, not its depth.
3510 (is_interchange_valid): Pass the depth of the loop nest, don't
3511 recompute it wrongly.
3512 (graphite_trans_bb_block): Same.
3513 (graphite_trans_bb_block): Print tentative of loop blocking.
3514 (graphite_trans_scop_block): Do not print that the loop has been
3516 (graphite_transform_loops): Do not handle scops that contain condition
3519 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3521 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3522 * testsuite/gcc.dg/graphite/block-1.c: Same.
3523 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3525 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3526 * testsuite/gcc.dg/graphite/block-3.c: New.
3527 * testsuite/gcc.dg/graphite/pr38498.c: New.
3529 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3531 PR tree-optimization/38510
3532 * gcc.dg/graphite/pr38510.c: New.
3533 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3534 (translate_clast): Call recompute_all_dominators before
3536 (gloog): Call recompute_all_dominators before graphite_verify.
3538 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3540 PR tree-optimization/38492
3541 * graphite.c (rename_map_elt, debug_rename_elt,
3542 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3543 rename_map_elt_info, eq_rename_map_elts,
3544 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3545 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3546 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3547 (sese_build_livein_liveouts): New.
3548 (new_sese, free_sese): New.
3549 (new_scop): Call new_sese.
3550 (free_scop): Call free_sese.
3551 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3552 (register_old_new_names): Renamed register_old_and_new_names.
3553 (register_scop_liveout_renames, add_loop_exit_phis,
3554 insert_loop_close_phis, struct igp,
3555 default_liveout_before_guard, add_guard_exit_phis,
3556 insert_guard_phis, copy_renames): New.
3557 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3558 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3559 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3560 (scop_adjust_phis_for_liveouts): New.
3561 (gloog): Call scop_adjust_phis_for_liveouts.
3563 * graphite.h (struct sese): Documented. Added fields liveout,
3565 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3566 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3567 (struct scop): Added field liveout_renames.
3568 (SCOP_LIVEOUT_RENAMES): New.
3570 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3572 PR tree-optimization/38409
3573 * gcc.dg/graphite/pr38409.c: New.
3574 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3576 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3578 * graphite.c (gcc_type_for_cloog_iv): By default return
3580 (graphite_create_new_loop): Don't fold_convert the already
3581 fold_convert-ed expression.
3583 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3585 PR tree-optimization/38446
3586 * gcc.dg/graphite/pr38446.c: New.
3587 * graphite.c (register_bb_in_sese): New.
3588 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3589 looking at the bbs in the region.
3590 * graphite.h (sese): Add region_basic_blocks pointer set to
3591 structure and initialize at the time of defining new scop.
3593 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3595 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3596 (find_params_in_bb): Do not free data refs.
3597 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3599 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3601 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3602 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3603 * testsuite/gcc.dg/graphite/block-5.c: New.
3604 * testsuite/gcc.dg/graphite/block-6.c: New.
3605 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3606 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3607 * testsuite/gcc.dg/graphite/block-2.c: Same.
3609 * graphite.c (struct ivtype_map_elt): New.
3610 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3611 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3612 gcc_type_for_cloog_iv): New.
3613 (loop_iv_stack_patch_for_consts): Use the type of the induction
3614 variable from the original loop, except for the automatically
3615 generated loops, i.e., in the case of a strip-mined loop, in
3616 which case there is no original loop: in that case just use
3618 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3619 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3620 (clast_name_to_gcc): Accept params to be NULL.
3621 (clast_to_gcc_expression): Take an extra parameter for the type.
3622 Convert to that type all the expressions built by this function.
3623 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3624 (graphite_translate_clast_equation): Compute the type of the
3625 clast_equation before translating its LHS and RHS.
3626 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3627 (graphite_create_new_loop): Compute the type of the induction
3628 variable before translating the lower and upper bounds and before
3629 creating the induction variable.
3630 (rename_variables_from_edge, rename_phis_end_scop): New.
3631 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3632 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3633 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3634 compute_cloog_iv_types): New.
3635 (gloog): Call compute_cloog_iv_types before starting the
3636 translation of the clast.
3638 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3639 (GBB_CLOOG_IV_TYPES): New.
3640 (debug_ivtype_map): Declared.
3641 (oldiv_for_loop): New.
3643 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3646 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3647 (param_index): Assert if parameter is not know after parameter
3649 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3650 (find_scop_parameters): Mark, that we have finished parameter
3652 (graphite_transform_loops): Move condition detection before parameter
3654 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3655 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3657 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3659 * graphite.c (graphite_transform_loops): Always call find_transform ()
3660 in ENABLE_CHECKING. So we test these code paths, even if we do not
3663 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3665 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3666 (print_scop): Ditto.
3668 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3671 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3672 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3673 regions more than once.
3675 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3677 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3678 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3681 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3683 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3684 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3685 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3686 (max_precision_type): New.
3687 (value_clast): Removed.
3688 (clast_to_gcc_expression): Be more careful to types of expressions.
3689 Use max_precision_type and update use of gmp_cst_to_tree.
3690 (graphite_translate_clast_equation): Use max_precision_type.
3691 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3692 use the type of the condition.
3693 (graphite_create_new_loop): Do not use integer_type_node, use the
3694 max_precision_type of lb and ub.
3696 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3698 * graphite.c (build_scops_1): Initialize open_scop.exit
3701 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3703 * testsuite/gcc.dg/graphite/pr38084.c: New.
3704 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3705 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3706 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3707 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3708 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3710 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3711 Jan Sjodin <jan.sjodin@amd.com>
3712 Harsha Jagasia <harsha.jagasia@amd.com>
3724 * testsuite/gcc.dg/graphite/pr38073.c: New.
3725 * testsuite/gcc.dg/graphite/pr37928.c: New.
3726 * testsuite/gcc.dg/graphite/pr37883.c: New.
3727 * testsuite/gcc.dg/graphite/pr38125.c: New.
3728 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3729 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3730 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3732 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3733 the number of detected scops. Copy exact same test for loop
3735 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3736 loops to be blocked as reductions are not handled.
3737 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3739 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3740 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3742 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3743 * Makefile.in (graphite.o): Depend on value-prof.h.
3744 (graphite.o-warn): Removed -Wno-error.
3745 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3746 to be a NULL pointer. Call update_stmt. Return the newly created
3747 cannonical induction variable.
3749 * graphite.h (debug_rename_map): Declared. Fix some comments.
3751 * graphite.c: Reimplement the code generation from graphite to gimple.
3752 Include value-prof.h.
3753 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3754 (get_old_iv_from_ssa_name): Removed.
3755 (graphite_stmt_p): New.
3756 (new_graphite_bb): Test for useful statements before building a
3757 graphite statement for the basic block.
3758 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3759 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3761 (recompute_all_dominators, graphite_verify,
3762 nb_reductions_in_loop, graphite_loop_normal_form): New.
3763 (scop_record_loop): Call graphite_loop_normal_form.
3764 (build_scop_loop_nests): Iterate over all the blocks of the
3765 function instead of relying on the incomplete information from
3766 SCOP_BBS. Return the success of the operation.
3767 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3768 (add_bb_domains): Removed.
3769 (build_loop_iteration_domains): Don't call add_bb_domains.
3770 Add the iteration domain only to the basic blocks that have been
3771 translated to graphite.
3772 (build_scop_conditions_1): Add constraints only if the basic
3773 block have been translated to graphite.
3774 (build_scop_data_accesses): Completely disabled until data
3775 dependence is correctly implemented.
3776 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3777 (remove_all_edges_1, remove_all_edges): Removed.
3778 (get_new_name_from_old_name): New.
3779 (graphite_rename_variables_in_stmt): Renamed
3780 rename_variables_in_stmt. Call get_new_name_from_old_name.
3781 Use replace_exp and update_stmt.
3782 (is_old_iv): Renamed is_iv.
3783 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3784 Use replace_exp and update_stmt.
3785 (expand_scalar_variables_expr): Same. Use the map to get the
3786 new names for the renaming of induction variables and for the
3787 renaming of variables after a basic block has been copied.
3788 (expand_scalar_variables): Same.
3789 (graphite_rename_variables): Renamed rename_variables.
3790 (move_phi_nodes): Removed.
3791 (get_false_edge_from_guard_bb): New.
3792 (build_iv_mapping): Do not insert the induction variable of a
3793 loop in the renaming iv map if the basic block does not belong
3795 (register_old_new_names, graphite_copy_stmts_from_block,
3796 copy_bb_and_scalar_dependences): New.
3797 (translate_clast): Heavily reimplemented: copy basic blocks,
3798 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3799 At each translation step call graphite_verify ensuring the
3800 consistency of the SSA, loops and dominators information.
3801 (collect_virtual_phis, find_vdef_for_var_in_bb,
3802 find_vdef_for_var_1, find_vdef_for_var,
3803 patch_phis_for_virtual_defs): Removed huge hack.
3804 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3805 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3806 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3807 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3808 if_region_get_condition_block, if_region_set_false_region,
3809 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3810 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3811 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3812 rewrite_into_sese_closed_ssa): New.
3813 (gloog): Remove dead code. Early return if code cannot be
3814 generated. Call cleanup_tree_cfg once the scop has been code
3816 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3817 block loops with less than two loops.
3818 (graphite_apply_transformations): Remove the call to
3819 scop_remove_ignoreable_gbbs.
3820 (limit_scops): When build_scop_loop_nests fails, continue on
3821 the next scop. Fix open_scop.entry.
3822 (graphite_transform_loops): Call recompute_all_dominators: force the
3823 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3824 Call initialize_original_copy_tables and free_original_copy_tables
3825 to be able to copy basic blocks during code generation.
3826 When build_scop_loop_nests fails, continue on next scop.
3827 (value_clast): New union.
3828 (clast_to_gcc_expression): Fix type cast warning.
3830 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3832 * Merge from mainline (r140838:141727).
3834 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3838 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3840 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3844 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3845 exits and conditions.
3846 * testsuite/gcc.dg/graphite/pr37943.c: New.
3848 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3851 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3853 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3855 * doc/invoke.texi: Fix spaces.
3857 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3859 PR tree-optimization/37891
3860 Reverted last commit.
3861 * graphite.c (create_single_entry_edge): Set
3862 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3864 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3865 Mitul Thakkar <mitul.thakkar@amd.com>
3867 * graphite.c (create_single_entry_edge): Set
3868 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3870 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3872 * doc/invoke.texi: Add -fgraphite-identity.
3873 * graphite.c (graphite_apply_transformations): Check for
3874 -fgraphite-identity.
3875 * toplev.c (process_options): Add flag_graphite_identity.
3876 * tree-ssa-loop.c: Add flag_graphite_identity.
3878 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3880 Undo changes from 2008-10-02:
3881 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3882 operand type when copying the operand to a variable of different type.
3883 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3884 with the IV name after increment.
3886 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3887 Harsha Jagasia <harsha.jagasia@amd.com>
3889 PR tree-optimization/37828
3890 * testsuite/gcc.dg/graphite/pr37828.c: New.
3891 * graphite.c (graphite_trans_loop_block): Do not loop block
3892 single nested loops.
3894 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3895 Sebastian Pop <sebastian.pop@amd.com>
3897 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3898 rename_map_elt_info, eq_rename_map_elts): New.
3899 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3900 (expand_scalar_variables_expr): Change parameters.
3901 (expand_scalar_variables_stmt): Same.
3902 (expand_scalar_variables): Same.
3903 (graphite_rename_ivs): Rename graphite_rename_variables.
3904 (build_iv_mapping): New.
3905 (translate_clast): Call build_iv_mapping.
3906 * graphite.h (gbb_p): New name.
3908 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3910 PR tree-optimization/37684