1 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-ppl.c (ppl_min_for_le_polyhedron): New.
4 * graphite-ppl.h (graphite-ppl.h): Declared.
6 2009-10-17 Sebastian Pop <sebastian.pop@amd.com>
8 * graphite-ppl.c (ppl_print_linear_expr): New.
9 (debug_ppl_linear_expr): New.
10 * graphite-ppl.h (ppl_print_linear_expr): Declared.
11 (debug_ppl_linear_expr): Declared.
13 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
15 * graphite-interchange.c: Fix comments.
16 * gcc.dg/graphite/block-1.c: Fix comments.
18 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
20 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
21 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
23 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
25 Reapply the patch from Alexander Monakov that disappeared during
26 the last merges from trunk.
28 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
30 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
31 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
33 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
35 * graphite-interchange.c (memory_stride_in_loop): The depth
36 argument corresponds to a dynamic time dimension, so use
37 psct_dynamic_dim to refer to the transformed scattering dimension.
39 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
41 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
43 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
45 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
47 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
49 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
51 (print_lst): Print the root of LST in a different format.
52 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
54 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
56 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
58 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
60 * doc/passes.texi: Document the Graphite infrastructure.
62 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
64 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
65 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
66 and check the SSA representation.
68 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
70 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
72 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
74 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
76 * gcc.dg/graphite/interchange-11.c: New.
78 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
80 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
82 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
84 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
85 Add -fno-loop-strip-mine and -fno-loop-interchange.
86 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
88 * gfortran.dg/graphite/graphite.exp: Same.
90 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
92 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
93 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
94 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
95 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
96 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
97 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
98 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
99 DEFAULT_FLAGS_GRAPHITE_SCOP.
100 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
101 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
103 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
105 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
107 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
108 Sebastian Pop <sebastian.pop@amd.com>
110 * graphite-interchange.c (build_linearized_memory_access): Pass an
112 (memory_stride_in_loop): Include transform scattering in the
113 access functions to be able to querry the strides in the
115 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
116 not the psct_iterator_dim.
118 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
120 * graphite-blocking.c (pbb_do_strip_mine): Removed.
121 (lst_do_strip_mine_loop): New.
122 (lst_do_strip_mine): New.
123 (scop_do_strip_mine): Call lst_do_strip_mine.
124 * graphite-poly.h (lst_add_loop_under_loop): New.
125 (lst_find_first_pbb): New.
127 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
129 * graphite-poly.c (loop_to_lst): Fix LST creation.
131 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
133 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
134 sizeof(unsigned long) to make it run on 32bit systems.
136 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
138 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
141 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
143 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
145 (write_alias_graph_to_ascii_dot): New.
146 (write_alias_graph_to_ascii_ecc): Ditto.
147 (partition_drs_to_sets): Add testing of optimality of current method
148 which assigns alias numbers according to DFS Comopnent number. used
149 as heuristic for the upcoming ECC algorithm.
150 (build_scop_drs): Write to file also with the ecc and dot format.
152 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
154 * gfortran.dg/graphite/interchange-1.f: XFail.
156 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
158 * graphite.c (graphite_initialize): Do not handle functions with
159 more than 100 basic blocks.
161 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
163 * graphite-blocking.c (pbb_do_strip_mine): Use
164 PARAM_LOOP_BLOCK_TILE_SIZE.
166 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
168 * graphite-poly.c (dot_lst_1): New.
170 * graphite-poly.h (dot_lst): Declared.
172 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
174 * graphite-dependences.c (dot_deps_stmt_1): New.
175 (dot_deps_stmt): New.
176 * graphite-dependences.h (dot_deps_stmt): Declared.
178 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
180 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
181 not replace cross BB scalar dependences ending on PHI nodes.
182 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
184 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-poly.c (apply_poly_transforms): Implement the high
187 level driver for flag_loop_block.
188 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
191 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
193 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
196 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
198 * graphite-poly.h (lst_find_pbb): New.
199 (find_lst_loop): New.
201 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
203 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
204 * graphite-poly.h (struct scop): Remove dep_graph field.
205 (SCOP_DEP_GRAPH): Removed.
207 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
209 * graphite-poly.h (copy_lst): Do full copy of LST.
211 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
213 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
214 when the loop stride is zero.
216 * gcc.dg/graphite/id-16.c: New.
218 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
220 * graphite-dependences.c (reduction_dr_1): New.
221 (reduction_dr_p): New.
222 (graphite_legal_transform_dr): Call reduction_dr_p.
223 (reduction_ddr): Renamed reduction_ddr_p.
224 * graphite-poly.h (same_pdr_p): New.
225 (number_of_write_pdrs): New.
226 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
227 (split_reduction_stmt): Do not split reduction statements
228 when there are no writes to memory.
229 (translate_scalar_reduction_to_array_for_stmt): Insert the
230 memory reduction statement just after the scalar reduction statement.
232 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
234 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
235 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
237 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
239 * graphite-interchange.c (lst_apply_interchange): New.
240 (lst_interchange_profitable_p): New.
241 (lst_try_interchange_loops): New.
242 (lst_try_interchange): New.
243 (lst_do_interchange): New.
244 (pbb_do_interchange): Removed.
245 (scop_do_interchange): Call lst_do_interchange.
247 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
249 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
250 SCOP_TRANSFORMED_SCHEDULE.
255 * graphite-poly.h (lst_p): New.
258 (LST_LOOP_FATHER): New.
261 (scop_to_lst): Declared.
262 (print_lst): Declared.
263 (debug_lst): Declared.
268 (lst_dewey_number): New.
269 (struct scop): Add original_schedule and transformed_schedule fields.
270 (SCOP_ORIGINAL_SCHEDULE): New.
271 (SCOP_TRANSFORMED_SCHEDULE): New.
272 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
274 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
276 * graphite-dependences.c (reduction_ddr): New.
277 (graphite_legal_transform_bb): Call reduction_ddr.
278 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
279 Initialize PBB_IS_REDUCTION.
280 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
281 (PBB_IS_REDUCTION): New.
282 (new_poly_bb): Update declaration.
283 * graphite-scop-detection.h (build_scop_bbs): Removed.
284 (nb_reductions_in_loop): Removed.
285 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
286 parameter for reductions.
287 (try_generate_gimple_bb): Update call to new_poly_bb.
288 (build_scop_bbs_1): Same.
289 (build_scop_bbs): Same.
290 (gsi_for_phi_node): New.
291 (scalar_close_phi_node_p): Remove gcc_assert.
292 (split_reduction_stmt): New.
293 (is_reduction_operation_p): New.
294 (phi_contains_arg): New.
295 (follow_ssa_with_commutative_ops): New.
296 (detect_commutative_reduction_arg): New.
297 (detect_commutative_reduction_assign): New.
298 (follow_inital_value_to_phi): New.
299 (edge_initial_value_for_loop_phi): New.
300 (initial_value_for_loop_phi): New.
301 (detect_commutative_reduction): New.
302 (translate_scalar_reduction_to_array_for_stmt): New.
303 (insert_copyout): New.
304 (insert_copyin): New.
305 (translate_scalar_reduction_to_array): New.
306 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
307 (rewrite_commutative_reductions_out_of_ssa_loop): New.
308 (rewrite_commutative_reductions_out_of_ssa): New.
309 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
310 * sese.h (split_region_for_bb): New.
312 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
313 * gcc.dg/graphite/interchange-1.c: Fix format.
314 * gcc.dg/graphite/interchange-10.c: New.
316 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
318 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
321 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
323 * graphite-sese-to-poly.c (scev_analyzable_p): New.
324 (rewrite_cross_bb_scalar_dependence): New.
325 (rewrite_cross_bb_scalar_deps): New.
326 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
327 Call rewrite_cross_bb_scalar_deps.
329 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
331 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
332 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
335 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
337 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
338 * graphite-interchange.c (pbb_do_interchange): Same.
339 * graphite-poly.c (print_scattering_function): Same.
341 * graphite-poly.h (pbb_loop): New.
342 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
344 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
346 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
348 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
350 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
351 so don't pass a pointer to it.
352 (build_alias_set_for_drs): Same.
353 (build_base_obj_set_for_drs): Same.
354 (build_scop_drs): Same.
356 2009-09-26 Li Feng <nemokingdom@gmail.com>
358 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
359 the alias graph of data references.
361 2009-09-25 Li Feng <nemokingdom@gmail.com>
363 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
364 (build_scop_drs): When debugging, write the alias graph to file,
365 otherwise, should be disabled.
367 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
369 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
370 (is_simple_operand): Remove call to stmt_simple_memref_p.
371 (stmt_simple_for_scop_p): Update call to is_simple_operand.
373 2009-09-17 David Edelsohn <edelsohn@gnu.org>
375 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
376 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
377 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
378 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
379 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
381 2009-09-17 Li Feng <nemokingdom@gmail.com>
384 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
385 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
386 (graphite_carried_dependence_level_k): Ditto.
387 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
388 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
389 (new_poly_dr): Adjust declaration.
390 * graphite-sese-to-poly.c (free_data_refs_aux): New.
391 (free_gimple_bb): Added free_data_refs_aux.
392 (build_poly_dr): Add dr_base_object_set.
393 (partition_drs_to_sets): New.
394 (dr_same_base_object_p): New.
395 (build_alias_set_for_drs): New.
396 (build_base_object_set_for_drs): New.
397 (build_scop_drs): Add build_base_obj_set_for_drs.
398 * graphite-sese-to-poly.h: Added #define for alias set number index and
399 base object set index.
400 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
401 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
403 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
405 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
406 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
408 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
410 * graphite-sese-to-poly.c (struct irp_data): Removed.
411 (idx_record_params): Removed.
412 (find_params_in_bb): Scan for parameters the access functions; don't
413 parse the tree representation.
415 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
417 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
418 passes at -O1 and below.
420 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
422 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
423 tree-scalar-evolution.h, and then tree-data-ref.h.
424 * graphite-clast-to-gimple.c: Same.
425 * graphite-dependences.c: Same.
426 * graphite-interchange.c: Same.
427 * graphite-poly.c: Same.
428 * graphite-scop-detection.c: Same.
429 * graphite-sese-to-poly.c: Same.
431 * lambda-code.c: Same.
432 * matrix-reorg.c: Same.
433 * tree-data-ref.c: Same.
434 * tree-if-conv.c: Same.
435 * tree-loop-distribu: Same.: Same.
436 * tree-loop-linear.c: Same.
437 * tree-parloops.c: Same.
438 * tree-predcom.c: Same.
439 * tree-vect-patterns.c: Same.
441 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
443 Partially revert the previous patch, except the following.
444 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
445 as parameters the operands of the not expression.
447 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
449 * tree-scalar-evolution.c (instantiate_scev_assign): New.
450 Do not call analyze_scalar_evolution on assignments.
451 (instantiate_scev_phi): Call analyze_scalar_evolution.
452 (instantiate_scev_name): Call instantiate_scev_assign and
453 instantiate_scev_phi.
454 (instantiate_scev_not): Adapted to pass as parameters the operands
455 of the not expression.
457 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
459 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
460 to pass as parameters the operands of the binary expression.
462 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
464 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
465 instantiate_scev_not. Handle NEGATE_EXPR.
466 (instantiate_scev_r): Handle NEGATE_EXPR.
468 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
470 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
472 (instantiate_scev_r): Move code in instantiate_scev_2
473 and instantiate_scev_1.
475 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
477 * tree-scalar-evolution.c (instantiate_scev_3): New.
478 (instantiate_scev_1): Move code in instantiate_scev_3.
480 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
482 * tree-scalar-evolution.c (instantiate_scev_poly): New.
483 (instantiate_scev_1): Move code in instantiate_scev_poly.
485 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
487 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
488 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
490 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
492 * tree-scalar-evolution.c (instantiate_scev_convert): New.
493 (instantiate_scev_1): Move code in instantiate_scev_convert.
495 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
497 * tree-scalar-evolution.c (instantiate_scev_binary): New.
498 (instantiate_scev_1): Move code in instantiate_scev_binary.
500 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
502 * tree-scalar-evolution.c (instantiate_scev_name): New.
503 (instantiate_scev_1): Move code in instantiate_scev_name.
505 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
507 * Merge from mainline (150992:151171).
509 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
511 * graphite-dependences.c (graphite_legal_transform_bb): Call
512 pbb_remove_duplicate_pdrs.
513 * graphite-poly.c (can_collapse_pdr): Removed.
514 (pdr_find_duplicate): Removed.
515 (can_collapse_pdrs): New.
516 (pbb_remove_duplicate_pdrs): New.
517 (new_poly_dr): Do not look for duplicates.
518 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
519 (PBB_PDR_DUPLICATES_REMOVED): New.
520 (pbb_remove_duplicate_pdrs): Declared.
522 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
524 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
525 the strides by multiplying by PDR_NB_REFS.
526 * graphite-poly.c (can_collapse_pdr): New.
527 (pdr_find_duplicate): New.
528 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
529 Initialize PDR_NB_REFS.
530 * graphite-poly.h (struct poly_dr): Add field nb_refs.
532 (new_poly_dr): Number of subscripts is a graphite_dim_t.
534 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
536 Revert one of the previous commits:
537 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
538 the computation of symmetric data dependence relations.
539 (dependency_between_pbbs_p): Same.
541 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
544 * graphite-poly.c (apply_poly_transforms): Remove legality test before
547 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
549 * graphite-dependences.c (pddr_original_scattering): Return NULL
550 for read-read dependence relations.
551 * graphite-poly.h (enum poly_dr_type): Fix comment.
554 (pdr_may_write_p): New.
556 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
558 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
559 (struct poly_dr): Same.
561 * graphite-poly.c (new_poly_dr): Same.
563 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
564 Sebastian Pop <sebastian.pop@amd.com>
566 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
567 pbb_strip_mine_time_depth. Changed the implementation so that
568 transformation is expressed as a transformation on
569 time (scatttering) dimensions. Also, ensures that the 2d+1
570 scheduling format is preserved.
571 (pbb_strip_mine_profitable_p): Profitability is based on the
572 iteration number of a given time (scattering) dimension,
573 and not on a original loop depth dimension.
574 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
575 (pbb_do_strip_mine): Call psct_dynamic_dim.
576 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
577 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
578 (pbb_nb_dynamic_scattering_transform): New.
579 (psct_dynamic_dim): New.
581 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
583 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
584 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
585 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
586 * graphite-interchange.c (build_linearized_memory_access): Same.
587 (memory_stride_in_loop): Same.
589 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
591 * graphite-dependences.c (pddr_original_scattering): New.
592 (graphite_legal_transform_dr): Call pddr_original_scattering.
595 * graphite-dependences.h (dot_deps): Declared.
596 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
597 (print_pdr): Print PDR_ID.
598 * graphite-poly.h (struct poly_dr): Add field id.
601 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
603 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
605 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
606 not delete the original dependence relation.
608 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
610 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
611 the computation of symmetric data dependence relations.
612 (dependency_between_pbbs_p): Same.
614 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
616 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
617 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
618 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
619 (free_poly_ddr): New.
620 (pddr_is_empty): New.
621 (dependence_polyhedron_1): Now returns a poly_ddr_p.
622 (dependence_polyhedron): Same. Remove useless gcc_assert.
624 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
625 (graphite_carried_dependence_level_k): Call pddr_is_empty.
626 * graphite-dependences.h (enum poly_dependence_kind): New.
627 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
628 (PDRP_SOURCE): Renamed PDDR_SOURCE.
629 (PDRP_SINK): Renamed PDDR_SINK.
630 (PDRP_DDP): Renamed PDDR_DDP.
632 (free_poly_ddr): Declared.
633 * graphite-poly.c (new_scop): Use the new hash function names.
634 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
636 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
638 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
640 * Merge from mainline (150764:150992).
642 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
644 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
645 bounds with LT_EXPR to make niter analysis more precise on code
646 generated by Graphite.
648 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
650 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
651 (graphite_legal_transform_bb): Same.
652 (poly_drs_may_alias_p): Same.
654 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
657 * graphite-ppl.c (ppl_max_for_le): Correct the use of
658 ppl_Pointset_Powerset_C_Polyhedron_maximize.
660 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
662 * graphite-poly.c (print_pbb): Print PBB index.
664 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
666 * Merge from mainline (r150672:150764).
668 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
670 * graphite-interchange.c (ppl_max_for_le): Moved...
671 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
672 * graphite-ppl.c (ppl_max_for_le): ... here.
673 * graphite-ppl.h (ppl_max_for_le): Declared.
675 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
677 * Merge from mainline (r150372:150672).
679 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
682 * sese.c (convert_for_phi_arg): New.
683 (add_guard_exit_phis): Use convert_for_phi_arg.
685 * testsuite/gfortran.dg/graphite/id-17.f: New.
687 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
689 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
690 unknown subscript upper bounds.
692 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
694 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
695 Pranav Garg <pranav.garg2107@gmail.com>
697 * graphite-interchange.c (gather_access_strides): Removed.
698 (ppl_max_for_le): New.
699 (build_linearized_memory_access): New.
700 (memory_stride_in_loop): New.
701 (pbb_interchange_profitable_p): Reimplemented.
702 * graphite-ppl.h (ppl_new_id_map): New.
703 (ppl_interchange): New.
705 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
707 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
709 * graphite-interchange.c (compute_subscript): Removed.
710 (compute_array_size_cstr): Removed.
711 (compute_array_size_poly): Removed.
712 (compute_array_size): Removed.
713 (gather_access_strides_poly): Removed.
714 (gather_access_strides): Empty.
716 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
718 * graphite-dependences.c (dependence_polyhedron_1): Replace
719 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
720 (graphite_legal_transform_dr): Same.
721 (graphite_carried_dependence_level_k): Same.
722 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
723 Initialize PDR_NB_SUBSCRIPTS.
724 (print_pdr_access_layout): Replace pdr_nb_subscripts with
726 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
727 (PDR_NB_SUBSCRIPTS): New.
728 (pdr_nb_subscripts): Removed.
729 (pdr_dim): Simplified.
730 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
731 with PDR_NB_SUBSCRIPTS.
733 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
735 * graphite-interchange.c (compute_array_size): Remove use of
737 * graphite-poly.c (new_poly_dr): Remove argument data_container.
738 Do not initialize PDR_DATA_CONTAINER.
739 (print_pdr): Do not print PDR_DATA_CONTAINER.
740 * graphite-poly.h (struct poly_dr): Remove data_container field.
741 (PDR_DATA_CONTAINER): Removed.
742 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
744 (build_poly_dr): Same.
746 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
748 * testsuite/gcc.dg/graphite/interchange-9.c: New.
750 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
751 Sebastian Pop <sebastian.pop@amd.com>
753 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
754 copy of the dependence polyhedron. Free the temporary objects.
755 (graphite_carried_dependence_level_k): Free unused objects before
758 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
759 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
760 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
761 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
762 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
764 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
766 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
767 Early return without analyzing the data dependences if no
768 transform has been done. Call restore_scattering if the transform
770 (graphite-interchange.c): Same.
771 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
772 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
773 (apply_poly_transforms): Do not gcc_assert that
774 the transform is legal.
775 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
776 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
777 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
778 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
779 * graphite-poly.h (struct poly_scattering): New.
780 (struct poly_bb): Add original, transformed, and saved fields.
781 Remove transformed_scattering, original_scattering, nb_local_variables,
782 and nb_scattering_transform fields.
783 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
784 (poly_scattering_new): New.
785 (poly_scattering_free): New.
786 (poly_scattering_copy): New.
787 (store_scattering_pbb): New.
788 (store_scattering): New.
789 (restore_scattering_pbb): New.
790 (restore_scattering): New.
791 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
792 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
794 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
796 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
799 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
801 * Makefile.in (graphite.o): Depends on PREDICT_H.
802 * graphite.c: Include predict.h.
803 (graphite_finalize): Call tree_estimate_probability.
804 * predict.c (predict_loops): Do not call scev_initialize and
806 (tree_estimate_probability_bb): New.
807 (tree_estimate_probability): Do not initialize loops: move that
808 code to the driver. Call tree_estimate_probability_bb.
809 (tree_estimate_probability_driver): New.
810 (pass_profile): Use tree_estimate_probability_driver.
811 * predict.h (tree_estimate_probability): Declared.
813 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
815 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
816 * graphite-dependences.c (graphite_legal_transform): Add time to
817 TV_GRAPHITE_DATA_DEPS.
818 (dependency_between_pbbs_p): Same.
819 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
821 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
823 * Merge from mainline (r149952:150372).
825 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
827 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
828 * graphite-blocking.c: Same.
829 * graphite-clast-to-gimple.c: Same.
830 * graphite-dependences.c: Same.
831 * graphite-poly.c: Same.
832 * graphite-poly.h: Same.
833 * graphite-ppl.c: Same.
834 * graphite-scop-detection.c: Same.
835 * graphite-sese-to-poly.c: Same.
838 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
840 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
841 (remove_simple_copy_phi): New.
842 (remove_invariant_phi): New.
843 (simple_copy_phi_p): New.
844 (reduction_phi_p): New.
845 (gsi_for_ssa_name_def): New.
846 (insert_out_of_ssa_copy): New.
847 (insert_out_of_ssa_copy_on_edge): New.
848 (create_zero_dim_array): New.
849 (scalar_close_phi_node_p): New.
850 (rewrite_close_phi_out_of_ssa): New.
851 (rewrite_phi_out_of_ssa): New.
852 (rewrite_reductions_out_of_ssa): New.
853 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
855 * testsuite/gcc.dg/graphite/id-11.c: New.
856 * testsuite/gcc.dg/graphite/id-15.c: New.
857 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
858 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
859 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
860 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
861 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
862 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
863 * testsuite/gfortran.dg/graphite/id-13.f: New.
864 * testsuite/gfortran.dg/graphite/id-5.f: New.
866 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
868 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
869 check that nb_reductions_in_loop is zero.
870 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
872 (nb_reductions_in_loop): Removed.
873 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
874 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
875 (bb_contains_non_iv_scalar_phi_nodes): Removed.
876 (scop_contains_non_iv_scalar_phi_nodes): Removed.
877 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
879 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
881 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
882 statements that have an empty iteration domain.
883 * testsuite/gfortran.dg/graphite/id-16.f: New.
885 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
887 * tree-scalar-evolution.c (instantiate_scev_1): Return
888 chrec_dont_know when the result is not above instantiate_below.
889 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
890 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
891 the tree has a known scalar evolution.
892 * testsuite/gfortran.dg/graphite/id-14.f: New.
893 * testsuite/gfortran.dg/graphite/id-15.f: New.
895 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
897 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
899 (rename_variables): Keep inserting renames after the ones already
902 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
904 * graphite-sese-to-poly.c (compare_bb_depths): New.
905 (graphite_sort_dominated_info): New.
906 (build_scop_bbs_1): Call graphite_sort_dominated_info.
907 (build_scop_scattering): Fix comment.
909 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
911 * graphite.c (graphite_finalize): Call print_loops instead of
912 dump_function_to_file.
913 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
914 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
915 loops generated in the graphite output file.
916 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
917 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
918 * testsuite/gfortran.dg/graphite/id-12.f: New.
920 2009-07-24 Li Feng <nemokingdom@gmail.com>
922 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
925 2009-07-24 Li Feng <nemokingdom@gmail.com>
926 Tobias Grosser <grosser@fim.uni-passau.de>
928 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
929 alias set number build alias in ACCESSES polyhedron.
930 (build_alias_set_for_drs): New.
931 (build_pbb_drs): Added build_alias_set_for_drs.
932 * graphite-dependences.c (poly_drs_may_alias_p): New.
933 (graphite_carried_dependence_level_k): Check alias information
934 before building polyhedron.
936 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
938 * Makefile.in (lambda-code.o): Fix formatting.
940 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
942 * Merge from mainline (r149350-149952)
944 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
946 * graphite-poly.c (apply_poly_transforms): Move strip_mine
947 before interchange to prepare for loop blocking.
949 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
951 * graphite-poly.c (apply_poly_transforms): Add checks after every
953 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
954 done in apply_poly_transforms.
956 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
958 * graphite-dependences.c (build_lexicographically_gt_constraint):
959 Replace RES parameter with *RES.
960 (dependence_polyhedron_1): Pass an address of the parameter RES
961 instead of value of RES.
963 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
965 * graphite.c (graphite_finalize): Fix comment.
966 (graphite_transform_loops): Reset scev info after code generation
969 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
971 * graphite.c (graphite_finalize): Call scev_reset.
973 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
975 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
976 GBB_CLOOG_IV_TYPES hash table twice.
977 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
978 (add_condition_to_domain): Clear GMP values.
980 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
982 * graphite-dependences.c: Fix formatting.
983 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
984 (pbb_number_of_iterations): Free ppl_Linear_Expression.
985 * graphite-sese-to-poly.c: Fix formatting.
986 * graphite.c (graphite_transform_loops): Create the hash table
987 after the early return.
989 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
991 * testsuite/gcc.dg/graphite/id-14.c: New.
992 * testsuite/gcc.dg/graphite/pr40157.c: New.
993 * testsuite/gfortran.dg/graphite/id-11.f: New.
995 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
997 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
998 (build_poly_scop): Return false when there are no pbbs within
999 loops to avoid to pass to cloog scops with no loops.
1001 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
1003 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
1004 useless test "i % 2".
1005 (build_pbb_scattering_polyhedrons): Fix formatting.
1006 (build_poly_dr): Same.
1007 * graphite.c (graphite_transform_loops): Restructure.
1009 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
1011 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1012 reduction_list parameter.
1013 (rewrite_all_phi_nodes_with_iv): Same.
1014 (canonicalize_loop_ivs): Same.
1015 * tree-parloops.c (struct brli): Removed.
1016 (build_reduction_list_info): Removed.
1017 (build_new_reduction): New.
1018 (analyze_reduction_list): Removed.
1019 (gather_scalar_reductions): Find reductions instead of phi
1020 nodes that can't be canonicalized.
1021 (try_create_reduction_list): Remove reduction_list parameter.
1022 (gen_parallel_loop): Same.
1023 (parallelize_loops): Remove analyze_reductions variable,
1024 initialization and free.
1025 Change reduction_list htab initialization to reduction_info
1026 elements instead of ssa names.
1027 Call try_create_reduction_list and gen_parallel_loop without
1028 analyzed_reduction argument.
1029 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1030 canonicalize_loop_ivs with one less argument.
1031 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1033 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1035 * graphite-dependences.c (new_poly_dr_pair): New.
1036 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1037 (new_poly_dr_pair): New.
1038 (eq_poly_dr_pair_p): New.
1039 (hash_poly_dr_pair_p): New.
1040 * graphite-dependences.h (struct poly_dr_pair): New.
1041 (eq_poly_dr_pair_p): Declared.
1042 (hash_poly_dr_pair_p): Declared.
1043 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1044 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1045 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1046 * Makefile.in (graphite-poly.o): Add dependence on
1047 graphite-dependences.h.
1049 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1051 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1052 polynomials of degree > 1 pass to Graphite.
1053 * tree-chrec.c (scev_is_linear_expression): Call
1054 evolution_function_is_affine_multivariate_p.
1055 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1057 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1059 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1060 Instantiate scevs varying in outer loops.
1061 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1063 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1065 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1066 redundant constraint.
1068 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1070 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1071 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1072 based on the file names as in the C testsuite.
1073 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1074 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1075 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1076 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1077 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1078 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1079 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1080 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1081 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1082 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1083 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1084 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1085 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1087 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1089 * sese.c (expand_scalar_variables_call): New.
1090 (expand_scalar_variables_ssa_name): Handle calls in expander.
1092 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1094 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1095 Expect to see the pattern twice.
1096 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1097 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1098 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1100 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1102 * testsuite/gcc.dg/graphite/id-10.c: New.
1103 * testsuite/gcc.dg/graphite/id-12.c: New.
1104 * testsuite/gfortran.dg/graphite/id-7.f: New.
1105 * testsuite/gfortran.dg/graphite/id-8.f: New.
1107 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1109 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1112 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1114 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1116 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1118 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1120 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1122 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1123 building PDR subscripts.
1125 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1127 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1128 computation of array sizes.
1130 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1132 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1134 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1136 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1137 build_pairwise_constraint, dr_equality_constraints,
1138 build_pairwise_scheduling_equality,
1139 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1140 build_lexicographically_gt_constraint, dependence_polyhedron,
1141 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1142 Move from NNC_Polyhedron to C_Polyhedron.
1143 * graphite-interchange.c (compute_array_size_poly,
1144 gather_access_strides): Dito.
1145 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1146 free_scop, pbb_number_of_iterations): Dito.
1147 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1148 pbb_dim_iter_domain, struct scop): Dito.
1149 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1150 new_Cloog_Domain_from_ppl_Polyhedron,
1151 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1152 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1153 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1154 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1155 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1156 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1157 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1158 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1159 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1160 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1161 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1162 build_scop_iteration_domain, build_poly_dr): Dito
1164 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1166 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1168 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1170 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1172 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1173 positivity constraint on the symbolic number of iterations.
1175 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1177 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1179 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1180 Tobias Grosser <grosser@fim.uni-passau.de>
1182 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1183 (build_cloog_prog): Directly use SCOP_CONTEXT.
1184 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1185 (free_scop): Free SCOP_CONTEXT.
1186 (print_scop_context): New.
1187 (print_scop): Call print_scop_context.
1188 (debug_scop_context): New.
1189 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1190 (struct scop): Added field context.
1191 (SCOP_CONTEXT): New.
1192 * graphite-sese-to-poly.c (add_param_constraints): New.
1193 (build_scop_context): New.
1194 (build_poly_scop): Call build_scop_context.
1196 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1198 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1199 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1200 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1201 * graphite-ppl.h: Include double-int.h and tree.h.
1202 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1203 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1204 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1205 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1207 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1209 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1210 POINTER_PLUS_EXPR for pointer types.
1211 (clast_to_gcc_expression): Same.
1213 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1215 * graphite-poly.c (print_scattering_function): Early return when
1216 PBB_TRANSFORMED_SCATTERING is not initialized.
1217 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1219 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1221 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1224 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1226 * tree-parloops.c (analyze_reduction_list): Change return
1228 (try_create_reduction_list): Move the call to
1229 analyze_reduction_list to the beginining.
1230 Call reduction_phi with analyzed_reductions as argument
1231 instead of reduction_list.
1233 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1235 * Merge from mainline (r148296:149346)
1237 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1239 * graphite-scop-detection.c (graphite_can_represent_init): New.
1240 (graphite_can_represent_scev): Call graphite_can_represent_init:
1241 check that the initial value does not contain multiplications of
1243 (stmt_has_simple_data_refs_p): New.
1244 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1245 (is_simple_operand): Fix formatting.
1246 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1248 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1250 * testsuite/gcc.dg/graphite/id-13.c: New.
1251 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1252 analyze_scalar_evolution, use scalar_evolution_in_region.
1253 (scan_tree_for_params_right_scev): Add extra assert.
1254 (parameter_index_in_region_1): Split from parameter_index_in_region.
1255 (idx_record_params): Use scalar_evolution_in_region.
1256 (find_params_in_bb): Same.
1257 (find_scop_parameters): Same.
1258 (build_loop_iteration_domains): Same.
1259 (create_linear_expr_from_tree): Same.
1260 * sese.c (scalar_evolution_in_region): New.
1261 * sese.h (scalar_evolution_in_region): Declared.
1262 (defined_in_sese_p): New.
1263 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1265 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1268 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1270 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1271 TREE_DATA_REF_H also implies SCEV_H.
1273 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1275 * graphite-poly.c (print_scop_params): New.
1276 (print_scop): Call print_scop_params.
1277 (debug_scop_params): New.
1278 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1280 2009-07-07 Li Feng <nemokingdom@gmail.com>
1282 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1283 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1284 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1285 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1286 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1287 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1289 2009-07-07 Li Feng <nemokingdom@gmail.com>
1291 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1292 for dependency checking part.
1293 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1294 tests for dependency checking.
1295 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1296 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1297 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1298 flag -fdump-tree-graphite-all for autopar testsuites.
1300 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1302 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1303 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1304 canonicalize_loop_ivs): Moved...
1305 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1307 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1309 * tree-parloops.c (try_create_reduction_list): Pass an extra
1310 argument analyzed_reductions. Call analyze_reduction_list.
1311 (gen_parallel_loop): Do not call analyze_reduction_list.
1312 (parallelize_loops): Init and finalize analyzed_reductions.
1314 2009-07-06 Li Feng <nemokingdom@gmail.com>
1316 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1317 Added flag -fno-loop-strip-mine for autopar testcase.
1319 2009-07-04 Li Feng <nemokingdom@gmail.com>
1321 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1322 transformed scattering dimension instead of unmatch orignal when
1323 calling dependence_polyhedron.
1325 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1327 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1329 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1331 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1332 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1334 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1336 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1337 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1338 * graphite-poly.c (pbb_number_of_iterations): New.
1339 * graphite-poly.h (pbb_number_of_iterations): Declared.
1340 (pbb_iterator_dim, pbb_parameter_dim): New.
1342 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1344 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1345 last commit on type of lower and upper bound of loops.
1347 2009-06-29 Li Feng <nemokingdom@gmail.com>
1349 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1350 graphite-dependences.h.
1351 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1352 (mark_bb_with_pbb): New.
1353 (get_stmtfor_depth): New.
1354 (find_pbb_via_hash): New.
1355 (dependency_in_loop_p): New.
1356 (mark_loops_parallel): New.
1357 (free_aux_in_new_loops): New.
1358 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1359 bb with it's relevant pbb. Mark newly created loops. Remove mark
1360 innermost loop parallel without checking.
1361 (gloog): Add parameter BB_PBB_MAPPING.
1362 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1363 (gloog): Change declaration.
1364 (mark_loop_parallel): Make extern.
1365 (free_aux_in_new_loops): Declare.
1366 (bb_pbb_map_hash): New.
1367 (eq_bb_pbb_map): New.
1368 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1369 auto parallelization when flag_graphite_force_parallel is set.
1370 (graphite_finalize): Added free_aux_in_new_loops.
1371 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1372 the innermost loop that marked parallel. Use
1373 flag_graphite_force_parallel instead of loop->can_be_parallel.
1374 (loop_parallel_p): Move inner most checking out of function.
1376 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1378 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1379 type of lower and upper bound of loops signed long int.
1381 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1383 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1384 expression outside the loop.
1386 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1388 * gcc.dg/graphite/interchange-8.c: New.
1390 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1392 * gcc.dg/graphite/interchange-0.c: XFailed.
1393 * gcc.dg/graphite/interchange-5.c: XFailed.
1394 * gcc.dg/graphite/interchange-6.c: XFailed.
1396 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1398 * graphite-interchange.c (compute_array_size_poly): The end of the
1399 recursion should return 1.
1401 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1403 * graphite-interchange.c (compute_array_size_cstr): Allow the
1404 subscript multiplier to be -1.
1405 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1406 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1407 data_container. Initializes PDR_DATA_CONTAINER.
1408 (print_pdr_access_layout): New.
1409 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1410 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1412 (PDR_DATA_CONTAINER): New.
1413 (new_poly_dr): Update declaration.
1414 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1415 (build_poly_dr): Call pdr_add_data_dimensions.
1417 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1419 * graphite-poly.h (struct poly_dr): Fix comment.
1420 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1421 (pdr_add_memory_accesses): New.
1422 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1424 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1426 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1427 (print_pbb): Add call to print_pdrs.
1428 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1430 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1431 Li Feng <nemokingdom@gmail.com>
1433 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1434 (dependency_between_pbbs_p): New.
1435 (lexicographically_gt_p): Assure !empty_p before polyhedron
1436 intersection assign.
1437 (build_lexicographically_gt_constraint): Correct lexicographically
1439 * graphite-dependences.h: New.
1440 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1442 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1444 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1445 (gloog): Print to dump_file the generated clast.
1446 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1447 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1449 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1451 * graphite-poly.c (extend_scattering): Increment
1452 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1454 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1456 * graphite-interchange.c (compute_array_size_poly): Added exit of
1457 recursion condition. Continue iterating even after the first equality.
1458 (compute_array_size): Same.
1460 2009-06-24 Li Feng <nemokingdom@gmail.com>
1462 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1463 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1464 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1465 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1466 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1468 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1470 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1471 only when the use verifies is_gimple_reg.
1473 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1475 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1476 Allocate scaldims after call to unify_scattering_dimensions.
1478 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1480 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1482 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1483 Albert Cohen <albert.cohen@inria.fr>
1485 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1486 variables for the strip mining.
1488 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1489 Pranav Garg <pranav.garg2107@gmail.com>
1491 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1492 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1493 (graphite-blocking.o): New rule.
1494 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1495 * graphite-blocking.c: New.
1496 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1497 flag_loop_strip_mine.
1498 (psct_scattering_dim_for_loop_depth): New.
1499 * graphite-poly.h (scop_do_strip_mine): Declared.
1500 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1501 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1502 flag_loop_strip_mine.
1504 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1506 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1507 a GMP value and a PPL coefficient at each iteration of a loop.
1509 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1511 * graphite-dependences.c (dependence_polyhedron): Do not use
1512 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1513 pbb_nb_scattering_transform.
1514 (graphite_legal_transform_dr): Same.
1515 * graphite-poly.c (extend_scattering): Same.
1516 (unify_scattering_dimensions): Same.
1517 (print_scattering_function): Same.
1518 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1519 PBB_NB_LOCAL_VARIABLES.
1520 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1521 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1522 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1523 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1524 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1525 (pbb_nb_scattering_transform): New.
1526 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1527 (psco_scattering_dim): Add assert on parameters.
1528 (psct_scattering_dim): Same.
1529 (psct_scattering_dim_for_loop_depth): Declared.
1530 (psct_local_var_dim): New.
1531 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1532 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1533 correct layout, call pbb_nb_local_vars.
1534 (psct_add_local_variable, psct_add_scattering_dimension): New.
1535 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1536 Initialize PBB_NB_SCATTERING_TRANSFORM.
1538 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1540 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1541 (set_coef): Renamed ppl_set_coef.
1542 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1544 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1546 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1547 test a boolean against 1.
1548 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1549 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1550 (pbb_do_interchange): Returns true when a transform has been performed.
1551 (scop_do_interchange): Same.
1552 * graphite-poly.c (apply_poly_transforms): Use the return value of
1553 scop_do_interchange.
1554 * graphite-poly.h (scop_do_interchange): Update declaration.
1556 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1558 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1560 * sese.c (sese_reset_aux_in_loops): New.
1561 * sese.h (sese_reset_aux_in_loops): New.
1563 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1565 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1566 multiplier and multiply the constant by the multiplier.
1567 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1568 (build_poly_dr): Do not use the multiplier to define the subscript.
1570 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1572 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1573 compiler's data reference. Initialize PDR_CDR.
1574 (print_pdr): Call dump_data_reference.
1575 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1576 Add compiler_dr field.
1577 (PDR_BB): Renamed PDR_PBB.
1579 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1580 GCC's data reference representation.
1581 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1582 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1584 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1586 * graphite-poly.c (print_scattering_function): Also print the layout.
1587 * graphite-poly.h (pbb_nb_local_vars): New.
1589 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1591 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1593 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1595 * graphite-poly.c (print_pdr, debug_pdr): New.
1596 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1597 (PDR_BASE): Removed.
1599 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1601 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1604 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1606 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1607 subscript identification column.
1608 (pbb_do_interchange): Print to dump_file that some loops "will be
1609 interchanged". Rely on that chain of characters in the testcases.
1610 * gcc.dg/graphite/interchange-0.c: New.
1611 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1612 interchange-*.c files and compile them with -floop-interchange.
1614 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1616 * graphite-interchange.c (interchange_profitable_p): Renamed
1617 pbb_interchange_profitable_p.
1619 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1620 Harsha Jagasia <harsha.jagasia@amd.com>
1621 Pranav Garg <pranav.garg2107@gmail.com>
1623 * graphite-interchange.c (interchange_profitable_p): Make static.
1624 (pbb_interchange_loop_depths, pbb_do_interchange,
1625 scop_do_interchange): New.
1626 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1627 for flag_loop_interchange.
1628 * graphite-poly.h (scop_do_interchange): Declared.
1629 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1630 flag_loop_interchange is used.
1632 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1634 * graphite-dependences.c (dependence_polyhedron): Update use of
1635 pbb_nb_scattering_dims.
1636 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1637 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1638 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1639 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1641 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1643 * graphite.c: Cleanup foo.
1645 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1647 * Merge from mainline (r143684:148293).
1648 * Disabled libpcp until it gets fixed.
1650 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1651 Harsha Jagasia <harsha.jagasia@amd.com>
1653 * graphite-interchange.c: New.
1654 * Makefile.in (graphite-interchange.o): New.
1655 * graphite-poly.h (interchange_profitable_p): Declared.
1656 * graphite-ppl.h (value_max): New.
1658 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1660 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1661 * graphite-poly.h: Fix some comments.
1665 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1668 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1669 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1670 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1671 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1672 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1673 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1674 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1675 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1676 * graphite-clast-to-gimple.c: Same.
1677 * graphite-dependences.c: Same.
1678 * graphite-poly.c: Same.
1679 * graphite-sese-to-poly.c: Same.
1681 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1683 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1684 expressions for an IV rename, as returned by clast_to_gcc_expression.
1685 (copy_renames): Rename new_name to expr.
1686 * sese.c (debug_rename_elt): Same.
1689 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1690 the information from the rename map.
1691 (rename_variables_in_stmt): Same.
1692 (add_loop_exit_phis): Rename new_name to expr.
1693 (insert_loop_close_phis): Same.
1694 (add_guard_exit_phis): Same. Call force_gimple_operand.
1695 * sese.h (struct rename_map_elt): Rename new_name to expr.
1696 (new_rename_map_elt): Same.
1698 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1700 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1701 * sese.c (set_rename): Make it extern.
1702 * sese.h (set_rename): Declared.
1704 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1706 * graphite-poly.c (extend_scattering): Free values.
1707 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1709 (ppl_print_powerset_matrix): Same.
1710 * graphite-scop-detection.c (free_scops_1): New.
1711 (limit_scops): Call free_scops_1.
1712 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1713 (build_poly_dr): Free PPL coefficients.
1714 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1716 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1718 * graphite-dependences.c: New.
1719 * graphite-data-ref.c: Removed.
1720 * graphite-data-ref.h: Removed.
1721 * Makefile.in (graphite-data-ref.o): Removed.
1722 (graphite-dependences.o): Added.
1723 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1724 * graphite-poly.c: Same.
1725 Move the data dependence testing to graphite-dependences.c.
1727 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1729 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1730 from graphite_cannot_represent_loop. Code refactored.
1731 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1733 2009-05-17 Li Feng <nemokingdom@gmail.com>
1735 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1736 Cover all the testcases (not only the filtered ones).
1738 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1740 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1741 unnecessary check. Update comments. Move check for REAL_TYPE here.
1742 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1743 done in (stmt_simple_for_scop_p).
1745 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1747 * graphite.c (print_global_statistics): New.
1748 (print_graphite_scop_statistic): New.
1749 (print_graphite_statistics): New.
1750 (graphite_initialize, graphite_transform_loops): Print statistics.
1751 * graphite-scop-detection (build_scops): Print statistics.
1752 (print_graphite_scop_statistics): New.
1753 (print_graphite_statistics): New.
1755 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1757 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1758 (debug_clast_name_index): Removed.
1759 (debug_clast_name_indexes_1): Removed.
1760 (debug_clast_name_indexes): Removed.
1761 (clast_name_index_elt_info): Removed.
1762 (eq_clast_name_indexes): Removed.
1763 (clast_name_to_index): Removed.
1764 (new_clast_name_index): Removed.
1765 (save_clast_name_index): Removed.
1766 (save_var_name): Moved...
1767 (init_sese_params_index): Removed.
1768 (clast_name_to_gcc): Remove use of name_tree.
1769 (initialize_cloog_names): Same.
1770 (gloog): Do not call init_sese_params_index.
1771 * graphite-sese-to-poly.c (save_var_name): ...here.
1772 (parameter_index_in_region): New.
1773 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1774 (parameter_index_in_region): Removed.
1775 (is_parameter): Remove use of name_tree.
1776 * sese.h (struct name_tree): Removed.
1777 (struct sese): Remove use of name_tree. New field params_names.
1778 (SESE_PARAMS_NAMES): New.
1779 (SESE_PARAMS): Remove duplicate.
1780 (parameter_index_in_region): Removed.
1781 (sese_nb_params): Remove use of name_tree.
1782 (struct clast_name_index): New.
1783 (new_clast_name_index): New.
1784 (clast_name_to_index): New.
1785 (save_clast_name_index): New.
1786 (debug_clast_name_index): New.
1787 (debug_clast_name_indexes_1): New.
1788 (debug_clast_name_indexes): New.
1789 (clast_name_index_elt_info): New.
1790 (eq_clast_name_indexes): New.
1792 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1794 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1795 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1796 (graphite_loop_normal_form): Do not pass region. Do not
1797 initialize SESE_OLDIVS.
1798 (build_graphite_loop_normal_form): Update call to
1799 graphite_loop_normal_form.
1800 * sese.c (debug_oldivs): Removed.
1801 (new_sese): Do not initialize SESE_OLDIVS.
1802 (free_sese): Do not free SESE_OLDIVS.
1803 (oldiv_for_loop): Removed.
1804 * sese.h (struct sese): Remove old_ivs.
1805 (SESE_OLDIVS): Removed.
1806 (oldiv_for_loop): Removed.
1808 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1810 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1811 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1812 replaced by a call to newivs_to_depth_to_newiv.
1813 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1814 (clast_to_gcc_expression_red): Same.
1815 (gcc_type_for_clast_expr): Same.
1816 (gcc_type_for_clast_eq): Same.
1817 (graphite_translate_clast_equation): Same.
1818 (graphite_create_guard_cond_expr): Same.
1819 (graphite_create_new_guard): Same.
1820 (graphite_create_new_loop): Same.
1821 (build_iv_mapping): Same.
1822 (translate_clast): Same.
1824 (loop_iv_stack_patch_for_consts): Removed. *
1825 sese.c (iv_stack_entry_is_constant): Removed.
1826 (iv_stack_entry_is_iv): Removed.
1827 (loop_iv_stack_push_iv): Removed.
1828 (loop_iv_stack_insert_constant): Removed.
1829 (loop_iv_stack_pop): Removed.
1830 (loop_iv_stack_get_iv): Removed.
1831 (loop_iv_stack_get_iv_from_name): Removed.
1832 (debug_loop_iv_stack): Removed.
1833 (free_loop_iv_stack): Removed.
1834 (loop_iv_stack_remove_constants): Removed. *
1835 sese.h (iv_stack_entry_kind): Removed.
1836 (iv_stack_entry_data_union): Removed.
1837 (iv_stack_entry_struct): Removed.
1838 (iv_stack_entry_p): Removed.
1839 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1840 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1841 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1842 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1843 (gbb_loop_at_index): Fix indenting.
1844 (gbb_loop_index): Removed.
1846 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1848 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1849 Call clast_name_to_index.
1851 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1853 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1854 do not pass params. Get params from SESE_PARAMS.
1855 (clast_to_gcc_expression): Same.
1856 (clast_to_gcc_expression_red): Same.
1857 (gcc_type_for_clast_eq): Same.
1858 (graphite_translate_clast_equation): Same.
1859 (graphite_create_new_loop): Same.
1860 * sese.c (rename_variables_in_stmt): Fix comment.
1862 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1864 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1866 Call save_clast_name_index.
1867 (translate_clast): Pass newivs_index.
1868 (gloog): Create and free newivs_index.
1870 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1872 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1873 (clast_name_index_p): New type.
1874 (debug_clast_name_index): New.
1875 (debug_clast_name_indexes_1): New.
1876 (debug_clast_name_indexes): New.
1877 (clast_name_index_elt_info): New.
1878 (eq_clast_name_indexes): New.
1879 (clast_name_to_index): New.
1880 (new_clast_name_index): New.
1881 (save_clast_name_index): New.
1882 (init_sese_params_index): New.
1883 (gloog): Call init_sese_params_index.
1884 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1885 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1886 (free_sese): Free SESE_PARAMS_INDEX.
1887 * sese.h (struct sese): Add params_index.
1888 (SESE_PARAMS_INDEX): New.
1890 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1892 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1893 (graphite_create_new_loop): Pass the newivs vector. Push the
1894 newly created IV to newivs.
1895 (translate_clast): Pass the newivs vector.
1896 (gloog): Create and destroy the newivs vector.
1898 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1900 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1901 (graphite_loop_normal_form): Initialize loop->aux with the unique
1902 IV that has been created.
1904 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1906 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1907 scev with parameters in the base part. They where forbidden
1910 2009-05-11 Li Feng <nemokingdom@gmail.com>
1912 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1913 compile options by file names.
1914 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1915 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1916 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1917 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1919 2009-05-08 Li Feng <nemokingdom@gmail.com>
1921 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1922 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1923 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1924 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1926 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1928 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1931 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1933 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1934 allow integer constant strides.
1935 (graphite_can_represent_expr): Depend on outermost_loop.
1936 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1937 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1938 build_scops_1): Same.
1939 (scopdet_basic_block_info): Same and insert layered SCoP
1941 (try_generate_gimple_bb): Cleanup.
1942 (build_scops): Enable data references.
1944 * testsuite/gcc.dg/graphite/id-5.c: New.
1945 * testsuite/gcc.dg/graphite/id-9.c: New.
1946 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1947 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1949 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1951 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1952 that we have not yet built for this SCoP.
1954 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1956 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1957 for complex numbers.
1959 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1961 * graphite-ppl.c: Fix build if cloog is not available.
1963 2009-05-04 Li Feng <nemokingdom@gmail.com>
1965 * tree-parloops.c (loop_parallel_p): Remove construction of
1966 NITER and REDUCTION_LIST.
1967 (try_get_loop_niter): New.
1968 (try_create_reduction_list): New.
1969 (parallelize_loops): Bypass the failed checkings in autopar
1970 when can_be_parallel in loop structure is set to true.
1972 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1974 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1975 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1977 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1979 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1980 Enable EQ_EXPR and NE_EXPR again.
1982 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1984 * graphite-scop-detection.c (graphite_can_represent_scev):
1985 Add check if scev is affine multivariate.
1986 (harmful_stmt_in_bb): Check if we can represent the conditions.
1987 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1989 * testsuite/gcc.dg/graphite/id-7.c: New.
1991 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1993 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1994 Check all bbs in region, not only the bbs that are represented in
1996 (build_poly_scop): Add newline.
1997 * testsuite/gcc.dg/graphite/id-8.c: New.
1999 2009-04-30 Li Feng <nemokingdom@gmail.com>
2001 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
2002 when loop initialize.
2003 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
2004 * common.opt: Declare flag_graphite_force_parallel.
2005 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
2007 * graphite-poly.c (apply_poly_transforms): Introduce
2008 flag_graphite_force_parallel.
2009 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
2010 * toplev.c (process_options): ditto and replace a not correctly
2013 2009-04-30 Li Feng <nemokingdom@gmail.com>
2015 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2016 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2017 to the redefinition.
2018 (compute_cloog_iv_types_1): ditto.
2019 (build_iv_mapping): ditto.
2020 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2022 (free_gimple_bb): Removed GBB_LOOPS related free part.
2023 (build_bb_loops): Removed.
2024 * sese.h (struct gimple_bb): Removed loops.
2025 (GBB_LOOPS): Removed.
2026 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2027 (gbb_loop_index): ditto.
2029 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2031 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2032 allow non constant strides.
2033 * testsuite/gcc.dg/graphite/scop-20.c: New.
2035 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2037 * graphite-scop-detection.c (dot_all_scops): Fix system call
2038 return value warning.
2041 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2043 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2044 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2046 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2048 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2049 build_pairwise_constraint, dr_equality_constraints,
2050 build_pairwise_scheduling_equality,
2051 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2052 build_lexicographically_gt_constraint, dependence_polyhedron,
2053 graphite_legal_transform_dr, graphite_legal_transform_bb,
2054 graphite_legal_transform): New.
2055 * graphite-poly.h (graphite_legal_transform): Declared.
2056 * graphite-sese-to-poly.c (build_poly_scop): Call to
2057 graphite_legal_transform is disabled for the moment.
2059 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2061 * graphite-poly.h (pbb_nb_scattering_dims): New.
2062 (pbb_nb_scattering): Use it.
2064 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2066 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2067 Pointset_Powerset version of ppl_insert_dimensions.
2068 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2070 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2072 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2074 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2076 * graphite-poly.h: Fix comment.
2078 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2080 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2082 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2084 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2087 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2089 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2090 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2093 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2095 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2096 handle EQ_EXPR and NE_EXPR.
2098 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2100 * graphite-poly.h (poly_dr): Fix comment.
2102 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2103 Tobias Grosser <grosser@fim.uni-passau.de>
2105 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2106 with a zero dimension polyhedron.
2107 (find_scop_parameters): Move the call to scop_set_nb_params here.
2108 (build_loop_iteration_domains): Store in loop->aux the iteration
2110 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2111 by any loop in scop.
2112 (build_poly_scop): Do not call scop_set_nb_params.
2114 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2115 Tobias Grosser <grosser@fim.uni-passau.de>
2117 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2118 add_condition_to_domain not GT_EXPR.
2120 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2122 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2123 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2124 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2125 upper_bound_assign to calculate unions.
2126 * testsuite/gcc.dg/graphite/id-6.c: New.
2128 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2130 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2131 handle abnormal edges.
2133 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2135 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2136 (free_poly_bb): Also free poly_drs.
2137 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2138 (poly_dr): Polyhedron to Pointset_Powerset.
2139 (pdr_accessp_nb_subscripts): Same.
2140 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2143 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2145 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2146 names into more meaningful names.
2148 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2150 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2151 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2153 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2155 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2157 * tree-parloops.c (rewrite_phi_with_iv): New.
2158 (rewrite_all_phi_nodes_with_iv): New.
2159 (canonicalize_loop_ivs): Call them.
2161 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2163 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2164 graphite_find_data_references_in_stmt.
2165 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2166 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2168 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2170 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2172 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2174 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2175 instead of bb_in_region.
2176 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2177 (build_sese_conditions): Use flag_bb_in_sese.
2178 * sese.c (register_bb_in_sese): Removed.
2179 (new_sese): Remove initialization of SESE_REGION_BBS.
2180 (free_sese): Do not free SESE_REGION_BBS.
2181 * sese.h (struct sese): Remove field region_basic_blocks.
2182 (SESE_REGION_BBS): Removed.
2183 (bb_in_sese_p): Implement in function of bb_in_region.
2185 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2187 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2190 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2192 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2194 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2195 (add_condition_to_domain): New.
2196 (add_condition_to_pbb): New.
2197 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2198 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2200 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2202 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2203 ppl_Pointset_Powerset.
2204 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2205 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2206 (pbb_nb_loops): Same.
2207 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2208 add_conditions_to_domain): Same.
2209 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2210 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2211 ppl_const_Polyhedron_t.
2212 (ppl_print_powerset_matrix): New.
2213 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2214 ppl_print_powerset_matrix): New.
2215 (ppl_print_polyhedron_matrix): Updated.
2217 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2219 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2221 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2223 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2224 (print_iteration_domains, debug_iteration_domain,
2225 debug_iteration_domains): New.
2226 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2227 debug_iteration_domains): Declared.
2228 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2231 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2232 Sebastian Pop <sebastian.pop@amd.com>
2234 * graphite-poly.h (print_iteration_domain): New.
2235 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2236 (build_sese_conditions_1, build_sese_conditions_after,
2237 build_sese_conditions_before): New.
2238 (build_sese_conditions): Rewritten.
2240 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2241 Tobias Grosser <grosser@fim.uni-passau.de>
2243 Cleanup of code generation liveouts.
2244 * graphite-clast-to-gimple.c (translate_clast): Use a single
2245 rename_map instead of one per translated statement.
2246 Do not use SESE_LIVEOUT_RENAMES.
2247 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2248 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2249 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2250 phi node of a reduction: when a loop contains a reduction used outside
2251 the loop, there should be a scalar close phi node on the exit block.
2252 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2253 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2254 (free_sese): Do not free them.
2255 (sese_build_liveouts_use): Do not use them.
2256 (sese_build_liveouts_bb): Same.
2257 (sese_build_liveouts): Same.
2258 (sese_insert_phis_for_liveouts): Same.
2259 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2260 (defined_in_loop_p): New.
2261 (alive_after_loop): New.
2262 (close_phi_not_yet_inserted_p): New.
2263 (struct alep, alep_p): New.
2264 (add_loop_exit_phis): Remove from the rename_map all the names defined
2265 in the code generated loop.
2266 (insert_loop_close_phis): Traverse the rename_map passed to it.
2267 Don't use SESE_LIVEOUT_RENAMES.
2268 (default_liveout_before_guard): Renamed default_before_guard.
2269 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2270 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2271 (register_sese_liveout_renames): Removed.
2272 (copy_bb_and_scalar_dependences): Do not call it.
2273 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2275 (SESE_LIVEOUT): Removed.
2276 (SESE_LIVEOUT_RENAMES): Removed.
2277 (SESE_REDUCTION_LIST): Removed.
2278 (sese_build_liveouts): Removed.
2279 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2280 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2281 (insert_guard_phis): Same.
2282 (rename_map_elt): Declare a VEC of them.
2283 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2284 trees not pointers to trees.
2286 Rewrite in canonical close SSA form:
2287 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2288 (limit_scops): Close the scop after the block containing the close phi
2290 (canonicalize_loop_closed_ssa): New.
2291 (canonicalize_loop_closed_ssa_form): New.
2292 (build_scops): Call canonicalize_loop_closed_ssa_form.
2294 * graphite-sese-to-poly.c: Fix typos.
2296 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2298 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2300 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2301 (print_pbb): Add conditions.
2303 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2304 Sebastian Pop <sebastian.pop@amd.com>
2306 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2307 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2308 (build_scop_bbs_1): New.
2309 (build_scop_bbs): Rewrite.
2310 * sese.h (bb_in_region): New.
2312 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2314 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2316 (print_scop): Style.
2317 * graphite-poly.h (poly_bb): Add drs vector.
2318 (PBB_DRS): Add accessor.
2319 * graphite-sese-to-poly.c (build_poly_dr): New.
2320 (build_pbb_drs, build_scop_drs): New.
2321 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2323 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2325 * tree-ssa-loop.c: Include forgotten toplev.h
2327 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2329 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2330 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2331 * testsuite/gcc.dg/graphite/pr37928.c: Same
2332 * testsuite/gcc.dg/graphite/pr38409.c: Same
2333 * testsuite/gcc.dg/graphite/pr38498.c: Same
2334 * testsuite/gcc.dg/graphite/pr38559.c: Same
2335 * testsuite/gcc.dg/graphite/pr39335.c: Same
2336 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2337 * testsuite/gfortran.dg/graphite/block-2.f: Same
2338 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2341 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2343 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2344 build_access_matrix, build_scop_data_accesses): Remove access function
2345 building. (We get a new version soon).
2346 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2347 * sese.h (nb_loops_around_loop_in_sese): Remove.
2348 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2350 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2351 Sebastian Pop <sebastian.pop@amd.com>
2353 * graphite-scop-detection.c (struct scopdet_info): Rename last
2355 (scopdet_basic_block_info, build_scops_1): Don't use
2356 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2358 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2359 Sebastian Pop <sebastian.pop@amd.com>
2361 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2362 * sese.c (sese_build_liveouts_use): Renamed from
2363 sese_build_livein_liveouts_use. Remove liveins.
2364 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2365 Call sese_build_liveouts_use.
2366 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2367 Call sese_build_liveouts_bb.
2368 (new_sese, free_sese): Remove liveins.
2369 (sese_add_exit_phis_var): Deleted.
2370 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2372 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2374 * sese.h (sese): Remove num_ver and livein.
2375 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2377 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2379 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2381 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2383 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2384 (build_scop_scattering): Do not use compare_prefix_loops any more.
2385 (nb_common_loops): New.
2387 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2389 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2390 (register_old_and_new_names): Renamed set_rename.
2392 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2394 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2395 of the decl from the previous commit.
2397 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2399 * graphite-scop-detection.c (dot_scop): New.
2400 * graphite-scop-detection.h (dot_scop): Declared.
2402 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2404 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2406 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2408 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2409 condition at the end of the loop.
2410 * graphite.c (graphite_initialize, graphite_finalize): Print to
2411 dump_file the compiled function.
2412 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2413 of create_empty_loop_on_edge.
2414 (translate_clast): Update the code generation of loops for the new
2416 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2418 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2420 Reverted the patch from 2009-03-19.
2422 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2424 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2426 (print_scop): Style.
2427 * graphite-poly.h (poly_bb): Add drs vector.
2428 (PBB_DRS): Add accessor.
2429 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2430 (build_access_matrix_with_af, build_access_matrix,
2431 build_scop_data_accesses): Delete.
2432 (build_poly_dr): New.
2433 (build_pbb_drs, build_scop_drs): New.
2434 (build_poly_scop): call build_scop_drs.
2436 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2438 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2439 once per basic block.
2441 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2443 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2444 (graphite_can_represent_expr): Renamed from loop_affine_expr
2446 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2447 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2448 (scopdet_basic_block_info): Actually define entry_block.
2449 (stmt_simple_memref_p): Moved here from ...
2451 * tree-data-ref.c (stmt_simple_memref_p): here.
2452 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2454 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2456 * testsuite/gcc.dg/graphite/id-4.c: New.
2458 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2460 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2461 (register_old_and_new_names): Update the content of the map.
2462 When there was already a rename_map_elt in the map at that
2464 (copy_bb_and_scalar_dependences): Do rename_variables after
2465 expand_scalar_variables.
2466 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2467 of the map. When there was already a rename_map_elt in the
2468 map at that location, free it.
2469 (translate_clast): Pass the rename_map. Do not initialize and free
2470 a rename_map per stmt_user.
2471 (gloog): Initialize and free one rename_map and pass it to
2474 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2476 * sese.c (expand_scalar_variables_stmt,
2477 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2479 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2480 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2481 the gimple_stmt_iterator of the statement to be expanded.
2482 * graphite-scop-detection.c (is_simple_operand): Do handle
2485 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2487 * graphite-scop-detection.c (is_simple_operand): Do not handle
2489 * testsuite/gcc.dg/graphite/id-2.c: New.
2491 * graphite-sese-to-poly.c (build_bb_loops,
2492 add_value_to_dim, scan_tree_for_params_right_scev,
2493 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2494 find_params_in_bb, build_loop_iteration_domains,
2495 add_conditions_to_domain): Remove subtract.
2497 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2499 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2500 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2501 pbb_loop_at_index -> gbb_loop_at_index.
2502 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2503 (debug_loop_vec): Delete.
2504 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2505 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2506 (PBB_LOOPS): Removed.
2507 (PBB_BLACK_BOX): Insert cast.
2508 (pbb_set_black_box): New setter.
2509 (pbb_loop_at_index, pbb_loop_index): Removed.
2510 (scop_set_region, scop_set_nb_params): New.
2511 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2512 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2513 (build_poly_scop): Use scop_set_nb_params.
2514 * sese.h (gimple_bb): Add LOOPS.
2515 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2517 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2519 Revert previous commit.
2521 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2523 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2524 (register_old_and_new_names): Update the content of the map.
2525 When there was already a rename_map_elt in the map at that
2527 (copy_bb_and_scalar_dependences): Do rename_variables after
2528 expand_scalar_variables.
2529 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2530 of the map. When there was already a rename_map_elt in the
2531 map at that location, free it.
2532 (translate_clast): Pass the rename_map. Do not initialize and free
2533 a rename_map per stmt_user.
2534 (gloog): Initialize and free one rename_map and pass it to
2537 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2539 Remove forgotten line in revert.
2541 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2543 Revert previous commit.
2545 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2547 * sese.c (register_old_and_new_names): Update the content
2548 of the map. When there was already a rename_map_elt in the
2549 map at that location, free it.
2550 (copy_bb_and_scalar_dependences): Do rename_variables after
2551 expand_scalar_variables.
2552 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2553 of the map. When there was already a rename_map_elt in the
2554 map at that location, free it.
2555 (translate_clast): Pass the rename_map. Do not initialize and free
2556 a rename_map per stmt_user.
2557 (gloog): Initialize and free one rename_map and pass it to
2560 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2562 * graphite-clast-to-gimple.c (translate_clast): context_loop
2565 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2566 Sebastian Pop <sebastian.pop@amd.com>
2568 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2569 of the use of ppl_Polyhedron_map_space_dimensions.
2571 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2572 Sebastian Pop <sebastian.pop@amd.com>
2574 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2575 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2576 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2577 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2578 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2579 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2580 pbb_nb_params): New.
2581 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2582 nb_loops_around_pbb): Adapt return types.
2584 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2586 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2587 graphite-clast-to-gimple.o, graphite-data-ref.o,
2588 graphite-scop-detection.o, graphite-poly.o): Add
2591 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2593 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2594 graphite-clast-to-gimple.o, graphite-data-ref.o,
2595 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2597 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2599 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2600 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2601 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2602 * testsuite/gcc.dg/graphite/block-0.c: Same.
2603 * testsuite/gcc.dg/graphite/block-1.c: Same.
2604 * testsuite/gcc.dg/graphite/block-2.c: Same.
2605 * testsuite/gcc.dg/graphite/block-3.c: Same.
2606 * testsuite/gcc.dg/graphite/block-4.c: Same.
2607 * testsuite/gcc.dg/graphite/block-5.c: Same.
2608 * testsuite/gcc.dg/graphite/block-6.c: Same.
2609 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2610 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2611 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2612 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2613 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2614 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2615 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2616 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2617 * opts.c: Remove -floop-block from -O2.
2618 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2619 -floop-strip-mine are used.
2621 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2622 Sebastian Pop <sebastian.pop@amd.com>
2624 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2626 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2627 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2628 strip_mine_profitable_p, is_interchange_valid,
2629 graphite_trans_bb_block, graphite_trans_loop_block,
2630 graphite_trans_scop_block): Temporary removed.
2631 (extend_scattering, unify_scattering_dimensions): New.
2632 (print_scattering_function, graphite_read_transforms):
2633 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2634 (graphite_generate_scattering_fns): Removed.
2635 (apply_poly_transforms): Cleanup.
2636 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2637 (schedule_to_scattering): Moved.
2638 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2639 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2640 (pbb_nb_scattering): New.
2641 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2642 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2644 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2646 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2647 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2648 -> PBB_TRANSFORMED_SCATTERING.
2649 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2650 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2651 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2652 (check_poly_representation): Do not return bool.
2653 (graphite_transform_loops): Reformat.
2654 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2656 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2658 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2659 debug_pbb_domain, debug_pbb, debug_scop): New.
2660 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2661 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2663 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2666 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2667 when the type precision of the induction variable should be
2668 larger than the type precision of nit.
2669 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2670 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2671 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2673 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2674 * testsuite/gcc.dg/graphite/pr39335.c: New.
2676 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2678 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2679 SSA_NAMES not struct reduction_info.
2681 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2683 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2685 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2686 Tobias Grosser <grosser@fim.uni-passau.de>
2688 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2689 (free_sese): Free SESE_REDUCTION_LIST.
2690 * sese.h (struct sese): Add field reduction_list.
2691 (SESE_REDUCTION_LIST): New.
2692 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2693 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2695 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2696 Tobias Grosser <grosser@fim.uni-passau.de>
2698 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2701 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2702 Tobias Grosser <grosser@fim.uni-passau.de>
2704 * tree-parloops.c (struct brli, build_reduction_list_info,
2705 analyze_reduction_list, gather_scalar_reductions): New.
2706 (loop_parallel_p): Build a reduction list containing only
2707 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2708 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2709 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2710 * tree-flow.h (gather_scalar_reductions): Declared.
2712 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2715 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2716 number_of_iterations_exit from a gcc_assert.
2718 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2719 Jan Sjodin <jan.sjodin@amd.com>
2721 * output.h (graphite_out_file, graphite_in_file): Declared.
2722 * toplev.c (graphite_out_file, graphite_in_file): New.
2723 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2724 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2725 Don't call schedule_to_scattering.
2726 * common.opt (fgraphite-write, fgraphite-read): New.
2727 * graphite-poly.c: Include output.h.
2728 (print_scattering_function, print_scattering_functions,
2729 debug_scattering_function, debug_scattering_functions,
2730 graphite_write_transforms, graphite_read_transforms,
2731 graphite_generate_scattering_fns): New.
2732 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2733 Call graphite_generate_scattering_fns, graphite_write_transforms,
2734 graphite_read_transforms.
2735 (new_poly_bb): Initialize PBB_SCATTERING.
2736 (free_poly_bb): Free PBB_SCATTERING.
2737 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2738 * graphite-poly.h (struct poly_bb): Add field scattering.
2739 (PBB_SCATTERING): New.
2740 (print_scattering_function, print_scattering_functions,
2741 debug_scattering_function, debug_scattering_functions): Declared.
2742 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2743 GMP values, not integers!
2744 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2745 ppl_read_polyhedron_matrix): New.
2746 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2747 debug_ppl_polyhedron_matrix,
2748 ppl_read_polyhedron_matrix): Declared.
2749 * Makefile.in (graphite-poly.o): Depends on output.h.
2751 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2752 Tobias Grosser <grosser@fim.uni-passau.de>
2755 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2756 scalar evolutions in the scop_entry->loop_father.
2758 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2759 Tobias Grosser <grosser@fim.uni-passau.de>
2761 * graphite.h (ref_nb_loops): Remove declaration.
2762 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2763 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2764 debug_gbb): Moved to sese.h.
2767 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2768 Tobias Grosser <grosser@fim.uni-passau.de>
2770 * graphite-data-ref.[ch]: Disable.
2772 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2773 Tobias Grosser <grosser@fim.uni-passau.de>
2775 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2776 scalar evolutions in the scop_entry->loop_father.
2778 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2780 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2781 (graphite_cannot_represent_loop_niter): Renamed
2782 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2783 (limit_scops): build_sese_loop_nests does not return a bool.
2784 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2785 * sese.c (nb_reductions_in_loop): ... from here.
2786 (graphite_loop_normal_form): ... from here.
2787 (sese_record_loop): Does not fail, so does not return a bool.
2788 (build_sese_loop_nests): Same.
2789 * sese.h (build_sese_loop_nests): Update declaration.
2790 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2791 (build_graphite_loop_normal_form): New.
2792 (gloog): Call build_graphite_loop_normal_form.
2793 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2794 build_sese_loop_nests.
2796 * testsuite/gcc.dg/graphite/id-1.c: New.
2798 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2799 Tobias Grosser <grosser@fim.uni-passau.de>
2801 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2802 The SCoP detection fix is sufficient.
2804 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2806 PR tree-optimization/39260
2807 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2808 the basic block contains a condition with a real type.
2809 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2811 * gcc.dg/graphite/pr39260.c: New.
2813 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2815 * graphite-poly.c: Inlcude params.h.
2816 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2818 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2819 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2821 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2822 Tobias Grosser <grosser@fim.uni-passau.de>
2824 * graphite-scop-detection.c (dot_all_scops_1,
2825 dot_all_scops): Moved here.
2826 * graphite-scop-detection.h (dot_all_scops): Declared here.
2827 * graphite.c (graphite_initialize, graphite_finalize): New.
2828 (graphite_transform_loops): Cleaned up.
2829 * sese.c (debug_oldivs): Moved here.
2830 * graphite-poly.c (graphite_apply_transformations): Renamed
2831 apply_poly_transforms.
2832 (debug_loop_vec): Moved here.
2833 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2834 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2835 find_scop_parameters, build_scop_iteration_domain,
2836 add_conditions_to_constraints, build_scop_canonical_schedules,
2837 build_scop_data_accesses): Now static.
2838 (build_poly_scop, check_poly_representation): New.
2840 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2842 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2843 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2844 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2845 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2846 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2847 scan_tree_for_params, struct irp_data, dx_record_params,
2848 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2849 build_loop_iteration_domains, add_conditions_to_domain,
2850 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2851 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2852 build_sese_conditions, add_conditions_to_constraints,
2853 build_scop_iteration_domain, build_access_matrix_with_af,
2854 build_access_matrix,
2855 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2857 * graphite-sese-to-poly.c: New.
2858 * graphite-sese-to-poly.h: New.
2860 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2862 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2864 * graphite.c: Split graphite code generation to a new file.
2865 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2866 max_precision_type, clast_to_gcc_expression_red,
2867 clast_to_gcc_expression, gcc_type_for_clast_expr,
2868 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2869 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2870 graphite_create_new_guard, clast_get_body_of_loop,
2871 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2872 graphite_create_new_loop, build_iv_mapping, copy_renames,
2873 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2874 compute_cloog_iv_types, free_scattering, save_var_name,
2875 initialize_cloog_names, build_scop_context, build_cloog_prog,
2876 set_cloog_options, debug_clast_stmt, scop_to_clast,
2877 print_generated_program, debug_generated_program,
2878 gloog): Moved to graphite-clast-to-gimple.c.
2880 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2882 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2883 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2884 loop_iv_stack_pop, loop_iv_stack_get_iv,
2885 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2886 free_loop_iv_stack, loop_iv_stack_remove_constants,
2887 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2888 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2889 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2890 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2891 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2892 get_vdef_before_sese, sese_adjust_vphi,
2893 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2894 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2895 is_iv, expand_scalar_variables_ssa_name,
2896 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2897 expand_scalar_variables, rename_variables, remove_condition,
2898 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2899 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2900 default_liveout_before_guard, add_guard_exit_phis,
2901 insert_guard_phis, register_old_and_new_names,
2902 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2903 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2904 if_region_set_false_region, create_if_region_on_edge,
2905 move_sese_in_condition): Moved to sese.c.
2907 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2908 if_region_exit, if_region_get_condition_block,
2909 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2910 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2911 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2912 ivtype_map_elt, new_ivtype_map_elt,
2913 recompute_all_dominators): Moved to sese.h.
2915 * graphite-clast-to-gimple.c: New.
2916 * graphite-clast-to-gimple.h: New.
2917 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2918 * sese.c: Modified as said above.
2921 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2923 * graphite.c: Split scop detection to a new file.
2924 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2925 move_sd_regions, loop_affine_expr, exclude_component_ref,
2926 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2927 graphite_cannot_represent_loop_niter, struct scopdet_info,
2928 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2929 find_single_entry_edge, find_single_exit_edge,
2930 create_single_entry_edge, sd_region_without_exit,
2931 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2932 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2933 Moved to graphite-scop-detection.c.
2935 * graphite-scop-detection.c: New.
2936 * graphite-scop-detection.h: New.
2937 * Makefile.in: Add new rule for graphite-scop-detection.o.
2939 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2940 tree-scalar-evolution.h.
2941 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2942 build_sese_loop_nests): Moved here from graphite.c.
2943 (param_index): Renamed parameter_index_in_region.
2945 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2946 Sebastian Pop <sebastian.pop@amd.com>
2948 * gcc.dg/graphite/block-0.c: Expected to fail now.
2949 * gcc.dg/graphite/block-1.c: Same.
2950 * gcc.dg/graphite/block-5.c: Same.
2951 * gcc.dg/graphite/block-6.c: Same.
2953 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2954 Sebastian Pop <sebastian.pop@amd.com>
2956 * graphite.h: Separate from graphite_bb_p the polyhedral
2957 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2958 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2959 graphite-data-ref.h.
2960 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2961 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2962 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2963 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2964 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2965 scop_nb_params): Moved to graphite-poly.h.
2966 * graphite-data-ref.c: Same.
2967 * graphite-data-ref.h: New.
2969 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2970 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2971 is_interchange_valid, graphite_trans_bb_block,
2972 graphite_trans_loop_block, scop_max_loop_depth,
2973 graphite_trans_scop_block, graphite_apply_transformations,
2974 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2976 * graphite-poly.h: New.
2977 * graphite-poly.c: New.
2978 * Makefile.in (OBJS-common): Add graphite-poly.o.
2979 (graphite-poly.o): New rule.
2980 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2983 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2984 Tobias Grosser <grosser@fim.uni-passau.de>
2986 * graphite.c: Replace gb -> gbb.
2988 * graphite-data-ref.c: Same.
2990 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2991 Tobias Grosser <grosser@fim.uni-passau.de>
2993 * Makefile.in (OBJS-commmon): Add sese.o.
2995 (graphite.o): Add sese.h.
2996 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2997 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2998 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
3000 (block_before_scop): Add missing return.
3001 (new_scop, free_scop): Remove SESE data structures.
3002 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
3003 find_scop_parameters, build_loop_iteration_domains,
3004 add_conditions_to_domain, register_scop_liveout_renames,
3005 copy_bb_and_scalar_dependences): Scop -> SESE.
3007 (add_conditions_to_domain): SCoP -> SESE and remove check
3008 (scop_contains_non_iv_scalar_phi_nodes): New.
3009 (build_scop_conditions_1, build_scop_conditions): Remove check for
3010 non iv scalar phi nodes.
3011 (print_scop_statistics): New.
3012 (graphite_transform_loops): Cleanup.
3014 * graphite.h: Move to sese & cleanup.
3018 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3019 Tobias Grosser <grosser@fim.uni-passau.de>
3021 * graphite.c (build_scop_conditions_1): Conditions are only
3022 at the end of a basic block.
3024 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3025 Tobias Grosser <grosser@fim.uni-passau>
3027 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3029 (GBB_ALPHA): Removed.
3031 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3032 Tobias Grosser <grosser@fim.uni-passau.de>
3034 * graphite-data-ref.c (graphite_test_dependence): Don't use
3035 GBB_DYNAMIC_SCHEDULE.
3036 * graphite.c (new_graphite_bb): Same.
3037 (free_graphite_bb): Same.
3038 (build_scop_dynamic_schedules): Removed.
3039 (graphite_transform_loops): Don't call it.
3040 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3041 (GBB_DYNAMIC_SCHEDULE): Removed.
3043 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3044 Tobias Grosser <grosser@fim.uni-passau.de>
3046 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3047 (print_graphite_bb): Same.
3048 (build_cloog_prog): Same.
3050 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3051 Tobias Grosser <grosser@fim.uni-passau.de>
3053 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3055 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3056 Tobias Grosser <grosser@fim.uni-passau.de>
3058 * graphite.c (build_scop_context): Don't use CloogMatrix.
3059 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3060 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3062 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3063 Tobias Grosser <grosser@fim.uni-passau.de>
3065 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3066 liveout_renames, add_params fields...
3067 (struct sese): ... here.
3068 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3069 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3071 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3072 Tobias Grosser <grosser@fim.uni-passau.de>
3074 * graphite.c (print_scop): Do not print the CLooG program.
3075 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3076 build_cloog_prog, gloog): Don't use SCOP_PROG.
3077 (find_transform): Renamed scop_to_clast.
3078 (print_generated_program, debug_generated_program): New.
3079 (graphite_transform_loops): Adapt to new interface.
3080 * graphite.h (struct scop): Remove program field.
3081 (SCOP_PROG): Removed.
3082 (print_generated_program, debug_generated_program): Declared.
3084 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3086 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3087 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3088 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3089 free_graphite_bb, build_scop_canonical_schedules,
3090 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3091 schedules are now represented using a ppl_Linear_Expression_t.
3092 * graphite.h (struct graphite_bb): Same.
3093 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3094 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3096 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3098 * graphite.c: Free local memory.
3099 * graphite-ppl.c: Same.
3101 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3103 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3104 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3105 swap_constraint_variables, scale_constraint_variable): Removed.
3106 (graphite_trans_bb_strip_mine): Remove pong.
3107 * graphite-ppl.c: Include missing header files.
3108 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3109 * graphite-ppl.h (ppl_strip_loop): Declared.
3110 * Makefile.in (graphite-ppl.o): Adjust dependences.
3112 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3114 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3115 (build_scop_iteration_domain): Same.
3117 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3119 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3121 (add_value_to_dim, scan_tree_for_params_right_scev,
3122 scan_tree_for_params_int): New.
3123 * graphite-ppl.c (oppose_constraint): New.
3124 (insert_constraint_into_matrix): Implement missing cases.
3125 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3127 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3129 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3130 use ppl_move_dimension.
3132 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3134 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3137 * graphite-ppl.c: Same.
3138 * graphite-ppl.h: Same.
3140 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3142 Revert last 3 commits.
3144 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3146 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3148 (add_value_to_dim, scan_tree_for_params_right_scev,
3149 scan_tree_for_params_int): New.
3150 * graphite-ppl.c (oppose_constraint): New.
3151 (insert_constraint_into_matrix): Implement missing cases.
3152 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3154 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3156 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3158 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3159 Tobias Grosser <grosser@fim.uni-passau.de>
3161 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3162 use ppl_move_dimension.
3163 * graphite-ppl.c (ppl_move_dimension): New.
3164 * graphite-ppl.h (ppl_move_dimension): Declared.
3166 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3168 * graphite.c: Do not include cloog/cloog.h.
3169 (print_graphite_bb): Remove ping pong, call PPL print function.
3171 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3173 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3174 (graphite.o): Add dependence on graphite-ppl.h.
3175 (graphite-ppl.o): New.
3176 (graphite-data-ref.c): Ping pong between PPL data structures
3178 * graphite-ppl.c: New.
3179 * graphite-ppl.h: New.
3180 * graphite.c: Include graphite-ppl.h.
3181 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3182 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3183 Ping pong between PPL data structures and matrices.
3184 (new_graphite_bb): Create a PPL constraint system.
3185 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3186 (build_loop_iteration_domains): Use PPL functions.
3187 * graphite.h: Include graphite-ppl.h. Fix comments.
3188 (graphite_bb): Use a ppl_Constraint_System_t instead of
3189 CloogMatrix for representing the domain.
3190 (scop): Remove static_schedule.
3191 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3193 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3195 * graphite.c: Fix some comments.
3197 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3200 * graphite.c (if_region_set_false_region): After moving a region
3201 in the false branch of a condition, remove the empty dummy
3203 (gloog): Remove wrong fix for PR38953.
3205 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3207 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3208 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3209 register_bb_in_sese, new_sese, free_sese): Moved.
3210 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3211 outermost_loop_in_scop, build_scop_iteration_domain,
3212 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3213 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3214 Use loop_in_sese_p instead of loop_in_scop_p.
3215 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3216 (free_scop): Do not free SCOP_BBS_B.
3217 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3218 ref_nb_loops): Moved here...
3219 * graphite.h (ref_nb_loops): ... from here.
3220 (struct scop): Remove bbs_b bitmap.
3221 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3222 * testsuite/gcc.dg/graphite/scop-19.c: New
3224 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3226 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3229 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3231 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3232 eq_loop_to_cloog_loop): Remove.
3233 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3234 * graphite.h (struct scop): Remove loop2cloog_loop.
3235 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3237 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3239 * opts.c (decode_options): Only add graphite options to O2
3240 if we compile with graphite enabled.
3242 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3244 * Merge from mainline (r143163:143684).
3246 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3248 * graphite.c (debug_value): Removed.
3249 * graphite.h (debug_value): Removed.
3251 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3253 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3254 after graphite: pass_copy_prop does not maintain a proper loop closed
3255 SSA form. pass_copy_prop should be fixed.
3257 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3259 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3261 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3263 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3264 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3265 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3268 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3270 * graphite.c (gloog): Return true when code gen succeeded.
3271 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3272 the code of the function did not changed. After cleanup_tree_cfg
3273 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3276 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3278 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3279 gimple_call_lhs is NULL.
3281 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3282 Tobias Grosser <tobi.grosser@amd.com>
3284 * graphite.c (graphite_trans_scop_block): Do not block single
3287 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3288 Tobias Grosser <tobi.grosser@amd.com>
3290 * graphite.c (build_scop_canonical_schedules): Start schedules at
3293 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3294 Tobias Grosser <tobi.grosser@amd.com>
3296 * graphite.c (compare_prefix_loops): New.
3297 (build_scop_canonical_schedules): Rewritten.
3298 (graphite_transform_loops): Move build_scop_canonical_schedules
3299 after build_scop_iteration_domain.
3301 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3302 Tobias Grosser <tobi.grosser@amd.com>
3304 * graphite.c (add_conditions_to_domain): Add the loops to
3305 the dimension of the iteration domain. Do copy the domain
3306 only when it exists.
3307 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3308 (add_conditions_to_constraints): New.
3309 (can_generate_code_stmt, can_generate_code): Removed.
3310 (gloog): Do not call can_generate_code.
3311 (graphite_transform_loops): Call add_conditions_to_constraints
3312 after building the iteration domain.
3314 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3315 Tobias Grosser <tobi.grosser@amd.com>
3316 Jan Sjodin <jan.sjodin@amd.com>
3318 * graphite.c (scan_tree_for_params): On substractions negate
3319 all the coefficients of the term.
3320 (clast_to_gcc_expression_red): New. Handle reduction expressions
3321 of more than two operands.
3322 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3323 (get_vdef_before_scop): Handle also the case of default definitions.
3325 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3328 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3329 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3330 (gloog): Do not call cleanup_tree_cfg.
3331 (graphite_transform_loops): Call cleanup_tree_cfg after all
3332 scops have been code generated.
3334 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3336 * passes.c (init_optimization_passes): Schedule after
3337 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3339 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3341 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3343 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3344 Set the type of an expression to the type of its assign statement.
3345 (expand_scalar_variables_expr): Do not pass loop_p.
3346 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3347 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3348 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3350 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3352 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3353 an expression to the gimple_expr_type of its assign statement.
3354 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3357 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3359 PR tree-optimization/38786
3360 * testsuite/gcc.dg/graphite/pr38786.c: New.
3361 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3362 the SSA_NAME case of expand_scalar_variables_expr.
3363 (expand_scalar_variables_expr): Also gather the scalar computation
3364 used to index the memory access.
3365 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3366 the gimple_stmt_iterator where it inserts new code.
3368 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3370 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3372 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3374 * opts.c (decode_options): Enable flag_graphite_identity and
3375 flag_loop_block in -O2 and above.
3377 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3379 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3380 Fix merge problem: replace with the file from trunk.
3382 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3384 * Merge from mainline (r141727:143163).
3386 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3387 Jan Sjodin <jan.sjodin@amd.com>
3389 PR tree-optimization/38559
3390 * testsuite/gcc.dg/graphite/pr38559.c: New.
3392 * graphite.c (debug_value, copy_constraint,
3393 swap_constraint_variables, scale_constraint_variable, ): New.
3394 (get_lower_bound, get_upper_bound): Removed.
3395 (graphite_trans_bb_strip_mine): Clean up this code that works
3396 only for constant number of iterations. Fully copy upper and
3397 lower bound constraints, not only the constant part of them.
3398 * graphite.h (debug_value): Declared.
3400 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3402 PR tree-optimization/38492
3403 PR tree-optimization/38498
3404 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3405 * tree-chrec.h (scev_is_linear_expression): Declared.
3406 * graphite.c (graphite_cannot_represent_loop_niter): New.
3407 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3408 (graphite_loop_normal_form): Use gcc_assert.
3409 (scan_tree_for_params): Use CASE_CONVERT.
3410 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3411 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3412 Use gcc_assert. Discard scops that contain unhandled cases.
3413 (build_scop_conditions): Return a boolean status for unhandled cases.
3414 (strip_mine_profitable_p): Print the loop number, not its depth.
3415 (is_interchange_valid): Pass the depth of the loop nest, don't
3416 recompute it wrongly.
3417 (graphite_trans_bb_block): Same.
3418 (graphite_trans_bb_block): Print tentative of loop blocking.
3419 (graphite_trans_scop_block): Do not print that the loop has been
3421 (graphite_transform_loops): Do not handle scops that contain condition
3424 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3426 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3427 * testsuite/gcc.dg/graphite/block-1.c: Same.
3428 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3430 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3431 * testsuite/gcc.dg/graphite/block-3.c: New.
3432 * testsuite/gcc.dg/graphite/pr38498.c: New.
3434 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3436 PR tree-optimization/38510
3437 * gcc.dg/graphite/pr38510.c: New.
3438 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3439 (translate_clast): Call recompute_all_dominators before
3441 (gloog): Call recompute_all_dominators before graphite_verify.
3443 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3445 PR tree-optimization/38492
3446 * graphite.c (rename_map_elt, debug_rename_elt,
3447 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3448 rename_map_elt_info, eq_rename_map_elts,
3449 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3450 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3451 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3452 (sese_build_livein_liveouts): New.
3453 (new_sese, free_sese): New.
3454 (new_scop): Call new_sese.
3455 (free_scop): Call free_sese.
3456 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3457 (register_old_new_names): Renamed register_old_and_new_names.
3458 (register_scop_liveout_renames, add_loop_exit_phis,
3459 insert_loop_close_phis, struct igp,
3460 default_liveout_before_guard, add_guard_exit_phis,
3461 insert_guard_phis, copy_renames): New.
3462 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3463 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3464 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3465 (scop_adjust_phis_for_liveouts): New.
3466 (gloog): Call scop_adjust_phis_for_liveouts.
3468 * graphite.h (struct sese): Documented. Added fields liveout,
3470 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3471 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3472 (struct scop): Added field liveout_renames.
3473 (SCOP_LIVEOUT_RENAMES): New.
3475 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3477 PR tree-optimization/38409
3478 * gcc.dg/graphite/pr38409.c: New.
3479 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3481 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3483 * graphite.c (gcc_type_for_cloog_iv): By default return
3485 (graphite_create_new_loop): Don't fold_convert the already
3486 fold_convert-ed expression.
3488 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3490 PR tree-optimization/38446
3491 * gcc.dg/graphite/pr38446.c: New.
3492 * graphite.c (register_bb_in_sese): New.
3493 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3494 looking at the bbs in the region.
3495 * graphite.h (sese): Add region_basic_blocks pointer set to
3496 structure and initialize at the time of defining new scop.
3498 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3500 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3501 (find_params_in_bb): Do not free data refs.
3502 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3504 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3506 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3507 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3508 * testsuite/gcc.dg/graphite/block-5.c: New.
3509 * testsuite/gcc.dg/graphite/block-6.c: New.
3510 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3511 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3512 * testsuite/gcc.dg/graphite/block-2.c: Same.
3514 * graphite.c (struct ivtype_map_elt): New.
3515 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3516 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3517 gcc_type_for_cloog_iv): New.
3518 (loop_iv_stack_patch_for_consts): Use the type of the induction
3519 variable from the original loop, except for the automatically
3520 generated loops, i.e., in the case of a strip-mined loop, in
3521 which case there is no original loop: in that case just use
3523 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3524 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3525 (clast_name_to_gcc): Accept params to be NULL.
3526 (clast_to_gcc_expression): Take an extra parameter for the type.
3527 Convert to that type all the expressions built by this function.
3528 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3529 (graphite_translate_clast_equation): Compute the type of the
3530 clast_equation before translating its LHS and RHS.
3531 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3532 (graphite_create_new_loop): Compute the type of the induction
3533 variable before translating the lower and upper bounds and before
3534 creating the induction variable.
3535 (rename_variables_from_edge, rename_phis_end_scop): New.
3536 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3537 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3538 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3539 compute_cloog_iv_types): New.
3540 (gloog): Call compute_cloog_iv_types before starting the
3541 translation of the clast.
3543 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3544 (GBB_CLOOG_IV_TYPES): New.
3545 (debug_ivtype_map): Declared.
3546 (oldiv_for_loop): New.
3548 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3551 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3552 (param_index): Assert if parameter is not know after parameter
3554 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3555 (find_scop_parameters): Mark, that we have finished parameter
3557 (graphite_transform_loops): Move condition detection before parameter
3559 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3560 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3562 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3564 * graphite.c (graphite_transform_loops): Always call find_transform ()
3565 in ENABLE_CHECKING. So we test these code paths, even if we do not
3568 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3570 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3571 (print_scop): Ditto.
3573 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3576 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3577 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3578 regions more than once.
3580 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3582 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3583 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3586 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3588 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3589 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3590 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3591 (max_precision_type): New.
3592 (value_clast): Removed.
3593 (clast_to_gcc_expression): Be more careful to types of expressions.
3594 Use max_precision_type and update use of gmp_cst_to_tree.
3595 (graphite_translate_clast_equation): Use max_precision_type.
3596 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3597 use the type of the condition.
3598 (graphite_create_new_loop): Do not use integer_type_node, use the
3599 max_precision_type of lb and ub.
3601 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3603 * graphite.c (build_scops_1): Initialize open_scop.exit
3606 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3608 * testsuite/gcc.dg/graphite/pr38084.c: New.
3609 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3610 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3611 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3612 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3613 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3615 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3616 Jan Sjodin <jan.sjodin@amd.com>
3617 Harsha Jagasia <harsha.jagasia@amd.com>
3629 * testsuite/gcc.dg/graphite/pr38073.c: New.
3630 * testsuite/gcc.dg/graphite/pr37928.c: New.
3631 * testsuite/gcc.dg/graphite/pr37883.c: New.
3632 * testsuite/gcc.dg/graphite/pr38125.c: New.
3633 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3634 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3635 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3637 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3638 the number of detected scops. Copy exact same test for loop
3640 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3641 loops to be blocked as reductions are not handled.
3642 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3644 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3645 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3647 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3648 * Makefile.in (graphite.o): Depend on value-prof.h.
3649 (graphite.o-warn): Removed -Wno-error.
3650 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3651 to be a NULL pointer. Call update_stmt. Return the newly created
3652 cannonical induction variable.
3654 * graphite.h (debug_rename_map): Declared. Fix some comments.
3656 * graphite.c: Reimplement the code generation from graphite to gimple.
3657 Include value-prof.h.
3658 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3659 (get_old_iv_from_ssa_name): Removed.
3660 (graphite_stmt_p): New.
3661 (new_graphite_bb): Test for useful statements before building a
3662 graphite statement for the basic block.
3663 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3664 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3666 (recompute_all_dominators, graphite_verify,
3667 nb_reductions_in_loop, graphite_loop_normal_form): New.
3668 (scop_record_loop): Call graphite_loop_normal_form.
3669 (build_scop_loop_nests): Iterate over all the blocks of the
3670 function instead of relying on the incomplete information from
3671 SCOP_BBS. Return the success of the operation.
3672 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3673 (add_bb_domains): Removed.
3674 (build_loop_iteration_domains): Don't call add_bb_domains.
3675 Add the iteration domain only to the basic blocks that have been
3676 translated to graphite.
3677 (build_scop_conditions_1): Add constraints only if the basic
3678 block have been translated to graphite.
3679 (build_scop_data_accesses): Completely disabled until data
3680 dependence is correctly implemented.
3681 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3682 (remove_all_edges_1, remove_all_edges): Removed.
3683 (get_new_name_from_old_name): New.
3684 (graphite_rename_variables_in_stmt): Renamed
3685 rename_variables_in_stmt. Call get_new_name_from_old_name.
3686 Use replace_exp and update_stmt.
3687 (is_old_iv): Renamed is_iv.
3688 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3689 Use replace_exp and update_stmt.
3690 (expand_scalar_variables_expr): Same. Use the map to get the
3691 new names for the renaming of induction variables and for the
3692 renaming of variables after a basic block has been copied.
3693 (expand_scalar_variables): Same.
3694 (graphite_rename_variables): Renamed rename_variables.
3695 (move_phi_nodes): Removed.
3696 (get_false_edge_from_guard_bb): New.
3697 (build_iv_mapping): Do not insert the induction variable of a
3698 loop in the renaming iv map if the basic block does not belong
3700 (register_old_new_names, graphite_copy_stmts_from_block,
3701 copy_bb_and_scalar_dependences): New.
3702 (translate_clast): Heavily reimplemented: copy basic blocks,
3703 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3704 At each translation step call graphite_verify ensuring the
3705 consistency of the SSA, loops and dominators information.
3706 (collect_virtual_phis, find_vdef_for_var_in_bb,
3707 find_vdef_for_var_1, find_vdef_for_var,
3708 patch_phis_for_virtual_defs): Removed huge hack.
3709 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3710 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3711 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3712 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3713 if_region_get_condition_block, if_region_set_false_region,
3714 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3715 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3716 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3717 rewrite_into_sese_closed_ssa): New.
3718 (gloog): Remove dead code. Early return if code cannot be
3719 generated. Call cleanup_tree_cfg once the scop has been code
3721 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3722 block loops with less than two loops.
3723 (graphite_apply_transformations): Remove the call to
3724 scop_remove_ignoreable_gbbs.
3725 (limit_scops): When build_scop_loop_nests fails, continue on
3726 the next scop. Fix open_scop.entry.
3727 (graphite_transform_loops): Call recompute_all_dominators: force the
3728 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3729 Call initialize_original_copy_tables and free_original_copy_tables
3730 to be able to copy basic blocks during code generation.
3731 When build_scop_loop_nests fails, continue on next scop.
3732 (value_clast): New union.
3733 (clast_to_gcc_expression): Fix type cast warning.
3735 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3737 * Merge from mainline (r140838:141727).
3739 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3743 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3745 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3749 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3750 exits and conditions.
3751 * testsuite/gcc.dg/graphite/pr37943.c: New.
3753 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3756 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3758 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3760 * doc/invoke.texi: Fix spaces.
3762 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3764 PR tree-optimization/37891
3765 Reverted last commit.
3766 * graphite.c (create_single_entry_edge): Set
3767 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3769 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3770 Mitul Thakkar <mitul.thakkar@amd.com>
3772 * graphite.c (create_single_entry_edge): Set
3773 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3775 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3777 * doc/invoke.texi: Add -fgraphite-identity.
3778 * graphite.c (graphite_apply_transformations): Check for
3779 -fgraphite-identity.
3780 * toplev.c (process_options): Add flag_graphite_identity.
3781 * tree-ssa-loop.c: Add flag_graphite_identity.
3783 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3785 Undo changes from 2008-10-02:
3786 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3787 operand type when copying the operand to a variable of different type.
3788 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3789 with the IV name after increment.
3791 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3792 Harsha Jagasia <harsha.jagasia@amd.com>
3794 PR tree-optimization/37828
3795 * testsuite/gcc.dg/graphite/pr37828.c: New.
3796 * graphite.c (graphite_trans_loop_block): Do not loop block
3797 single nested loops.
3799 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3800 Sebastian Pop <sebastian.pop@amd.com>
3802 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3803 rename_map_elt_info, eq_rename_map_elts): New.
3804 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3805 (expand_scalar_variables_expr): Change parameters.
3806 (expand_scalar_variables_stmt): Same.
3807 (expand_scalar_variables): Same.
3808 (graphite_rename_ivs): Rename graphite_rename_variables.
3809 (build_iv_mapping): New.
3810 (translate_clast): Call build_iv_mapping.
3811 * graphite.h (gbb_p): New name.
3813 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3815 PR tree-optimization/37684
3816 * gcc.dg/graphite/pr37684.c: New.
3817 * graphite.c (exclude_component_ref): New.
3818 (is_simple_operand): Call exclude_component_ref.
3820 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3821 Harsha Jagasia <harsha.jagasia@amd.com>
3823 PR tree-optimization/37485
3824 * gcc.dg/graphite/block-2.c: New
3825 * graphite.c (gmp_cst_to_tree): Moved.
3826 (iv_stack_entry_is_constant): New.
3827 (iv_stack_entry_is_iv): New.
3828 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3829 (loop_iv_stack_insert_constant): New.
3830 (loop_iv_stack_pop): Use new datatpype.
3831 (loop_iv_stack_get_iv): Same.
3832 (loop_iv_stack_get_iv_from_name): Same.
3833 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3834 (loop_iv_stack_patch_for_consts): New.
3835 (loop_iv_stack_remove_constants): New.
3836 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3837 (translate_clast): Call loop_iv_stack_patch_for_consts and
3838 loop_iv_stack_remove_constants.
3839 (gloog): Use new datatype. Redirect construction edge to end
3840 block to avoid accidental deletion.
3841 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3843 (union iv_stack_entry_data): New. Data in iv stack entry.
3844 (struct iv_stack_entry): New. Datatype for iv stack entries.
3846 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3848 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3849 operand type when copying the operand to a variable of different type.
3851 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3853 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3854 with the IV name after increment.
3856 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3858 * Merge from mainline (r140164:140838).
3860 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3862 * graphite-data-ref.c: New.
3863 * graphite.c (print_scop): Also dump the dependence graph.
3864 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3865 (new_scop): Initialize SCOP_DEP_GRAPH.
3866 (build_scop_dynamic_schedules): New.
3867 (build_access_matrix_with_af): Fixed column numbering.
3868 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3869 * graphite.h: Add ifndef/define guards against multiple inclusion.
3870 (struct scop): Add dep_graph field.
3871 (SCOP_DEP_GRAPH): Defined.
3872 (ref_nb_loops): Fixed and moved to other position.
3873 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3874 (nb_loops_around_loop_in_scop): New.
3875 (graphite_dump_dependence_graph): Declared.
3876 (graphite_build_rdg_all_levels): Declared.
3877 (graphite_test_dependence): Declared.
3878 * Makefile.in (graphite-data-ref.o): New target.
3880 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3882 * Merge from mainline (139870:140164).
3884 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3886 * Merge from mainline (138275:139870).
3887 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3888 the commits from trunk broke the niter detection.
3890 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3892 * graphite.c: Add more documentation. Fix formatting.
3893 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3894 loop_iv_stack_debug): Moved...
3895 (schedule_to_scattering): Move before use.
3896 (dot_all_scops): Include in "#if 0" the code for system
3899 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3900 loop_iv_stack_debug): ...here.
3902 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3904 * tree-phinodes.c (make_phi_node): Extern.
3905 (add_phi_node_to_bb): New.