1 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
3 * graphite-interchange.c: Fix comments.
4 * gcc.dg/graphite/block-1.c: Fix comments.
6 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
8 * gcc.dg/graphite/interchange-7.c: Un-XFAILed.
9 * gcc.dg/graphite/interchange-9.c: Un-XFAILed.
11 2009-10-16 Sebastian Pop <sebastian.pop@amd.com>
13 Reapply the patch from Alexander Monakov that disappeared during
14 the last merges from trunk.
16 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
18 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
19 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
21 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
23 * graphite-interchange.c (memory_stride_in_loop): The depth
24 argument corresponds to a dynamic time dimension, so use
25 psct_dynamic_dim to refer to the transformed scattering dimension.
27 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
29 * graphite-interchange.c (memory_stride_in_loop): Fix comments.
31 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
33 * graphite-blocking.c (lst_do_strip_mine): Avoid strip mining the
35 * graphite-interchange.c (lst_do_interchange): Avoid interchanging
37 * graphite-poly.c (scop_to_lst): Fix LST sequence in an outermost
39 (print_lst): Print the root of LST in a different format.
40 * graphite-poly.h (lst_depth): Adjust to include the root of the LST.
42 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
44 * graphite-poly.c (print_scop): Fix pretty printing of a SCoP.
46 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
48 * doc/passes.texi: Document the Graphite infrastructure.
50 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
52 * graphite-sese-to-poly.c (insert_copyin): Use gsi_insert_seq_on_edge.
53 (rewrite_commutative_reductions_out_of_ssa): Call gsi_commit_edge_inserts,
54 and check the SSA representation.
56 * gfortran.dg/graphite/id-18.f90: New, reduced from PR41193.
58 2009-10-15 Sebastian Pop <sebastian.pop@amd.com>
60 * gcc.dg/graphite/pr40157.c: Use -floop-block as reported in the PR.
62 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
64 * gcc.dg/graphite/interchange-11.c: New.
66 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
68 * gcc.dg/graphite/interchange-8.c: Enable loop interchange.
70 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
72 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
73 Add -fno-loop-strip-mine and -fno-loop-interchange.
74 (DEFAULT_FLAGS_GRAPHITE_INTERCHANGE): Add -fno-loop-block and
76 * gfortran.dg/graphite/graphite.exp: Same.
78 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
80 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
81 Renamed DEFAULT_FLAGS_GRAPHITE_BLOCK.
82 (DEFAULT_CFLAGS_GRAPHITE_IDENTITY): Renamed
83 DEFAULT_FLAGS_GRAPHITE_IDENTITY.
84 (DEFAULT_CFLAGS_GRAPHITE_INTERCHANGE): Renamed
85 DEFAULT_FLAGS_GRAPHITE_INTERCHANGE.
86 (DEFAULT_CFLAGS_GRAPHITE_SCOP): Renamed
87 DEFAULT_FLAGS_GRAPHITE_SCOP.
88 (DEFAULT_CFLAGS_RUN_ID): Renamed DEFAULT_FLAGS_RUN_ID.
89 (DEFAULT_CFLAGS_GRAPHITE): Renamed DEFAULT_FLAGS_GRAPHITE.
91 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
93 * graphite-poly.c (pbb_number_of_iterations_at_time): Cleanup comments.
95 2009-10-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
96 Sebastian Pop <sebastian.pop@amd.com>
98 * graphite-interchange.c (build_linearized_memory_access): Pass an
100 (memory_stride_in_loop): Include transform scattering in the
101 access functions to be able to querry the strides in the
103 (pbb_interchange_loop_depths): Interchange the psct_dynamic_dim,
104 not the psct_iterator_dim.
106 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
108 * graphite-blocking.c (pbb_do_strip_mine): Removed.
109 (lst_do_strip_mine_loop): New.
110 (lst_do_strip_mine): New.
111 (scop_do_strip_mine): Call lst_do_strip_mine.
112 * graphite-poly.h (lst_add_loop_under_loop): New.
113 (lst_find_first_pbb): New.
115 2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
117 * graphite-poly.c (loop_to_lst): Fix LST creation.
119 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
121 * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with
122 sizeof(unsigned long) to make it run on 32bit systems.
124 2009-10-14 Tobias Grosser <grosser@fim.uni-passau.de>
126 * testsuite/gcc.dg/graphite/run-id-1.c: Use smaller matrix to not
129 2009-10-14 Ramakrishna Upadrasta <Ramakrishna.Upadrasta@inria.fr>
131 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): Fix
133 (write_alias_graph_to_ascii_dot): New.
134 (write_alias_graph_to_ascii_ecc): Ditto.
135 (partition_drs_to_sets): Add testing of optimality of current method
136 which assigns alias numbers according to DFS Comopnent number. used
137 as heuristic for the upcoming ECC algorithm.
138 (build_scop_drs): Write to file also with the ecc and dot format.
140 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
142 * gfortran.dg/graphite/interchange-1.f: XFail.
144 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
146 * graphite.c (graphite_initialize): Do not handle functions with
147 more than 100 basic blocks.
149 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
151 * graphite-blocking.c (pbb_do_strip_mine): Use
152 PARAM_LOOP_BLOCK_TILE_SIZE.
154 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
156 * graphite-poly.c (dot_lst_1): New.
158 * graphite-poly.h (dot_lst): Declared.
160 2009-10-13 Sebastian Pop <sebastian.pop@amd.com>
162 * graphite-dependences.c (dot_deps_stmt_1): New.
163 (dot_deps_stmt): New.
164 * graphite-dependences.h (dot_deps_stmt): Declared.
166 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
168 * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_dependence): Do
169 not replace cross BB scalar dependences ending on PHI nodes.
170 (rewrite_cross_bb_scalar_deps): Filter out GIMPLE_PHI nodes.
172 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
174 * graphite-poly.c (apply_poly_transforms): Implement the high
175 level driver for flag_loop_block.
176 * tree-ssa-loop.c (gate_graphite_transforms): Remove call to sorry for
179 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add
181 * gfortran.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK):
184 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-poly.h (lst_find_pbb): New.
187 (find_lst_loop): New.
189 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
191 * graphite-poly.c (new_scop): Remove init of SCOP_DEP_GRAPH.
192 * graphite-poly.h (struct scop): Remove dep_graph field.
193 (SCOP_DEP_GRAPH): Removed.
195 2009-10-09 Sebastian Pop <sebastian.pop@amd.com>
197 * graphite-poly.h (copy_lst): Do full copy of LST.
199 2009-10-07 Sebastian Pop <sebastian.pop@amd.com>
201 * graphite-sese-to-poly.c (reduction_phi_p): Call remove_invariant_phi
202 when the loop stride is zero.
204 * gcc.dg/graphite/id-16.c: New.
206 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
208 * graphite-dependences.c (reduction_dr_1): New.
209 (reduction_dr_p): New.
210 (graphite_legal_transform_dr): Call reduction_dr_p.
211 (reduction_ddr): Renamed reduction_ddr_p.
212 * graphite-poly.h (same_pdr_p): New.
213 (number_of_write_pdrs): New.
214 * graphite-sese-to-poly.c (nb_data_writes_in_bb): New.
215 (split_reduction_stmt): Do not split reduction statements
216 when there are no writes to memory.
217 (translate_scalar_reduction_to_array_for_stmt): Insert the
218 memory reduction statement just after the scalar reduction statement.
220 * gcc.dg/graphite/interchange-10.c: Updated to differ from interchange-4.c.
222 * gcc.dg/graphite/interchange-3.c: Un-XFAIL-ed.
223 * gcc.dg/graphite/interchange-4.c: Un-XFAIL-ed.
225 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
227 * graphite-interchange.c (lst_apply_interchange): New.
228 (lst_interchange_profitable_p): New.
229 (lst_try_interchange_loops): New.
230 (lst_try_interchange): New.
231 (lst_do_interchange): New.
232 (pbb_do_interchange): Removed.
233 (scop_do_interchange): Call lst_do_interchange.
235 2009-10-06 Sebastian Pop <sebastian.pop@amd.com>
237 * graphite-poly.c (print_scop): Print SCOP_ORIGINAL_SCHEDULE and
238 SCOP_TRANSFORMED_SCHEDULE.
243 * graphite-poly.h (lst_p): New.
246 (LST_LOOP_FATHER): New.
249 (scop_to_lst): Declared.
250 (print_lst): Declared.
251 (debug_lst): Declared.
256 (lst_dewey_number): New.
257 (struct scop): Add original_schedule and transformed_schedule fields.
258 (SCOP_ORIGINAL_SCHEDULE): New.
259 (SCOP_TRANSFORMED_SCHEDULE): New.
260 * graphite-sese-to-poly.c (build_poly_scop): Call scop_to_lst.
262 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
264 * graphite-dependences.c (reduction_ddr): New.
265 (graphite_legal_transform_bb): Call reduction_ddr.
266 * graphite-poly.c (new_poly_bb): Pass a new bool parameter.
267 Initialize PBB_IS_REDUCTION.
268 * graphite-poly.h (struct poly_bb): New bool field is_reduction.
269 (PBB_IS_REDUCTION): New.
270 (new_poly_bb): Update declaration.
271 * graphite-scop-detection.h (build_scop_bbs): Removed.
272 (nb_reductions_in_loop): Removed.
273 * graphite-sese-to-poly.c (try_generate_gimple_bb): Pass a sbitmap
274 parameter for reductions.
275 (try_generate_gimple_bb): Update call to new_poly_bb.
276 (build_scop_bbs_1): Same.
277 (build_scop_bbs): Same.
278 (gsi_for_phi_node): New.
279 (scalar_close_phi_node_p): Remove gcc_assert.
280 (split_reduction_stmt): New.
281 (is_reduction_operation_p): New.
282 (phi_contains_arg): New.
283 (follow_ssa_with_commutative_ops): New.
284 (detect_commutative_reduction_arg): New.
285 (detect_commutative_reduction_assign): New.
286 (follow_inital_value_to_phi): New.
287 (edge_initial_value_for_loop_phi): New.
288 (initial_value_for_loop_phi): New.
289 (detect_commutative_reduction): New.
290 (translate_scalar_reduction_to_array_for_stmt): New.
291 (insert_copyout): New.
292 (insert_copyin): New.
293 (translate_scalar_reduction_to_array): New.
294 (rewrite_commutative_reductions_out_of_ssa_close_phi): New.
295 (rewrite_commutative_reductions_out_of_ssa_loop): New.
296 (rewrite_commutative_reductions_out_of_ssa): New.
297 (build_poly_scop): Call rewrite_commutative_reductions_out_of_ssa.
298 * sese.h (split_region_for_bb): New.
300 * gcc.dg/graphite/graphite.exp (DEFAULT_CFLAGS_GRAPHITE_BLOCK): Add -ffast-math.
301 * gcc.dg/graphite/interchange-1.c: Fix format.
302 * gcc.dg/graphite/interchange-10.c: New.
304 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
306 * graphite-sese-to-poly.c (insert_out_of_ssa_copy): Remove
309 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
311 * graphite-sese-to-poly.c (scev_analyzable_p): New.
312 (rewrite_cross_bb_scalar_dependence): New.
313 (rewrite_cross_bb_scalar_deps): New.
314 (rewrite_reductions_out_of_ssa): Use bb_in_sese_p.
315 Call rewrite_cross_bb_scalar_deps.
317 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
319 * graphite-sese-to-poly.c (gsi_for_ssa_name_def): Removed.
320 (insert_out_of_ssa_copy): Directly use gsi_after_labels and
323 2009-10-05 Sebastian Pop <sebastian.pop@amd.com>
325 * graphite-clast-to-gimple.c (build_cloog_prog): Use pbb_index.
326 * graphite-interchange.c (pbb_do_interchange): Same.
327 * graphite-poly.c (print_scattering_function): Same.
329 * graphite-poly.h (pbb_loop): New.
330 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Use pbb_loop.
332 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
334 * graphite-scop-detection.c (limit_scops): Do not build poly_bbs.
336 2009-09-27 Sebastian Pop <sebastian.pop@amd.com>
338 * graphite-sese-to-poly.c (partition_drs_to_sets): Drs is not modified,
339 so don't pass a pointer to it.
340 (build_alias_set_for_drs): Same.
341 (build_base_obj_set_for_drs): Same.
342 (build_scop_drs): Same.
344 2009-09-26 Li Feng <nemokingdom@gmail.com>
346 * graphite-sese-to-poly.c (build_scop_drs): Disable writing to file
347 the alias graph of data references.
349 2009-09-25 Li Feng <nemokingdom@gmail.com>
351 * graphite-sese-to-poly.c (write_alias_graph_to_ascii_dimacs): New.
352 (build_scop_drs): When debugging, write the alias graph to file,
353 otherwise, should be disabled.
355 2009-09-17 Sebastian Pop <sebastian.pop@amd.com>
357 * graphite-scop-detection.c (stmt_simple_memref_p): Removed.
358 (is_simple_operand): Remove call to stmt_simple_memref_p.
359 (stmt_simple_for_scop_p): Update call to is_simple_operand.
361 2009-09-17 David Edelsohn <edelsohn@gnu.org>
363 * testsuite/gcc.dg/graphite/interchange-mvt.c: New File.
364 * testsuite/gcc.dg/graphite/scop-dsyrk.c: New File.
365 * testsuite/gcc.dg/graphite/scop-dsyr2k.c: New File.
366 * testsuite/gcc.dg/graphite/scop-mvt.c: New File.
367 * testsuite/gcc.dg/graphite/scop-sor.c: New File.
369 2009-09-17 Li Feng <nemokingdom@gmail.com>
372 * graphite-dependences.c (poly_drs_may_alias_p): Adjust definition.
373 (pddr_original_scattering): Make sure 2 pdr2 in the same base object set.
374 (graphite_carried_dependence_level_k): Ditto.
375 * graphite-poly.c (new_poly_dr): Add init of PDR_BASE_OBJECT_SET.
376 * graphite-poly.h (struct poly_dr): Add member dr_base_object_set.
377 (new_poly_dr): Adjust declaration.
378 * graphite-sese-to-poly.c (free_data_refs_aux): New.
379 (free_gimple_bb): Added free_data_refs_aux.
380 (build_poly_dr): Add dr_base_object_set.
381 (partition_drs_to_sets): New.
382 (dr_same_base_object_p): New.
383 (build_alias_set_for_drs): New.
384 (build_base_object_set_for_drs): New.
385 (build_scop_drs): Add build_base_obj_set_for_drs.
386 * graphite-sese-to-poly.h: Added #define for alias set number index and
387 base object set index.
388 * libgomp/testsuite/libgomp.graphite/force-parallel-6.c: Refine tests.
389 * libgomp/testsuite/libgomp.graphite/pr4118.c: New.
391 2009-09-16 Alexander Monakov <amonakov@ispras.ru>
393 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Add bounds only
394 for ARRAY_REFs. Use array_ref_{low,up}_bound to determine bounds.
396 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
398 * graphite-sese-to-poly.c (struct irp_data): Removed.
399 (idx_record_params): Removed.
400 (find_params_in_bb): Scan for parameters the access functions; don't
401 parse the tree representation.
403 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
405 * tree-ssa-loop.c (gate_graphite_transforms): Disable Graphite
406 passes at -O1 and below.
408 2009-09-14 Sebastian Pop <sebastian.pop@amd.com>
410 * graphite-blocking.c: Fix order of includes: tree-chrec.h, then
411 tree-scalar-evolution.h, and then tree-data-ref.h.
412 * graphite-clast-to-gimple.c: Same.
413 * graphite-dependences.c: Same.
414 * graphite-interchange.c: Same.
415 * graphite-poly.c: Same.
416 * graphite-scop-detection.c: Same.
417 * graphite-sese-to-poly.c: Same.
419 * lambda-code.c: Same.
420 * matrix-reorg.c: Same.
421 * tree-data-ref.c: Same.
422 * tree-if-conv.c: Same.
423 * tree-loop-distribu: Same.: Same.
424 * tree-loop-linear.c: Same.
425 * tree-parloops.c: Same.
426 * tree-predcom.c: Same.
427 * tree-vect-patterns.c: Same.
429 2009-09-02 Sebastian Pop <sebastian.pop@amd.com>
431 Partially revert the previous patch, except the following.
432 * tree-scalar-evolution.c (instantiate_scev_not): Adapted to pass
433 as parameters the operands of the not expression.
435 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
437 * tree-scalar-evolution.c (instantiate_scev_assign): New.
438 Do not call analyze_scalar_evolution on assignments.
439 (instantiate_scev_phi): Call analyze_scalar_evolution.
440 (instantiate_scev_name): Call instantiate_scev_assign and
441 instantiate_scev_phi.
442 (instantiate_scev_not): Adapted to pass as parameters the operands
443 of the not expression.
445 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
447 * tree-scalar-evolution.c (instantiate_scev_binary): Adapted
448 to pass as parameters the operands of the binary expression.
450 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
452 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
453 instantiate_scev_not. Handle NEGATE_EXPR.
454 (instantiate_scev_r): Handle NEGATE_EXPR.
456 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
458 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
460 (instantiate_scev_r): Move code in instantiate_scev_2
461 and instantiate_scev_1.
463 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
465 * tree-scalar-evolution.c (instantiate_scev_3): New.
466 (instantiate_scev_1): Move code in instantiate_scev_3.
468 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
470 * tree-scalar-evolution.c (instantiate_scev_poly): New.
471 (instantiate_scev_1): Move code in instantiate_scev_poly.
473 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
475 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
476 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
478 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
480 * tree-scalar-evolution.c (instantiate_scev_convert): New.
481 (instantiate_scev_1): Move code in instantiate_scev_convert.
483 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
485 * tree-scalar-evolution.c (instantiate_scev_binary): New.
486 (instantiate_scev_1): Move code in instantiate_scev_binary.
488 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
490 * tree-scalar-evolution.c (instantiate_scev_name): New.
491 (instantiate_scev_1): Move code in instantiate_scev_name.
493 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
495 * Merge from mainline (150992:151171).
497 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
499 * graphite-dependences.c (graphite_legal_transform_bb): Call
500 pbb_remove_duplicate_pdrs.
501 * graphite-poly.c (can_collapse_pdr): Removed.
502 (pdr_find_duplicate): Removed.
503 (can_collapse_pdrs): New.
504 (pbb_remove_duplicate_pdrs): New.
505 (new_poly_dr): Do not look for duplicates.
506 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
507 (PBB_PDR_DUPLICATES_REMOVED): New.
508 (pbb_remove_duplicate_pdrs): Declared.
510 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
512 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
513 the strides by multiplying by PDR_NB_REFS.
514 * graphite-poly.c (can_collapse_pdr): New.
515 (pdr_find_duplicate): New.
516 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
517 Initialize PDR_NB_REFS.
518 * graphite-poly.h (struct poly_dr): Add field nb_refs.
520 (new_poly_dr): Number of subscripts is a graphite_dim_t.
522 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
524 Revert one of the previous commits:
525 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
526 the computation of symmetric data dependence relations.
527 (dependency_between_pbbs_p): Same.
529 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
532 * graphite-poly.c (apply_poly_transforms): Remove legality test before
535 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
537 * graphite-dependences.c (pddr_original_scattering): Return NULL
538 for read-read dependence relations.
539 * graphite-poly.h (enum poly_dr_type): Fix comment.
542 (pdr_may_write_p): New.
544 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
546 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
547 (struct poly_dr): Same.
549 * graphite-poly.c (new_poly_dr): Same.
551 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
552 Sebastian Pop <sebastian.pop@amd.com>
554 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
555 pbb_strip_mine_time_depth. Changed the implementation so that
556 transformation is expressed as a transformation on
557 time (scatttering) dimensions. Also, ensures that the 2d+1
558 scheduling format is preserved.
559 (pbb_strip_mine_profitable_p): Profitability is based on the
560 iteration number of a given time (scattering) dimension,
561 and not on a original loop depth dimension.
562 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
563 (pbb_do_strip_mine): Call psct_dynamic_dim.
564 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
565 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
566 (pbb_nb_dynamic_scattering_transform): New.
567 (psct_dynamic_dim): New.
569 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
571 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
572 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
573 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
574 * graphite-interchange.c (build_linearized_memory_access): Same.
575 (memory_stride_in_loop): Same.
577 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
579 * graphite-dependences.c (pddr_original_scattering): New.
580 (graphite_legal_transform_dr): Call pddr_original_scattering.
583 * graphite-dependences.h (dot_deps): Declared.
584 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
585 (print_pdr): Print PDR_ID.
586 * graphite-poly.h (struct poly_dr): Add field id.
589 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
591 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
593 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
594 not delete the original dependence relation.
596 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
598 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
599 the computation of symmetric data dependence relations.
600 (dependency_between_pbbs_p): Same.
602 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
604 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
605 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
606 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
607 (free_poly_ddr): New.
608 (pddr_is_empty): New.
609 (dependence_polyhedron_1): Now returns a poly_ddr_p.
610 (dependence_polyhedron): Same. Remove useless gcc_assert.
612 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
613 (graphite_carried_dependence_level_k): Call pddr_is_empty.
614 * graphite-dependences.h (enum poly_dependence_kind): New.
615 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
616 (PDRP_SOURCE): Renamed PDDR_SOURCE.
617 (PDRP_SINK): Renamed PDDR_SINK.
618 (PDRP_DDP): Renamed PDDR_DDP.
620 (free_poly_ddr): Declared.
621 * graphite-poly.c (new_scop): Use the new hash function names.
622 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
624 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
626 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
628 * Merge from mainline (150764:150992).
630 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
632 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
633 bounds with LT_EXPR to make niter analysis more precise on code
634 generated by Graphite.
636 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
638 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
639 (graphite_legal_transform_bb): Same.
640 (poly_drs_may_alias_p): Same.
642 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
645 * graphite-ppl.c (ppl_max_for_le): Correct the use of
646 ppl_Pointset_Powerset_C_Polyhedron_maximize.
648 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
650 * graphite-poly.c (print_pbb): Print PBB index.
652 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
654 * Merge from mainline (r150672:150764).
656 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
658 * graphite-interchange.c (ppl_max_for_le): Moved...
659 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
660 * graphite-ppl.c (ppl_max_for_le): ... here.
661 * graphite-ppl.h (ppl_max_for_le): Declared.
663 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
665 * Merge from mainline (r150372:150672).
667 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
670 * sese.c (convert_for_phi_arg): New.
671 (add_guard_exit_phis): Use convert_for_phi_arg.
673 * testsuite/gfortran.dg/graphite/id-17.f: New.
675 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
677 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
678 unknown subscript upper bounds.
680 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
682 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
683 Pranav Garg <pranav.garg2107@gmail.com>
685 * graphite-interchange.c (gather_access_strides): Removed.
686 (ppl_max_for_le): New.
687 (build_linearized_memory_access): New.
688 (memory_stride_in_loop): New.
689 (pbb_interchange_profitable_p): Reimplemented.
690 * graphite-ppl.h (ppl_new_id_map): New.
691 (ppl_interchange): New.
693 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
695 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
697 * graphite-interchange.c (compute_subscript): Removed.
698 (compute_array_size_cstr): Removed.
699 (compute_array_size_poly): Removed.
700 (compute_array_size): Removed.
701 (gather_access_strides_poly): Removed.
702 (gather_access_strides): Empty.
704 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
706 * graphite-dependences.c (dependence_polyhedron_1): Replace
707 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
708 (graphite_legal_transform_dr): Same.
709 (graphite_carried_dependence_level_k): Same.
710 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
711 Initialize PDR_NB_SUBSCRIPTS.
712 (print_pdr_access_layout): Replace pdr_nb_subscripts with
714 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
715 (PDR_NB_SUBSCRIPTS): New.
716 (pdr_nb_subscripts): Removed.
717 (pdr_dim): Simplified.
718 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
719 with PDR_NB_SUBSCRIPTS.
721 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
723 * graphite-interchange.c (compute_array_size): Remove use of
725 * graphite-poly.c (new_poly_dr): Remove argument data_container.
726 Do not initialize PDR_DATA_CONTAINER.
727 (print_pdr): Do not print PDR_DATA_CONTAINER.
728 * graphite-poly.h (struct poly_dr): Remove data_container field.
729 (PDR_DATA_CONTAINER): Removed.
730 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
732 (build_poly_dr): Same.
734 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
736 * testsuite/gcc.dg/graphite/interchange-9.c: New.
738 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
739 Sebastian Pop <sebastian.pop@amd.com>
741 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
742 copy of the dependence polyhedron. Free the temporary objects.
743 (graphite_carried_dependence_level_k): Free unused objects before
746 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
747 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
748 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
749 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
750 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
752 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
754 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
755 Early return without analyzing the data dependences if no
756 transform has been done. Call restore_scattering if the transform
758 (graphite-interchange.c): Same.
759 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
760 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
761 (apply_poly_transforms): Do not gcc_assert that
762 the transform is legal.
763 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
764 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
765 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
766 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
767 * graphite-poly.h (struct poly_scattering): New.
768 (struct poly_bb): Add original, transformed, and saved fields.
769 Remove transformed_scattering, original_scattering, nb_local_variables,
770 and nb_scattering_transform fields.
771 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
772 (poly_scattering_new): New.
773 (poly_scattering_free): New.
774 (poly_scattering_copy): New.
775 (store_scattering_pbb): New.
776 (store_scattering): New.
777 (restore_scattering_pbb): New.
778 (restore_scattering): New.
779 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
780 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
782 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
784 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
787 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
789 * Makefile.in (graphite.o): Depends on PREDICT_H.
790 * graphite.c: Include predict.h.
791 (graphite_finalize): Call tree_estimate_probability.
792 * predict.c (predict_loops): Do not call scev_initialize and
794 (tree_estimate_probability_bb): New.
795 (tree_estimate_probability): Do not initialize loops: move that
796 code to the driver. Call tree_estimate_probability_bb.
797 (tree_estimate_probability_driver): New.
798 (pass_profile): Use tree_estimate_probability_driver.
799 * predict.h (tree_estimate_probability): Declared.
801 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
803 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
804 * graphite-dependences.c (graphite_legal_transform): Add time to
805 TV_GRAPHITE_DATA_DEPS.
806 (dependency_between_pbbs_p): Same.
807 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
809 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
811 * Merge from mainline (r149952:150372).
813 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
815 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
816 * graphite-blocking.c: Same.
817 * graphite-clast-to-gimple.c: Same.
818 * graphite-dependences.c: Same.
819 * graphite-poly.c: Same.
820 * graphite-poly.h: Same.
821 * graphite-ppl.c: Same.
822 * graphite-scop-detection.c: Same.
823 * graphite-sese-to-poly.c: Same.
826 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
828 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
829 (remove_simple_copy_phi): New.
830 (remove_invariant_phi): New.
831 (simple_copy_phi_p): New.
832 (reduction_phi_p): New.
833 (gsi_for_ssa_name_def): New.
834 (insert_out_of_ssa_copy): New.
835 (insert_out_of_ssa_copy_on_edge): New.
836 (create_zero_dim_array): New.
837 (scalar_close_phi_node_p): New.
838 (rewrite_close_phi_out_of_ssa): New.
839 (rewrite_phi_out_of_ssa): New.
840 (rewrite_reductions_out_of_ssa): New.
841 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
843 * testsuite/gcc.dg/graphite/id-11.c: New.
844 * testsuite/gcc.dg/graphite/id-15.c: New.
845 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
846 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
847 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
848 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
849 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
850 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
851 * testsuite/gfortran.dg/graphite/id-13.f: New.
852 * testsuite/gfortran.dg/graphite/id-5.f: New.
854 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
856 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
857 check that nb_reductions_in_loop is zero.
858 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
860 (nb_reductions_in_loop): Removed.
861 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
862 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
863 (bb_contains_non_iv_scalar_phi_nodes): Removed.
864 (scop_contains_non_iv_scalar_phi_nodes): Removed.
865 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
867 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
869 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
870 statements that have an empty iteration domain.
871 * testsuite/gfortran.dg/graphite/id-16.f: New.
873 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
875 * tree-scalar-evolution.c (instantiate_scev_1): Return
876 chrec_dont_know when the result is not above instantiate_below.
877 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
878 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
879 the tree has a known scalar evolution.
880 * testsuite/gfortran.dg/graphite/id-14.f: New.
881 * testsuite/gfortran.dg/graphite/id-15.f: New.
883 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
885 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
887 (rename_variables): Keep inserting renames after the ones already
890 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
892 * graphite-sese-to-poly.c (compare_bb_depths): New.
893 (graphite_sort_dominated_info): New.
894 (build_scop_bbs_1): Call graphite_sort_dominated_info.
895 (build_scop_scattering): Fix comment.
897 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
899 * graphite.c (graphite_finalize): Call print_loops instead of
900 dump_function_to_file.
901 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
902 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
903 loops generated in the graphite output file.
904 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
905 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
906 * testsuite/gfortran.dg/graphite/id-12.f: New.
908 2009-07-24 Li Feng <nemokingdom@gmail.com>
910 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
913 2009-07-24 Li Feng <nemokingdom@gmail.com>
914 Tobias Grosser <grosser@fim.uni-passau.de>
916 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
917 alias set number build alias in ACCESSES polyhedron.
918 (build_alias_set_for_drs): New.
919 (build_pbb_drs): Added build_alias_set_for_drs.
920 * graphite-dependences.c (poly_drs_may_alias_p): New.
921 (graphite_carried_dependence_level_k): Check alias information
922 before building polyhedron.
924 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
926 * Makefile.in (lambda-code.o): Fix formatting.
928 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
930 * Merge from mainline (r149350-149952)
932 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
934 * graphite-poly.c (apply_poly_transforms): Move strip_mine
935 before interchange to prepare for loop blocking.
937 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
939 * graphite-poly.c (apply_poly_transforms): Add checks after every
941 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
942 done in apply_poly_transforms.
944 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
946 * graphite-dependences.c (build_lexicographically_gt_constraint):
947 Replace RES parameter with *RES.
948 (dependence_polyhedron_1): Pass an address of the parameter RES
949 instead of value of RES.
951 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
953 * graphite.c (graphite_finalize): Fix comment.
954 (graphite_transform_loops): Reset scev info after code generation
957 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
959 * graphite.c (graphite_finalize): Call scev_reset.
961 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
963 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
964 GBB_CLOOG_IV_TYPES hash table twice.
965 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
966 (add_condition_to_domain): Clear GMP values.
968 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
970 * graphite-dependences.c: Fix formatting.
971 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
972 (pbb_number_of_iterations): Free ppl_Linear_Expression.
973 * graphite-sese-to-poly.c: Fix formatting.
974 * graphite.c (graphite_transform_loops): Create the hash table
975 after the early return.
977 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
979 * testsuite/gcc.dg/graphite/id-14.c: New.
980 * testsuite/gcc.dg/graphite/pr40157.c: New.
981 * testsuite/gfortran.dg/graphite/id-11.f: New.
983 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
985 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
986 (build_poly_scop): Return false when there are no pbbs within
987 loops to avoid to pass to cloog scops with no loops.
989 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
991 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
992 useless test "i % 2".
993 (build_pbb_scattering_polyhedrons): Fix formatting.
994 (build_poly_dr): Same.
995 * graphite.c (graphite_transform_loops): Restructure.
997 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
999 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
1000 reduction_list parameter.
1001 (rewrite_all_phi_nodes_with_iv): Same.
1002 (canonicalize_loop_ivs): Same.
1003 * tree-parloops.c (struct brli): Removed.
1004 (build_reduction_list_info): Removed.
1005 (build_new_reduction): New.
1006 (analyze_reduction_list): Removed.
1007 (gather_scalar_reductions): Find reductions instead of phi
1008 nodes that can't be canonicalized.
1009 (try_create_reduction_list): Remove reduction_list parameter.
1010 (gen_parallel_loop): Same.
1011 (parallelize_loops): Remove analyze_reductions variable,
1012 initialization and free.
1013 Change reduction_list htab initialization to reduction_info
1014 elements instead of ssa names.
1015 Call try_create_reduction_list and gen_parallel_loop without
1016 analyzed_reduction argument.
1017 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
1018 canonicalize_loop_ivs with one less argument.
1019 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
1021 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1023 * graphite-dependences.c (new_poly_dr_pair): New.
1024 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
1025 (new_poly_dr_pair): New.
1026 (eq_poly_dr_pair_p): New.
1027 (hash_poly_dr_pair_p): New.
1028 * graphite-dependences.h (struct poly_dr_pair): New.
1029 (eq_poly_dr_pair_p): Declared.
1030 (hash_poly_dr_pair_p): Declared.
1031 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
1032 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
1033 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
1034 * Makefile.in (graphite-poly.o): Add dependence on
1035 graphite-dependences.h.
1037 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1039 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
1040 polynomials of degree > 1 pass to Graphite.
1041 * tree-chrec.c (scev_is_linear_expression): Call
1042 evolution_function_is_affine_multivariate_p.
1043 * testsuite/gfortran.dg/graphite/id-10.f90: New.
1045 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1047 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
1048 Instantiate scevs varying in outer loops.
1049 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
1051 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1053 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
1054 redundant constraint.
1056 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1058 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
1059 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
1060 based on the file names as in the C testsuite.
1061 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
1062 * testsuite/gfortran.dg/graphite/block-2.f: Same.
1063 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
1064 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
1065 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
1066 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
1067 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
1068 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
1069 * testsuite/gfortran.dg/graphite/id-6.f: Same.
1070 * testsuite/gfortran.dg/graphite/id-9.f: Same.
1071 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
1072 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
1073 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
1075 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
1077 * sese.c (expand_scalar_variables_call): New.
1078 (expand_scalar_variables_ssa_name): Handle calls in expander.
1080 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1082 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
1083 Expect to see the pattern twice.
1084 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
1085 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
1086 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
1088 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1090 * testsuite/gcc.dg/graphite/id-10.c: New.
1091 * testsuite/gcc.dg/graphite/id-12.c: New.
1092 * testsuite/gfortran.dg/graphite/id-7.f: New.
1093 * testsuite/gfortran.dg/graphite/id-8.f: New.
1095 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1097 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
1100 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1102 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
1104 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
1106 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
1108 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1110 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
1111 building PDR subscripts.
1113 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1115 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
1116 computation of array sizes.
1118 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
1120 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
1122 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
1124 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
1125 build_pairwise_constraint, dr_equality_constraints,
1126 build_pairwise_scheduling_equality,
1127 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1128 build_lexicographically_gt_constraint, dependence_polyhedron,
1129 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
1130 Move from NNC_Polyhedron to C_Polyhedron.
1131 * graphite-interchange.c (compute_array_size_poly,
1132 gather_access_strides): Dito.
1133 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
1134 free_scop, pbb_number_of_iterations): Dito.
1135 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
1136 pbb_dim_iter_domain, struct scop): Dito.
1137 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
1138 new_Cloog_Domain_from_ppl_Polyhedron,
1139 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
1140 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
1141 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
1142 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
1143 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
1144 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
1145 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
1146 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
1147 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
1148 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
1149 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
1150 build_scop_iteration_domain, build_poly_dr): Dito
1152 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1154 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
1156 * testsuite/gcc.dg/graphite/run-id-1.c: New.
1158 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1160 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
1161 positivity constraint on the symbolic number of iterations.
1163 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1165 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
1167 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1168 Tobias Grosser <grosser@fim.uni-passau.de>
1170 * graphite-clast-to-gimple.c (build_scop_context): Removed.
1171 (build_cloog_prog): Directly use SCOP_CONTEXT.
1172 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
1173 (free_scop): Free SCOP_CONTEXT.
1174 (print_scop_context): New.
1175 (print_scop): Call print_scop_context.
1176 (debug_scop_context): New.
1177 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
1178 (struct scop): Added field context.
1179 (SCOP_CONTEXT): New.
1180 * graphite-sese-to-poly.c (add_param_constraints): New.
1181 (build_scop_context): New.
1182 (build_poly_scop): Call build_scop_context.
1184 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1186 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
1187 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
1188 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
1189 * graphite-ppl.h: Include double-int.h and tree.h.
1190 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
1191 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
1192 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
1193 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
1195 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1197 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
1198 POINTER_PLUS_EXPR for pointer types.
1199 (clast_to_gcc_expression): Same.
1201 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
1203 * graphite-poly.c (print_scattering_function): Early return when
1204 PBB_TRANSFORMED_SCATTERING is not initialized.
1205 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
1207 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
1209 * tree-parloops.c (analyze_reduction_list): Remove unused variable
1212 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
1214 * tree-parloops.c (analyze_reduction_list): Change return
1216 (try_create_reduction_list): Move the call to
1217 analyze_reduction_list to the beginining.
1218 Call reduction_phi with analyzed_reductions as argument
1219 instead of reduction_list.
1221 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
1223 * Merge from mainline (r148296:149346)
1225 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1227 * graphite-scop-detection.c (graphite_can_represent_init): New.
1228 (graphite_can_represent_scev): Call graphite_can_represent_init:
1229 check that the initial value does not contain multiplications of
1231 (stmt_has_simple_data_refs_p): New.
1232 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
1233 (is_simple_operand): Fix formatting.
1234 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
1236 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1238 * testsuite/gcc.dg/graphite/id-13.c: New.
1239 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
1240 analyze_scalar_evolution, use scalar_evolution_in_region.
1241 (scan_tree_for_params_right_scev): Add extra assert.
1242 (parameter_index_in_region_1): Split from parameter_index_in_region.
1243 (idx_record_params): Use scalar_evolution_in_region.
1244 (find_params_in_bb): Same.
1245 (find_scop_parameters): Same.
1246 (build_loop_iteration_domains): Same.
1247 (create_linear_expr_from_tree): Same.
1248 * sese.c (scalar_evolution_in_region): New.
1249 * sese.h (scalar_evolution_in_region): Declared.
1250 (defined_in_sese_p): New.
1251 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
1253 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
1256 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1258 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
1259 TREE_DATA_REF_H also implies SCEV_H.
1261 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
1263 * graphite-poly.c (print_scop_params): New.
1264 (print_scop): Call print_scop_params.
1265 (debug_scop_params): New.
1266 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
1268 2009-07-07 Li Feng <nemokingdom@gmail.com>
1270 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
1271 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
1272 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
1273 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
1274 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
1275 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
1277 2009-07-07 Li Feng <nemokingdom@gmail.com>
1279 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
1280 for dependency checking part.
1281 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
1282 tests for dependency checking.
1283 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1284 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1285 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
1286 flag -fdump-tree-graphite-all for autopar testsuites.
1288 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1290 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
1291 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
1292 canonicalize_loop_ivs): Moved...
1293 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
1295 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
1297 * tree-parloops.c (try_create_reduction_list): Pass an extra
1298 argument analyzed_reductions. Call analyze_reduction_list.
1299 (gen_parallel_loop): Do not call analyze_reduction_list.
1300 (parallelize_loops): Init and finalize analyzed_reductions.
1302 2009-07-06 Li Feng <nemokingdom@gmail.com>
1304 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1305 Added flag -fno-loop-strip-mine for autopar testcase.
1307 2009-07-04 Li Feng <nemokingdom@gmail.com>
1309 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
1310 transformed scattering dimension instead of unmatch orignal when
1311 calling dependence_polyhedron.
1313 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1315 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
1317 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1319 * graphite-poly.c (pbb_number_of_iterations): Check for returned
1320 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
1322 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
1324 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
1325 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
1326 * graphite-poly.c (pbb_number_of_iterations): New.
1327 * graphite-poly.h (pbb_number_of_iterations): Declared.
1328 (pbb_iterator_dim, pbb_parameter_dim): New.
1330 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
1332 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
1333 last commit on type of lower and upper bound of loops.
1335 2009-06-29 Li Feng <nemokingdom@gmail.com>
1337 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
1338 graphite-dependences.h.
1339 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
1340 (mark_bb_with_pbb): New.
1341 (get_stmtfor_depth): New.
1342 (find_pbb_via_hash): New.
1343 (dependency_in_loop_p): New.
1344 (mark_loops_parallel): New.
1345 (free_aux_in_new_loops): New.
1346 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
1347 bb with it's relevant pbb. Mark newly created loops. Remove mark
1348 innermost loop parallel without checking.
1349 (gloog): Add parameter BB_PBB_MAPPING.
1350 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
1351 (gloog): Change declaration.
1352 (mark_loop_parallel): Make extern.
1353 (free_aux_in_new_loops): Declare.
1354 (bb_pbb_map_hash): New.
1355 (eq_bb_pbb_map): New.
1356 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
1357 auto parallelization when flag_graphite_force_parallel is set.
1358 (graphite_finalize): Added free_aux_in_new_loops.
1359 * tree-parloops.c (parallelize_loops): Only generate parallel code for
1360 the innermost loop that marked parallel. Use
1361 flag_graphite_force_parallel instead of loop->can_be_parallel.
1362 (loop_parallel_p): Move inner most checking out of function.
1364 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1366 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
1367 type of lower and upper bound of loops signed long int.
1369 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1371 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
1372 expression outside the loop.
1374 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1376 * gcc.dg/graphite/interchange-8.c: New.
1378 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1380 * gcc.dg/graphite/interchange-0.c: XFailed.
1381 * gcc.dg/graphite/interchange-5.c: XFailed.
1382 * gcc.dg/graphite/interchange-6.c: XFailed.
1384 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1386 * graphite-interchange.c (compute_array_size_poly): The end of the
1387 recursion should return 1.
1389 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1391 * graphite-interchange.c (compute_array_size_cstr): Allow the
1392 subscript multiplier to be -1.
1393 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
1394 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
1395 data_container. Initializes PDR_DATA_CONTAINER.
1396 (print_pdr_access_layout): New.
1397 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
1398 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
1400 (PDR_DATA_CONTAINER): New.
1401 (new_poly_dr): Update declaration.
1402 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
1403 (build_poly_dr): Call pdr_add_data_dimensions.
1405 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1407 * graphite-poly.h (struct poly_dr): Fix comment.
1408 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
1409 (pdr_add_memory_accesses): New.
1410 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
1412 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
1414 * graphite-poly.c (print_pdrs, debug_pdrs): New.
1415 (print_pbb): Add call to print_pdrs.
1416 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
1418 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
1419 Li Feng <nemokingdom@gmail.com>
1421 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
1422 (dependency_between_pbbs_p): New.
1423 (lexicographically_gt_p): Assure !empty_p before polyhedron
1424 intersection assign.
1425 (build_lexicographically_gt_constraint): Correct lexicographically
1427 * graphite-dependences.h: New.
1428 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
1430 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1432 * graphite-clast-to-gimple.c (print_clast_stmt): New.
1433 (gloog): Print to dump_file the generated clast.
1434 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
1435 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
1437 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-poly.c (extend_scattering): Increment
1440 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
1442 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
1444 * graphite-interchange.c (compute_array_size_poly): Added exit of
1445 recursion condition. Continue iterating even after the first equality.
1446 (compute_array_size): Same.
1448 2009-06-24 Li Feng <nemokingdom@gmail.com>
1450 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1451 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1452 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1453 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1454 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1456 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1458 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1459 only when the use verifies is_gimple_reg.
1461 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1463 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1464 Allocate scaldims after call to unify_scattering_dimensions.
1466 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1468 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1470 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1471 Albert Cohen <albert.cohen@inria.fr>
1473 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1474 variables for the strip mining.
1476 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1477 Pranav Garg <pranav.garg2107@gmail.com>
1479 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1480 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1481 (graphite-blocking.o): New rule.
1482 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1483 * graphite-blocking.c: New.
1484 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1485 flag_loop_strip_mine.
1486 (psct_scattering_dim_for_loop_depth): New.
1487 * graphite-poly.h (scop_do_strip_mine): Declared.
1488 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1489 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1490 flag_loop_strip_mine.
1492 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1494 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1495 a GMP value and a PPL coefficient at each iteration of a loop.
1497 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1499 * graphite-dependences.c (dependence_polyhedron): Do not use
1500 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1501 pbb_nb_scattering_transform.
1502 (graphite_legal_transform_dr): Same.
1503 * graphite-poly.c (extend_scattering): Same.
1504 (unify_scattering_dimensions): Same.
1505 (print_scattering_function): Same.
1506 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1507 PBB_NB_LOCAL_VARIABLES.
1508 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1509 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1510 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1511 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1512 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1513 (pbb_nb_scattering_transform): New.
1514 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1515 (psco_scattering_dim): Add assert on parameters.
1516 (psct_scattering_dim): Same.
1517 (psct_scattering_dim_for_loop_depth): Declared.
1518 (psct_local_var_dim): New.
1519 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1520 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1521 correct layout, call pbb_nb_local_vars.
1522 (psct_add_local_variable, psct_add_scattering_dimension): New.
1523 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1524 Initialize PBB_NB_SCATTERING_TRANSFORM.
1526 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1528 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1529 (set_coef): Renamed ppl_set_coef.
1530 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1532 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1534 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1535 test a boolean against 1.
1536 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1537 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1538 (pbb_do_interchange): Returns true when a transform has been performed.
1539 (scop_do_interchange): Same.
1540 * graphite-poly.c (apply_poly_transforms): Use the return value of
1541 scop_do_interchange.
1542 * graphite-poly.h (scop_do_interchange): Update declaration.
1544 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1546 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1548 * sese.c (sese_reset_aux_in_loops): New.
1549 * sese.h (sese_reset_aux_in_loops): New.
1551 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1553 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1554 multiplier and multiply the constant by the multiplier.
1555 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1556 (build_poly_dr): Do not use the multiplier to define the subscript.
1558 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1560 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1561 compiler's data reference. Initialize PDR_CDR.
1562 (print_pdr): Call dump_data_reference.
1563 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1564 Add compiler_dr field.
1565 (PDR_BB): Renamed PDR_PBB.
1567 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1568 GCC's data reference representation.
1569 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1570 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1572 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1574 * graphite-poly.c (print_scattering_function): Also print the layout.
1575 * graphite-poly.h (pbb_nb_local_vars): New.
1577 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1579 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1581 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1583 * graphite-poly.c (print_pdr, debug_pdr): New.
1584 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1585 (PDR_BASE): Removed.
1587 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1589 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1592 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1594 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1595 subscript identification column.
1596 (pbb_do_interchange): Print to dump_file that some loops "will be
1597 interchanged". Rely on that chain of characters in the testcases.
1598 * gcc.dg/graphite/interchange-0.c: New.
1599 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1600 interchange-*.c files and compile them with -floop-interchange.
1602 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1604 * graphite-interchange.c (interchange_profitable_p): Renamed
1605 pbb_interchange_profitable_p.
1607 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1608 Harsha Jagasia <harsha.jagasia@amd.com>
1609 Pranav Garg <pranav.garg2107@gmail.com>
1611 * graphite-interchange.c (interchange_profitable_p): Make static.
1612 (pbb_interchange_loop_depths, pbb_do_interchange,
1613 scop_do_interchange): New.
1614 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1615 for flag_loop_interchange.
1616 * graphite-poly.h (scop_do_interchange): Declared.
1617 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1618 flag_loop_interchange is used.
1620 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1622 * graphite-dependences.c (dependence_polyhedron): Update use of
1623 pbb_nb_scattering_dims.
1624 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1625 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1626 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1627 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1629 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1631 * graphite.c: Cleanup foo.
1633 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1635 * Merge from mainline (r143684:148293).
1636 * Disabled libpcp until it gets fixed.
1638 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1639 Harsha Jagasia <harsha.jagasia@amd.com>
1641 * graphite-interchange.c: New.
1642 * Makefile.in (graphite-interchange.o): New.
1643 * graphite-poly.h (interchange_profitable_p): Declared.
1644 * graphite-ppl.h (value_max): New.
1646 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1648 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1649 * graphite-poly.h: Fix some comments.
1653 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1656 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1657 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1658 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1659 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1660 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1661 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1662 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1663 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1664 * graphite-clast-to-gimple.c: Same.
1665 * graphite-dependences.c: Same.
1666 * graphite-poly.c: Same.
1667 * graphite-sese-to-poly.c: Same.
1669 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1671 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1672 expressions for an IV rename, as returned by clast_to_gcc_expression.
1673 (copy_renames): Rename new_name to expr.
1674 * sese.c (debug_rename_elt): Same.
1677 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1678 the information from the rename map.
1679 (rename_variables_in_stmt): Same.
1680 (add_loop_exit_phis): Rename new_name to expr.
1681 (insert_loop_close_phis): Same.
1682 (add_guard_exit_phis): Same. Call force_gimple_operand.
1683 * sese.h (struct rename_map_elt): Rename new_name to expr.
1684 (new_rename_map_elt): Same.
1686 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1688 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1689 * sese.c (set_rename): Make it extern.
1690 * sese.h (set_rename): Declared.
1692 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1694 * graphite-poly.c (extend_scattering): Free values.
1695 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1697 (ppl_print_powerset_matrix): Same.
1698 * graphite-scop-detection.c (free_scops_1): New.
1699 (limit_scops): Call free_scops_1.
1700 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1701 (build_poly_dr): Free PPL coefficients.
1702 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1704 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1706 * graphite-dependences.c: New.
1707 * graphite-data-ref.c: Removed.
1708 * graphite-data-ref.h: Removed.
1709 * Makefile.in (graphite-data-ref.o): Removed.
1710 (graphite-dependences.o): Added.
1711 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1712 * graphite-poly.c: Same.
1713 Move the data dependence testing to graphite-dependences.c.
1715 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1717 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1718 from graphite_cannot_represent_loop. Code refactored.
1719 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1721 2009-05-17 Li Feng <nemokingdom@gmail.com>
1723 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1724 Cover all the testcases (not only the filtered ones).
1726 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1728 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1729 unnecessary check. Update comments. Move check for REAL_TYPE here.
1730 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1731 done in (stmt_simple_for_scop_p).
1733 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1735 * graphite.c (print_global_statistics): New.
1736 (print_graphite_scop_statistic): New.
1737 (print_graphite_statistics): New.
1738 (graphite_initialize, graphite_transform_loops): Print statistics.
1739 * graphite-scop-detection (build_scops): Print statistics.
1740 (print_graphite_scop_statistics): New.
1741 (print_graphite_statistics): New.
1743 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1745 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1746 (debug_clast_name_index): Removed.
1747 (debug_clast_name_indexes_1): Removed.
1748 (debug_clast_name_indexes): Removed.
1749 (clast_name_index_elt_info): Removed.
1750 (eq_clast_name_indexes): Removed.
1751 (clast_name_to_index): Removed.
1752 (new_clast_name_index): Removed.
1753 (save_clast_name_index): Removed.
1754 (save_var_name): Moved...
1755 (init_sese_params_index): Removed.
1756 (clast_name_to_gcc): Remove use of name_tree.
1757 (initialize_cloog_names): Same.
1758 (gloog): Do not call init_sese_params_index.
1759 * graphite-sese-to-poly.c (save_var_name): ...here.
1760 (parameter_index_in_region): New.
1761 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1762 (parameter_index_in_region): Removed.
1763 (is_parameter): Remove use of name_tree.
1764 * sese.h (struct name_tree): Removed.
1765 (struct sese): Remove use of name_tree. New field params_names.
1766 (SESE_PARAMS_NAMES): New.
1767 (SESE_PARAMS): Remove duplicate.
1768 (parameter_index_in_region): Removed.
1769 (sese_nb_params): Remove use of name_tree.
1770 (struct clast_name_index): New.
1771 (new_clast_name_index): New.
1772 (clast_name_to_index): New.
1773 (save_clast_name_index): New.
1774 (debug_clast_name_index): New.
1775 (debug_clast_name_indexes_1): New.
1776 (debug_clast_name_indexes): New.
1777 (clast_name_index_elt_info): New.
1778 (eq_clast_name_indexes): New.
1780 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1782 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1783 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1784 (graphite_loop_normal_form): Do not pass region. Do not
1785 initialize SESE_OLDIVS.
1786 (build_graphite_loop_normal_form): Update call to
1787 graphite_loop_normal_form.
1788 * sese.c (debug_oldivs): Removed.
1789 (new_sese): Do not initialize SESE_OLDIVS.
1790 (free_sese): Do not free SESE_OLDIVS.
1791 (oldiv_for_loop): Removed.
1792 * sese.h (struct sese): Remove old_ivs.
1793 (SESE_OLDIVS): Removed.
1794 (oldiv_for_loop): Removed.
1796 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1798 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1799 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1800 replaced by a call to newivs_to_depth_to_newiv.
1801 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1802 (clast_to_gcc_expression_red): Same.
1803 (gcc_type_for_clast_expr): Same.
1804 (gcc_type_for_clast_eq): Same.
1805 (graphite_translate_clast_equation): Same.
1806 (graphite_create_guard_cond_expr): Same.
1807 (graphite_create_new_guard): Same.
1808 (graphite_create_new_loop): Same.
1809 (build_iv_mapping): Same.
1810 (translate_clast): Same.
1812 (loop_iv_stack_patch_for_consts): Removed. *
1813 sese.c (iv_stack_entry_is_constant): Removed.
1814 (iv_stack_entry_is_iv): Removed.
1815 (loop_iv_stack_push_iv): Removed.
1816 (loop_iv_stack_insert_constant): Removed.
1817 (loop_iv_stack_pop): Removed.
1818 (loop_iv_stack_get_iv): Removed.
1819 (loop_iv_stack_get_iv_from_name): Removed.
1820 (debug_loop_iv_stack): Removed.
1821 (free_loop_iv_stack): Removed.
1822 (loop_iv_stack_remove_constants): Removed. *
1823 sese.h (iv_stack_entry_kind): Removed.
1824 (iv_stack_entry_data_union): Removed.
1825 (iv_stack_entry_struct): Removed.
1826 (iv_stack_entry_p): Removed.
1827 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1828 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1829 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1830 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1831 (gbb_loop_at_index): Fix indenting.
1832 (gbb_loop_index): Removed.
1834 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1836 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1837 Call clast_name_to_index.
1839 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1841 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1842 do not pass params. Get params from SESE_PARAMS.
1843 (clast_to_gcc_expression): Same.
1844 (clast_to_gcc_expression_red): Same.
1845 (gcc_type_for_clast_eq): Same.
1846 (graphite_translate_clast_equation): Same.
1847 (graphite_create_new_loop): Same.
1848 * sese.c (rename_variables_in_stmt): Fix comment.
1850 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1852 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1854 Call save_clast_name_index.
1855 (translate_clast): Pass newivs_index.
1856 (gloog): Create and free newivs_index.
1858 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1860 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1861 (clast_name_index_p): New type.
1862 (debug_clast_name_index): New.
1863 (debug_clast_name_indexes_1): New.
1864 (debug_clast_name_indexes): New.
1865 (clast_name_index_elt_info): New.
1866 (eq_clast_name_indexes): New.
1867 (clast_name_to_index): New.
1868 (new_clast_name_index): New.
1869 (save_clast_name_index): New.
1870 (init_sese_params_index): New.
1871 (gloog): Call init_sese_params_index.
1872 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1873 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1874 (free_sese): Free SESE_PARAMS_INDEX.
1875 * sese.h (struct sese): Add params_index.
1876 (SESE_PARAMS_INDEX): New.
1878 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1880 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1881 (graphite_create_new_loop): Pass the newivs vector. Push the
1882 newly created IV to newivs.
1883 (translate_clast): Pass the newivs vector.
1884 (gloog): Create and destroy the newivs vector.
1886 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1888 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1889 (graphite_loop_normal_form): Initialize loop->aux with the unique
1890 IV that has been created.
1892 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1894 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1895 scev with parameters in the base part. They where forbidden
1898 2009-05-11 Li Feng <nemokingdom@gmail.com>
1900 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1901 compile options by file names.
1902 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1903 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1904 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1905 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1907 2009-05-08 Li Feng <nemokingdom@gmail.com>
1909 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1910 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1911 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1912 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1914 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1916 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1919 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1921 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1922 allow integer constant strides.
1923 (graphite_can_represent_expr): Depend on outermost_loop.
1924 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1925 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1926 build_scops_1): Same.
1927 (scopdet_basic_block_info): Same and insert layered SCoP
1929 (try_generate_gimple_bb): Cleanup.
1930 (build_scops): Enable data references.
1932 * testsuite/gcc.dg/graphite/id-5.c: New.
1933 * testsuite/gcc.dg/graphite/id-9.c: New.
1934 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1935 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1937 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1939 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1940 that we have not yet built for this SCoP.
1942 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1944 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1945 for complex numbers.
1947 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1949 * graphite-ppl.c: Fix build if cloog is not available.
1951 2009-05-04 Li Feng <nemokingdom@gmail.com>
1953 * tree-parloops.c (loop_parallel_p): Remove construction of
1954 NITER and REDUCTION_LIST.
1955 (try_get_loop_niter): New.
1956 (try_create_reduction_list): New.
1957 (parallelize_loops): Bypass the failed checkings in autopar
1958 when can_be_parallel in loop structure is set to true.
1960 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1962 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1963 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1965 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1967 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1968 Enable EQ_EXPR and NE_EXPR again.
1970 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1972 * graphite-scop-detection.c (graphite_can_represent_scev):
1973 Add check if scev is affine multivariate.
1974 (harmful_stmt_in_bb): Check if we can represent the conditions.
1975 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1977 * testsuite/gcc.dg/graphite/id-7.c: New.
1979 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1981 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1982 Check all bbs in region, not only the bbs that are represented in
1984 (build_poly_scop): Add newline.
1985 * testsuite/gcc.dg/graphite/id-8.c: New.
1987 2009-04-30 Li Feng <nemokingdom@gmail.com>
1989 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1990 when loop initialize.
1991 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1992 * common.opt: Declare flag_graphite_force_parallel.
1993 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1995 * graphite-poly.c (apply_poly_transforms): Introduce
1996 flag_graphite_force_parallel.
1997 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1998 * toplev.c (process_options): ditto and replace a not correctly
2001 2009-04-30 Li Feng <nemokingdom@gmail.com>
2003 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
2004 Change the call of gbb_loop_at_index and/or gbb_loop_index due
2005 to the redefinition.
2006 (compute_cloog_iv_types_1): ditto.
2007 (build_iv_mapping): ditto.
2008 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
2010 (free_gimple_bb): Removed GBB_LOOPS related free part.
2011 (build_bb_loops): Removed.
2012 * sese.h (struct gimple_bb): Removed loops.
2013 (GBB_LOOPS): Removed.
2014 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
2015 (gbb_loop_index): ditto.
2017 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2019 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
2020 allow non constant strides.
2021 * testsuite/gcc.dg/graphite/scop-20.c: New.
2023 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2025 * graphite-scop-detection.c (dot_all_scops): Fix system call
2026 return value warning.
2029 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2031 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
2032 * testsuite/gcc.dg/graphite/scop-3.c: Same.
2034 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2036 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
2037 build_pairwise_constraint, dr_equality_constraints,
2038 build_pairwise_scheduling_equality,
2039 build_pairwise_scheduling_inequality, lexicographically_gt_p,
2040 build_lexicographically_gt_constraint, dependence_polyhedron,
2041 graphite_legal_transform_dr, graphite_legal_transform_bb,
2042 graphite_legal_transform): New.
2043 * graphite-poly.h (graphite_legal_transform): Declared.
2044 * graphite-sese-to-poly.c (build_poly_scop): Call to
2045 graphite_legal_transform is disabled for the moment.
2047 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2049 * graphite-poly.h (pbb_nb_scattering_dims): New.
2050 (pbb_nb_scattering): Use it.
2052 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2054 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
2055 Pointset_Powerset version of ppl_insert_dimensions.
2056 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
2058 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2060 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
2062 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2064 * graphite-poly.h: Fix comment.
2066 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
2068 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
2070 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2072 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
2075 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
2077 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
2078 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
2081 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
2083 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
2084 handle EQ_EXPR and NE_EXPR.
2086 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
2088 * graphite-poly.h (poly_dr): Fix comment.
2090 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2091 Tobias Grosser <grosser@fim.uni-passau.de>
2093 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
2094 with a zero dimension polyhedron.
2095 (find_scop_parameters): Move the call to scop_set_nb_params here.
2096 (build_loop_iteration_domains): Store in loop->aux the iteration
2098 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
2099 by any loop in scop.
2100 (build_poly_scop): Do not call scop_set_nb_params.
2102 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
2103 Tobias Grosser <grosser@fim.uni-passau.de>
2105 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
2106 add_condition_to_domain not GT_EXPR.
2108 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2110 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
2111 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
2112 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
2113 upper_bound_assign to calculate unions.
2114 * testsuite/gcc.dg/graphite/id-6.c: New.
2116 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2118 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
2119 handle abnormal edges.
2121 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
2123 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
2124 (free_poly_bb): Also free poly_drs.
2125 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
2126 (poly_dr): Polyhedron to Pointset_Powerset.
2127 (pdr_accessp_nb_subscripts): Same.
2128 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
2131 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2133 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
2134 names into more meaningful names.
2136 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2138 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
2139 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
2141 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2143 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
2145 * tree-parloops.c (rewrite_phi_with_iv): New.
2146 (rewrite_all_phi_nodes_with_iv): New.
2147 (canonicalize_loop_ivs): Call them.
2149 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2151 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
2152 graphite_find_data_references_in_stmt.
2153 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
2154 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
2156 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2158 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
2160 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2162 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
2163 instead of bb_in_region.
2164 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
2165 (build_sese_conditions): Use flag_bb_in_sese.
2166 * sese.c (register_bb_in_sese): Removed.
2167 (new_sese): Remove initialization of SESE_REGION_BBS.
2168 (free_sese): Do not free SESE_REGION_BBS.
2169 * sese.h (struct sese): Remove field region_basic_blocks.
2170 (SESE_REGION_BBS): Removed.
2171 (bb_in_sese_p): Implement in function of bb_in_region.
2173 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
2175 * graphite-scop-detection.c (limit_scops): Deal only with single exit
2178 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2180 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
2182 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
2183 (add_condition_to_domain): New.
2184 (add_condition_to_pbb): New.
2185 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
2186 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
2188 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
2190 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
2191 ppl_Pointset_Powerset.
2192 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
2193 * graphite-poly.h (poly_bb): poly_bb.domain Same.
2194 (pbb_nb_loops): Same.
2195 * graphite-sese-to-poly.c (build_loop_iteration_domains,
2196 add_conditions_to_domain): Same.
2197 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
2198 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
2199 ppl_const_Polyhedron_t.
2200 (ppl_print_powerset_matrix): New.
2201 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
2202 ppl_print_powerset_matrix): New.
2203 (ppl_print_polyhedron_matrix): Updated.
2205 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2207 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
2209 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
2211 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
2212 (print_iteration_domains, debug_iteration_domain,
2213 debug_iteration_domains): New.
2214 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
2215 debug_iteration_domains): Declared.
2216 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
2219 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
2220 Sebastian Pop <sebastian.pop@amd.com>
2222 * graphite-poly.h (print_iteration_domain): New.
2223 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
2224 (build_sese_conditions_1, build_sese_conditions_after,
2225 build_sese_conditions_before): New.
2226 (build_sese_conditions): Rewritten.
2228 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2229 Tobias Grosser <grosser@fim.uni-passau.de>
2231 Cleanup of code generation liveouts.
2232 * graphite-clast-to-gimple.c (translate_clast): Use a single
2233 rename_map instead of one per translated statement.
2234 Do not use SESE_LIVEOUT_RENAMES.
2235 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
2236 (gloog): Do not use SESE_LIVEOUT_RENAMES.
2237 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
2238 phi node of a reduction: when a loop contains a reduction used outside
2239 the loop, there should be a scalar close phi node on the exit block.
2240 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
2241 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
2242 (free_sese): Do not free them.
2243 (sese_build_liveouts_use): Do not use them.
2244 (sese_build_liveouts_bb): Same.
2245 (sese_build_liveouts): Same.
2246 (sese_insert_phis_for_liveouts): Same.
2247 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
2248 (defined_in_loop_p): New.
2249 (alive_after_loop): New.
2250 (close_phi_not_yet_inserted_p): New.
2251 (struct alep, alep_p): New.
2252 (add_loop_exit_phis): Remove from the rename_map all the names defined
2253 in the code generated loop.
2254 (insert_loop_close_phis): Traverse the rename_map passed to it.
2255 Don't use SESE_LIVEOUT_RENAMES.
2256 (default_liveout_before_guard): Renamed default_before_guard.
2257 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
2258 (graphite_copy_stmts_from_block): Do not directly call set_rename.
2259 (register_sese_liveout_renames): Removed.
2260 (copy_bb_and_scalar_dependences): Do not call it.
2261 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
2263 (SESE_LIVEOUT): Removed.
2264 (SESE_LIVEOUT_RENAMES): Removed.
2265 (SESE_REDUCTION_LIST): Removed.
2266 (sese_build_liveouts): Removed.
2267 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
2268 (insert_loop_close_phis): Pass a htab_t instead of a sese.
2269 (insert_guard_phis): Same.
2270 (rename_map_elt): Declare a VEC of them.
2271 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2272 trees not pointers to trees.
2274 Rewrite in canonical close SSA form:
2275 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
2276 (limit_scops): Close the scop after the block containing the close phi
2278 (canonicalize_loop_closed_ssa): New.
2279 (canonicalize_loop_closed_ssa_form): New.
2280 (build_scops): Call canonicalize_loop_closed_ssa_form.
2282 * graphite-sese-to-poly.c: Fix typos.
2284 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
2286 * graphite-poly.c (print_scattering_function, print_pbb_domain):
2288 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
2289 (print_pbb): Add conditions.
2291 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
2292 Sebastian Pop <sebastian.pop@amd.com>
2294 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
2295 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
2296 (build_scop_bbs_1): New.
2297 (build_scop_bbs): Rewrite.
2298 * sese.h (bb_in_region): New.
2300 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2302 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2304 (print_scop): Style.
2305 * graphite-poly.h (poly_bb): Add drs vector.
2306 (PBB_DRS): Add accessor.
2307 * graphite-sese-to-poly.c (build_poly_dr): New.
2308 (build_pbb_drs, build_scop_drs): New.
2309 (build_poly_scop): call build_scop_drs (Disabled at the moment).
2311 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2313 * tree-ssa-loop.c: Include forgotten toplev.h
2315 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
2317 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
2318 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
2319 * testsuite/gcc.dg/graphite/pr37928.c: Same
2320 * testsuite/gcc.dg/graphite/pr38409.c: Same
2321 * testsuite/gcc.dg/graphite/pr38498.c: Same
2322 * testsuite/gcc.dg/graphite/pr38559.c: Same
2323 * testsuite/gcc.dg/graphite/pr39335.c: Same
2324 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
2325 * testsuite/gfortran.dg/graphite/block-2.f: Same
2326 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
2329 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
2331 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
2332 build_access_matrix, build_scop_data_accesses): Remove access function
2333 building. (We get a new version soon).
2334 (build_bb_loops, scan_tree_for_params_right_scev): Update.
2335 * sese.h (nb_loops_around_loop_in_sese): Remove.
2336 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
2338 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
2339 Sebastian Pop <sebastian.pop@amd.com>
2341 * graphite-scop-detection.c (struct scopdet_info): Rename last
2343 (scopdet_basic_block_info, build_scops_1): Don't use
2344 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
2346 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
2347 Sebastian Pop <sebastian.pop@amd.com>
2349 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
2350 * sese.c (sese_build_liveouts_use): Renamed from
2351 sese_build_livein_liveouts_use. Remove liveins.
2352 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
2353 Call sese_build_liveouts_use.
2354 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
2355 Call sese_build_liveouts_bb.
2356 (new_sese, free_sese): Remove liveins.
2357 (sese_add_exit_phis_var): Deleted.
2358 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
2360 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
2362 * sese.h (sese): Remove num_ver and livein.
2363 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
2365 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2367 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
2369 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
2371 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
2372 (build_scop_scattering): Do not use compare_prefix_loops any more.
2373 (nb_common_loops): New.
2375 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2377 * sese.c (get_new_name_from_old_name): Renamed get_rename.
2378 (register_old_and_new_names): Renamed set_rename.
2380 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2382 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
2383 of the decl from the previous commit.
2385 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2387 * graphite-scop-detection.c (dot_scop): New.
2388 * graphite-scop-detection.h (dot_scop): Declared.
2390 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2392 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
2394 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2396 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
2397 condition at the end of the loop.
2398 * graphite.c (graphite_initialize, graphite_finalize): Print to
2399 dump_file the compiled function.
2400 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
2401 of create_empty_loop_on_edge.
2402 (translate_clast): Update the code generation of loops for the new
2404 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
2406 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
2408 Reverted the patch from 2009-03-19.
2410 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
2412 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
2414 (print_scop): Style.
2415 * graphite-poly.h (poly_bb): Add drs vector.
2416 (PBB_DRS): Add accessor.
2417 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
2418 (build_access_matrix_with_af, build_access_matrix,
2419 build_scop_data_accesses): Delete.
2420 (build_poly_dr): New.
2421 (build_pbb_drs, build_scop_drs): New.
2422 (build_poly_scop): call build_scop_drs.
2424 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
2426 * graphite-scop-detection.c (dot_all_scops_1): Close the table
2427 once per basic block.
2429 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2431 * graphite-scop-detection.c (graphite_can_represent_scev): New.
2432 (graphite_can_represent_expr): Renamed from loop_affine_expr
2434 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
2435 (graphite_cannot_represent_loop): Add scop_entry to parameters.
2436 (scopdet_basic_block_info): Actually define entry_block.
2437 (stmt_simple_memref_p): Moved here from ...
2439 * tree-data-ref.c (stmt_simple_memref_p): here.
2440 * tree-data-ref.h (stmt_simple_memref_p): Removed.
2442 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
2444 * testsuite/gcc.dg/graphite/id-4.c: New.
2446 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2448 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2449 (register_old_and_new_names): Update the content of the map.
2450 When there was already a rename_map_elt in the map at that
2452 (copy_bb_and_scalar_dependences): Do rename_variables after
2453 expand_scalar_variables.
2454 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2455 of the map. When there was already a rename_map_elt in the
2456 map at that location, free it.
2457 (translate_clast): Pass the rename_map. Do not initialize and free
2458 a rename_map per stmt_user.
2459 (gloog): Initialize and free one rename_map and pass it to
2462 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2464 * sese.c (expand_scalar_variables_stmt,
2465 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2467 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2468 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2469 the gimple_stmt_iterator of the statement to be expanded.
2470 * graphite-scop-detection.c (is_simple_operand): Do handle
2473 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2475 * graphite-scop-detection.c (is_simple_operand): Do not handle
2477 * testsuite/gcc.dg/graphite/id-2.c: New.
2479 * graphite-sese-to-poly.c (build_bb_loops,
2480 add_value_to_dim, scan_tree_for_params_right_scev,
2481 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2482 find_params_in_bb, build_loop_iteration_domains,
2483 add_conditions_to_domain): Remove subtract.
2485 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2487 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2488 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2489 pbb_loop_at_index -> gbb_loop_at_index.
2490 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2491 (debug_loop_vec): Delete.
2492 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2493 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2494 (PBB_LOOPS): Removed.
2495 (PBB_BLACK_BOX): Insert cast.
2496 (pbb_set_black_box): New setter.
2497 (pbb_loop_at_index, pbb_loop_index): Removed.
2498 (scop_set_region, scop_set_nb_params): New.
2499 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2500 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2501 (build_poly_scop): Use scop_set_nb_params.
2502 * sese.h (gimple_bb): Add LOOPS.
2503 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2505 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2507 Revert previous commit.
2509 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2511 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2512 (register_old_and_new_names): Update the content of the map.
2513 When there was already a rename_map_elt in the map at that
2515 (copy_bb_and_scalar_dependences): Do rename_variables after
2516 expand_scalar_variables.
2517 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2518 of the map. When there was already a rename_map_elt in the
2519 map at that location, free it.
2520 (translate_clast): Pass the rename_map. Do not initialize and free
2521 a rename_map per stmt_user.
2522 (gloog): Initialize and free one rename_map and pass it to
2525 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2527 Remove forgotten line in revert.
2529 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2531 Revert previous commit.
2533 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2535 * sese.c (register_old_and_new_names): Update the content
2536 of the map. When there was already a rename_map_elt in the
2537 map at that location, free it.
2538 (copy_bb_and_scalar_dependences): Do rename_variables after
2539 expand_scalar_variables.
2540 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2541 of the map. When there was already a rename_map_elt in the
2542 map at that location, free it.
2543 (translate_clast): Pass the rename_map. Do not initialize and free
2544 a rename_map per stmt_user.
2545 (gloog): Initialize and free one rename_map and pass it to
2548 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2550 * graphite-clast-to-gimple.c (translate_clast): context_loop
2553 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2554 Sebastian Pop <sebastian.pop@amd.com>
2556 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2557 of the use of ppl_Polyhedron_map_space_dimensions.
2559 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2560 Sebastian Pop <sebastian.pop@amd.com>
2562 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2563 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2564 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2565 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2566 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2567 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2568 pbb_nb_params): New.
2569 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2570 nb_loops_around_pbb): Adapt return types.
2572 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2574 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2575 graphite-clast-to-gimple.o, graphite-data-ref.o,
2576 graphite-scop-detection.o, graphite-poly.o): Add
2579 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2581 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2582 graphite-clast-to-gimple.o, graphite-data-ref.o,
2583 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2585 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2587 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2588 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2589 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2590 * testsuite/gcc.dg/graphite/block-0.c: Same.
2591 * testsuite/gcc.dg/graphite/block-1.c: Same.
2592 * testsuite/gcc.dg/graphite/block-2.c: Same.
2593 * testsuite/gcc.dg/graphite/block-3.c: Same.
2594 * testsuite/gcc.dg/graphite/block-4.c: Same.
2595 * testsuite/gcc.dg/graphite/block-5.c: Same.
2596 * testsuite/gcc.dg/graphite/block-6.c: Same.
2597 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2598 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2599 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2600 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2601 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2602 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2603 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2604 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2605 * opts.c: Remove -floop-block from -O2.
2606 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2607 -floop-strip-mine are used.
2609 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2610 Sebastian Pop <sebastian.pop@amd.com>
2612 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2614 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2615 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2616 strip_mine_profitable_p, is_interchange_valid,
2617 graphite_trans_bb_block, graphite_trans_loop_block,
2618 graphite_trans_scop_block): Temporary removed.
2619 (extend_scattering, unify_scattering_dimensions): New.
2620 (print_scattering_function, graphite_read_transforms):
2621 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2622 (graphite_generate_scattering_fns): Removed.
2623 (apply_poly_transforms): Cleanup.
2624 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2625 (schedule_to_scattering): Moved.
2626 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2627 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2628 (pbb_nb_scattering): New.
2629 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2630 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2632 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2634 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2635 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2636 -> PBB_TRANSFORMED_SCATTERING.
2637 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2638 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2639 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2640 (check_poly_representation): Do not return bool.
2641 (graphite_transform_loops): Reformat.
2642 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2644 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2646 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2647 debug_pbb_domain, debug_pbb, debug_scop): New.
2648 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2649 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2651 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2654 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2655 when the type precision of the induction variable should be
2656 larger than the type precision of nit.
2657 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2658 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2659 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2661 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2662 * testsuite/gcc.dg/graphite/pr39335.c: New.
2664 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2666 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2667 SSA_NAMES not struct reduction_info.
2669 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2671 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2673 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2674 Tobias Grosser <grosser@fim.uni-passau.de>
2676 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2677 (free_sese): Free SESE_REDUCTION_LIST.
2678 * sese.h (struct sese): Add field reduction_list.
2679 (SESE_REDUCTION_LIST): New.
2680 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2681 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2683 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2684 Tobias Grosser <grosser@fim.uni-passau.de>
2686 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2689 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2690 Tobias Grosser <grosser@fim.uni-passau.de>
2692 * tree-parloops.c (struct brli, build_reduction_list_info,
2693 analyze_reduction_list, gather_scalar_reductions): New.
2694 (loop_parallel_p): Build a reduction list containing only
2695 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2696 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2697 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2698 * tree-flow.h (gather_scalar_reductions): Declared.
2700 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2703 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2704 number_of_iterations_exit from a gcc_assert.
2706 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2707 Jan Sjodin <jan.sjodin@amd.com>
2709 * output.h (graphite_out_file, graphite_in_file): Declared.
2710 * toplev.c (graphite_out_file, graphite_in_file): New.
2711 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2712 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2713 Don't call schedule_to_scattering.
2714 * common.opt (fgraphite-write, fgraphite-read): New.
2715 * graphite-poly.c: Include output.h.
2716 (print_scattering_function, print_scattering_functions,
2717 debug_scattering_function, debug_scattering_functions,
2718 graphite_write_transforms, graphite_read_transforms,
2719 graphite_generate_scattering_fns): New.
2720 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2721 Call graphite_generate_scattering_fns, graphite_write_transforms,
2722 graphite_read_transforms.
2723 (new_poly_bb): Initialize PBB_SCATTERING.
2724 (free_poly_bb): Free PBB_SCATTERING.
2725 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2726 * graphite-poly.h (struct poly_bb): Add field scattering.
2727 (PBB_SCATTERING): New.
2728 (print_scattering_function, print_scattering_functions,
2729 debug_scattering_function, debug_scattering_functions): Declared.
2730 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2731 GMP values, not integers!
2732 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2733 ppl_read_polyhedron_matrix): New.
2734 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2735 debug_ppl_polyhedron_matrix,
2736 ppl_read_polyhedron_matrix): Declared.
2737 * Makefile.in (graphite-poly.o): Depends on output.h.
2739 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2740 Tobias Grosser <grosser@fim.uni-passau.de>
2743 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2744 scalar evolutions in the scop_entry->loop_father.
2746 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2747 Tobias Grosser <grosser@fim.uni-passau.de>
2749 * graphite.h (ref_nb_loops): Remove declaration.
2750 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2751 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2752 debug_gbb): Moved to sese.h.
2755 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2756 Tobias Grosser <grosser@fim.uni-passau.de>
2758 * graphite-data-ref.[ch]: Disable.
2760 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2761 Tobias Grosser <grosser@fim.uni-passau.de>
2763 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2764 scalar evolutions in the scop_entry->loop_father.
2766 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2768 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2769 (graphite_cannot_represent_loop_niter): Renamed
2770 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2771 (limit_scops): build_sese_loop_nests does not return a bool.
2772 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2773 * sese.c (nb_reductions_in_loop): ... from here.
2774 (graphite_loop_normal_form): ... from here.
2775 (sese_record_loop): Does not fail, so does not return a bool.
2776 (build_sese_loop_nests): Same.
2777 * sese.h (build_sese_loop_nests): Update declaration.
2778 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2779 (build_graphite_loop_normal_form): New.
2780 (gloog): Call build_graphite_loop_normal_form.
2781 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2782 build_sese_loop_nests.
2784 * testsuite/gcc.dg/graphite/id-1.c: New.
2786 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2787 Tobias Grosser <grosser@fim.uni-passau.de>
2789 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2790 The SCoP detection fix is sufficient.
2792 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2794 PR tree-optimization/39260
2795 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2796 the basic block contains a condition with a real type.
2797 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2799 * gcc.dg/graphite/pr39260.c: New.
2801 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2803 * graphite-poly.c: Inlcude params.h.
2804 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2806 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2807 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2809 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2810 Tobias Grosser <grosser@fim.uni-passau.de>
2812 * graphite-scop-detection.c (dot_all_scops_1,
2813 dot_all_scops): Moved here.
2814 * graphite-scop-detection.h (dot_all_scops): Declared here.
2815 * graphite.c (graphite_initialize, graphite_finalize): New.
2816 (graphite_transform_loops): Cleaned up.
2817 * sese.c (debug_oldivs): Moved here.
2818 * graphite-poly.c (graphite_apply_transformations): Renamed
2819 apply_poly_transforms.
2820 (debug_loop_vec): Moved here.
2821 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2822 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2823 find_scop_parameters, build_scop_iteration_domain,
2824 add_conditions_to_constraints, build_scop_canonical_schedules,
2825 build_scop_data_accesses): Now static.
2826 (build_poly_scop, check_poly_representation): New.
2828 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2830 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2831 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2832 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2833 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2834 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2835 scan_tree_for_params, struct irp_data, dx_record_params,
2836 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2837 build_loop_iteration_domains, add_conditions_to_domain,
2838 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2839 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2840 build_sese_conditions, add_conditions_to_constraints,
2841 build_scop_iteration_domain, build_access_matrix_with_af,
2842 build_access_matrix,
2843 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2845 * graphite-sese-to-poly.c: New.
2846 * graphite-sese-to-poly.h: New.
2848 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2850 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2852 * graphite.c: Split graphite code generation to a new file.
2853 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2854 max_precision_type, clast_to_gcc_expression_red,
2855 clast_to_gcc_expression, gcc_type_for_clast_expr,
2856 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2857 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2858 graphite_create_new_guard, clast_get_body_of_loop,
2859 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2860 graphite_create_new_loop, build_iv_mapping, copy_renames,
2861 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2862 compute_cloog_iv_types, free_scattering, save_var_name,
2863 initialize_cloog_names, build_scop_context, build_cloog_prog,
2864 set_cloog_options, debug_clast_stmt, scop_to_clast,
2865 print_generated_program, debug_generated_program,
2866 gloog): Moved to graphite-clast-to-gimple.c.
2868 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2870 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2871 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2872 loop_iv_stack_pop, loop_iv_stack_get_iv,
2873 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2874 free_loop_iv_stack, loop_iv_stack_remove_constants,
2875 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2876 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2877 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2878 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2879 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2880 get_vdef_before_sese, sese_adjust_vphi,
2881 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2882 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2883 is_iv, expand_scalar_variables_ssa_name,
2884 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2885 expand_scalar_variables, rename_variables, remove_condition,
2886 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2887 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2888 default_liveout_before_guard, add_guard_exit_phis,
2889 insert_guard_phis, register_old_and_new_names,
2890 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2891 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2892 if_region_set_false_region, create_if_region_on_edge,
2893 move_sese_in_condition): Moved to sese.c.
2895 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2896 if_region_exit, if_region_get_condition_block,
2897 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2898 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2899 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2900 ivtype_map_elt, new_ivtype_map_elt,
2901 recompute_all_dominators): Moved to sese.h.
2903 * graphite-clast-to-gimple.c: New.
2904 * graphite-clast-to-gimple.h: New.
2905 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2906 * sese.c: Modified as said above.
2909 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2911 * graphite.c: Split scop detection to a new file.
2912 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2913 move_sd_regions, loop_affine_expr, exclude_component_ref,
2914 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2915 graphite_cannot_represent_loop_niter, struct scopdet_info,
2916 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2917 find_single_entry_edge, find_single_exit_edge,
2918 create_single_entry_edge, sd_region_without_exit,
2919 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2920 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2921 Moved to graphite-scop-detection.c.
2923 * graphite-scop-detection.c: New.
2924 * graphite-scop-detection.h: New.
2925 * Makefile.in: Add new rule for graphite-scop-detection.o.
2927 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2928 tree-scalar-evolution.h.
2929 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2930 build_sese_loop_nests): Moved here from graphite.c.
2931 (param_index): Renamed parameter_index_in_region.
2933 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2934 Sebastian Pop <sebastian.pop@amd.com>
2936 * gcc.dg/graphite/block-0.c: Expected to fail now.
2937 * gcc.dg/graphite/block-1.c: Same.
2938 * gcc.dg/graphite/block-5.c: Same.
2939 * gcc.dg/graphite/block-6.c: Same.
2941 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2942 Sebastian Pop <sebastian.pop@amd.com>
2944 * graphite.h: Separate from graphite_bb_p the polyhedral
2945 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2946 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2947 graphite-data-ref.h.
2948 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2949 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2950 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2951 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2952 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2953 scop_nb_params): Moved to graphite-poly.h.
2954 * graphite-data-ref.c: Same.
2955 * graphite-data-ref.h: New.
2957 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2958 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2959 is_interchange_valid, graphite_trans_bb_block,
2960 graphite_trans_loop_block, scop_max_loop_depth,
2961 graphite_trans_scop_block, graphite_apply_transformations,
2962 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2964 * graphite-poly.h: New.
2965 * graphite-poly.c: New.
2966 * Makefile.in (OBJS-common): Add graphite-poly.o.
2967 (graphite-poly.o): New rule.
2968 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2971 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2972 Tobias Grosser <grosser@fim.uni-passau.de>
2974 * graphite.c: Replace gb -> gbb.
2976 * graphite-data-ref.c: Same.
2978 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2979 Tobias Grosser <grosser@fim.uni-passau.de>
2981 * Makefile.in (OBJS-commmon): Add sese.o.
2983 (graphite.o): Add sese.h.
2984 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2985 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2986 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2988 (block_before_scop): Add missing return.
2989 (new_scop, free_scop): Remove SESE data structures.
2990 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2991 find_scop_parameters, build_loop_iteration_domains,
2992 add_conditions_to_domain, register_scop_liveout_renames,
2993 copy_bb_and_scalar_dependences): Scop -> SESE.
2995 (add_conditions_to_domain): SCoP -> SESE and remove check
2996 (scop_contains_non_iv_scalar_phi_nodes): New.
2997 (build_scop_conditions_1, build_scop_conditions): Remove check for
2998 non iv scalar phi nodes.
2999 (print_scop_statistics): New.
3000 (graphite_transform_loops): Cleanup.
3002 * graphite.h: Move to sese & cleanup.
3006 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3007 Tobias Grosser <grosser@fim.uni-passau.de>
3009 * graphite.c (build_scop_conditions_1): Conditions are only
3010 at the end of a basic block.
3012 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3013 Tobias Grosser <grosser@fim.uni-passau>
3015 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
3017 (GBB_ALPHA): Removed.
3019 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3020 Tobias Grosser <grosser@fim.uni-passau.de>
3022 * graphite-data-ref.c (graphite_test_dependence): Don't use
3023 GBB_DYNAMIC_SCHEDULE.
3024 * graphite.c (new_graphite_bb): Same.
3025 (free_graphite_bb): Same.
3026 (build_scop_dynamic_schedules): Removed.
3027 (graphite_transform_loops): Don't call it.
3028 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
3029 (GBB_DYNAMIC_SCHEDULE): Removed.
3031 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3032 Tobias Grosser <grosser@fim.uni-passau.de>
3034 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
3035 (print_graphite_bb): Same.
3036 (build_cloog_prog): Same.
3038 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3039 Tobias Grosser <grosser@fim.uni-passau.de>
3041 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
3043 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3044 Tobias Grosser <grosser@fim.uni-passau.de>
3046 * graphite.c (build_scop_context): Don't use CloogMatrix.
3047 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
3048 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
3050 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3051 Tobias Grosser <grosser@fim.uni-passau.de>
3053 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
3054 liveout_renames, add_params fields...
3055 (struct sese): ... here.
3056 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
3057 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
3059 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3060 Tobias Grosser <grosser@fim.uni-passau.de>
3062 * graphite.c (print_scop): Do not print the CLooG program.
3063 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
3064 build_cloog_prog, gloog): Don't use SCOP_PROG.
3065 (find_transform): Renamed scop_to_clast.
3066 (print_generated_program, debug_generated_program): New.
3067 (graphite_transform_loops): Adapt to new interface.
3068 * graphite.h (struct scop): Remove program field.
3069 (SCOP_PROG): Removed.
3070 (print_generated_program, debug_generated_program): Declared.
3072 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
3074 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
3075 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
3076 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
3077 free_graphite_bb, build_scop_canonical_schedules,
3078 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
3079 schedules are now represented using a ppl_Linear_Expression_t.
3080 * graphite.h (struct graphite_bb): Same.
3081 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
3082 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
3084 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3086 * graphite.c: Free local memory.
3087 * graphite-ppl.c: Same.
3089 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
3091 * graphite.c (const_column_index, get_first_matching_sign_row_index,
3092 get_lower_bound_row, get_upper_bound_row, copy_constraint,
3093 swap_constraint_variables, scale_constraint_variable): Removed.
3094 (graphite_trans_bb_strip_mine): Remove pong.
3095 * graphite-ppl.c: Include missing header files.
3096 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
3097 * graphite-ppl.h (ppl_strip_loop): Declared.
3098 * Makefile.in (graphite-ppl.o): Adjust dependences.
3100 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
3102 * graphite.c (build_loop_iteration_domains): Remove ping pong.
3103 (build_scop_iteration_domain): Same.
3105 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3107 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3109 (add_value_to_dim, scan_tree_for_params_right_scev,
3110 scan_tree_for_params_int): New.
3111 * graphite-ppl.c (oppose_constraint): New.
3112 (insert_constraint_into_matrix): Implement missing cases.
3113 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3115 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
3117 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3118 use ppl_move_dimension.
3120 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3122 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
3125 * graphite-ppl.c: Same.
3126 * graphite-ppl.h: Same.
3128 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
3130 Revert last 3 commits.
3132 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3134 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
3136 (add_value_to_dim, scan_tree_for_params_right_scev,
3137 scan_tree_for_params_int): New.
3138 * graphite-ppl.c (oppose_constraint): New.
3139 (insert_constraint_into_matrix): Implement missing cases.
3140 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
3142 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3144 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
3146 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3147 Tobias Grosser <grosser@fim.uni-passau.de>
3149 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
3150 use ppl_move_dimension.
3151 * graphite-ppl.c (ppl_move_dimension): New.
3152 * graphite-ppl.h (ppl_move_dimension): Declared.
3154 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
3156 * graphite.c: Do not include cloog/cloog.h.
3157 (print_graphite_bb): Remove ping pong, call PPL print function.
3159 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
3161 * Makefile.in (OBJS-common): Add graphite-ppl.o.
3162 (graphite.o): Add dependence on graphite-ppl.h.
3163 (graphite-ppl.o): New.
3164 (graphite-data-ref.c): Ping pong between PPL data structures
3166 * graphite-ppl.c: New.
3167 * graphite-ppl.h: New.
3168 * graphite.c: Include graphite-ppl.h.
3169 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
3170 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
3171 Ping pong between PPL data structures and matrices.
3172 (new_graphite_bb): Create a PPL constraint system.
3173 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
3174 (build_loop_iteration_domains): Use PPL functions.
3175 * graphite.h: Include graphite-ppl.h. Fix comments.
3176 (graphite_bb): Use a ppl_Constraint_System_t instead of
3177 CloogMatrix for representing the domain.
3178 (scop): Remove static_schedule.
3179 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
3181 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
3183 * graphite.c: Fix some comments.
3185 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
3188 * graphite.c (if_region_set_false_region): After moving a region
3189 in the false branch of a condition, remove the empty dummy
3191 (gloog): Remove wrong fix for PR38953.
3193 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3195 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
3196 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
3197 register_bb_in_sese, new_sese, free_sese): Moved.
3198 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
3199 outermost_loop_in_scop, build_scop_iteration_domain,
3200 expand_scalar_variables_ssa_name, get_vdef_before_scop,
3201 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
3202 Use loop_in_sese_p instead of loop_in_scop_p.
3203 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
3204 (free_scop): Do not free SCOP_BBS_B.
3205 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
3206 ref_nb_loops): Moved here...
3207 * graphite.h (ref_nb_loops): ... from here.
3208 (struct scop): Remove bbs_b bitmap.
3209 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
3210 * testsuite/gcc.dg/graphite/scop-19.c: New
3212 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
3214 * graphite.c (scopdet_basic_block_info): Fix bug in scop
3217 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3219 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
3220 eq_loop_to_cloog_loop): Remove.
3221 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
3222 * graphite.h (struct scop): Remove loop2cloog_loop.
3223 (loop_domain_dim, loop_iteration_vector_dim): Remove.
3225 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
3227 * opts.c (decode_options): Only add graphite options to O2
3228 if we compile with graphite enabled.
3230 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3232 * Merge from mainline (r143163:143684).
3234 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
3236 * graphite.c (debug_value): Removed.
3237 * graphite.h (debug_value): Removed.
3239 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3241 * passes.c (init_optimization_passes): Do not call pass_copy_prop
3242 after graphite: pass_copy_prop does not maintain a proper loop closed
3243 SSA form. pass_copy_prop should be fixed.
3245 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3247 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
3249 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
3251 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
3252 (gloog): Split the exit of the scop when the scop exit is a loop exit.
3253 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
3256 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
3258 * graphite.c (gloog): Return true when code gen succeeded.
3259 (graphite_transform_loops): Do not call cleanup_tree_cfg if
3260 the code of the function did not changed. After cleanup_tree_cfg
3261 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
3264 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
3266 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
3267 gimple_call_lhs is NULL.
3269 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
3270 Tobias Grosser <tobi.grosser@amd.com>
3272 * graphite.c (graphite_trans_scop_block): Do not block single
3275 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3276 Tobias Grosser <tobi.grosser@amd.com>
3278 * graphite.c (build_scop_canonical_schedules): Start schedules at
3281 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
3282 Tobias Grosser <tobi.grosser@amd.com>
3284 * graphite.c (compare_prefix_loops): New.
3285 (build_scop_canonical_schedules): Rewritten.
3286 (graphite_transform_loops): Move build_scop_canonical_schedules
3287 after build_scop_iteration_domain.
3289 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3290 Tobias Grosser <tobi.grosser@amd.com>
3292 * graphite.c (add_conditions_to_domain): Add the loops to
3293 the dimension of the iteration domain. Do copy the domain
3294 only when it exists.
3295 (build_scop_conditions_1): Do not call add_conditions_to_domain.
3296 (add_conditions_to_constraints): New.
3297 (can_generate_code_stmt, can_generate_code): Removed.
3298 (gloog): Do not call can_generate_code.
3299 (graphite_transform_loops): Call add_conditions_to_constraints
3300 after building the iteration domain.
3302 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3303 Tobias Grosser <tobi.grosser@amd.com>
3304 Jan Sjodin <jan.sjodin@amd.com>
3306 * graphite.c (scan_tree_for_params): On substractions negate
3307 all the coefficients of the term.
3308 (clast_to_gcc_expression_red): New. Handle reduction expressions
3309 of more than two operands.
3310 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
3311 (get_vdef_before_scop): Handle also the case of default definitions.
3313 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
3316 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
3317 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
3318 (gloog): Do not call cleanup_tree_cfg.
3319 (graphite_transform_loops): Call cleanup_tree_cfg after all
3320 scops have been code generated.
3322 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3324 * passes.c (init_optimization_passes): Schedule after
3325 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
3327 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
3329 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
3331 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
3332 Set the type of an expression to the type of its assign statement.
3333 (expand_scalar_variables_expr): Do not pass loop_p.
3334 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
3335 (copy_bb_and_scalar_dependences): Do not pass loop_p.
3336 (translate_clast): Update call to copy_bb_and_scalar_dependences.
3338 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3340 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
3341 an expression to the gimple_expr_type of its assign statement.
3342 (expand_scalar_variables_expr): Stop recursion on tcc_constant
3345 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
3347 PR tree-optimization/38786
3348 * testsuite/gcc.dg/graphite/pr38786.c: New.
3349 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
3350 the SSA_NAME case of expand_scalar_variables_expr.
3351 (expand_scalar_variables_expr): Also gather the scalar computation
3352 used to index the memory access.
3353 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
3354 the gimple_stmt_iterator where it inserts new code.
3356 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3358 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
3360 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
3362 * opts.c (decode_options): Enable flag_graphite_identity and
3363 flag_loop_block in -O2 and above.
3365 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3367 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
3368 Fix merge problem: replace with the file from trunk.
3370 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
3372 * Merge from mainline (r141727:143163).
3374 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
3375 Jan Sjodin <jan.sjodin@amd.com>
3377 PR tree-optimization/38559
3378 * testsuite/gcc.dg/graphite/pr38559.c: New.
3380 * graphite.c (debug_value, copy_constraint,
3381 swap_constraint_variables, scale_constraint_variable, ): New.
3382 (get_lower_bound, get_upper_bound): Removed.
3383 (graphite_trans_bb_strip_mine): Clean up this code that works
3384 only for constant number of iterations. Fully copy upper and
3385 lower bound constraints, not only the constant part of them.
3386 * graphite.h (debug_value): Declared.
3388 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
3390 PR tree-optimization/38492
3391 PR tree-optimization/38498
3392 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
3393 * tree-chrec.h (scev_is_linear_expression): Declared.
3394 * graphite.c (graphite_cannot_represent_loop_niter): New.
3395 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
3396 (graphite_loop_normal_form): Use gcc_assert.
3397 (scan_tree_for_params): Use CASE_CONVERT.
3398 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
3399 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
3400 Use gcc_assert. Discard scops that contain unhandled cases.
3401 (build_scop_conditions): Return a boolean status for unhandled cases.
3402 (strip_mine_profitable_p): Print the loop number, not its depth.
3403 (is_interchange_valid): Pass the depth of the loop nest, don't
3404 recompute it wrongly.
3405 (graphite_trans_bb_block): Same.
3406 (graphite_trans_bb_block): Print tentative of loop blocking.
3407 (graphite_trans_scop_block): Do not print that the loop has been
3409 (graphite_transform_loops): Do not handle scops that contain condition
3412 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
3414 * testsuite/gcc.dg/graphite/block-0.c: Update test.
3415 * testsuite/gcc.dg/graphite/block-1.c: Same.
3416 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
3418 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
3419 * testsuite/gcc.dg/graphite/block-3.c: New.
3420 * testsuite/gcc.dg/graphite/pr38498.c: New.
3422 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
3424 PR tree-optimization/38510
3425 * gcc.dg/graphite/pr38510.c: New.
3426 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
3427 (translate_clast): Call recompute_all_dominators before
3429 (gloog): Call recompute_all_dominators before graphite_verify.
3431 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
3433 PR tree-optimization/38492
3434 * graphite.c (rename_map_elt, debug_rename_elt,
3435 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
3436 rename_map_elt_info, eq_rename_map_elts,
3437 get_new_name_from_old_name, bb_in_sese_p): Moved around.
3438 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
3439 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
3440 (sese_build_livein_liveouts): New.
3441 (new_sese, free_sese): New.
3442 (new_scop): Call new_sese.
3443 (free_scop): Call free_sese.
3444 (rename_variables_from_edge, rename_phis_end_scop): Removed.
3445 (register_old_new_names): Renamed register_old_and_new_names.
3446 (register_scop_liveout_renames, add_loop_exit_phis,
3447 insert_loop_close_phis, struct igp,
3448 default_liveout_before_guard, add_guard_exit_phis,
3449 insert_guard_phis, copy_renames): New.
3450 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3451 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3452 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3453 (scop_adjust_phis_for_liveouts): New.
3454 (gloog): Call scop_adjust_phis_for_liveouts.
3456 * graphite.h (struct sese): Documented. Added fields liveout,
3458 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3459 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3460 (struct scop): Added field liveout_renames.
3461 (SCOP_LIVEOUT_RENAMES): New.
3463 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3465 PR tree-optimization/38409
3466 * gcc.dg/graphite/pr38409.c: New.
3467 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3469 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3471 * graphite.c (gcc_type_for_cloog_iv): By default return
3473 (graphite_create_new_loop): Don't fold_convert the already
3474 fold_convert-ed expression.
3476 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3478 PR tree-optimization/38446
3479 * gcc.dg/graphite/pr38446.c: New.
3480 * graphite.c (register_bb_in_sese): New.
3481 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3482 looking at the bbs in the region.
3483 * graphite.h (sese): Add region_basic_blocks pointer set to
3484 structure and initialize at the time of defining new scop.
3486 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3488 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3489 (find_params_in_bb): Do not free data refs.
3490 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3492 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3494 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3495 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3496 * testsuite/gcc.dg/graphite/block-5.c: New.
3497 * testsuite/gcc.dg/graphite/block-6.c: New.
3498 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3499 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3500 * testsuite/gcc.dg/graphite/block-2.c: Same.
3502 * graphite.c (struct ivtype_map_elt): New.
3503 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3504 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3505 gcc_type_for_cloog_iv): New.
3506 (loop_iv_stack_patch_for_consts): Use the type of the induction
3507 variable from the original loop, except for the automatically
3508 generated loops, i.e., in the case of a strip-mined loop, in
3509 which case there is no original loop: in that case just use
3511 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3512 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3513 (clast_name_to_gcc): Accept params to be NULL.
3514 (clast_to_gcc_expression): Take an extra parameter for the type.
3515 Convert to that type all the expressions built by this function.
3516 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3517 (graphite_translate_clast_equation): Compute the type of the
3518 clast_equation before translating its LHS and RHS.
3519 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3520 (graphite_create_new_loop): Compute the type of the induction
3521 variable before translating the lower and upper bounds and before
3522 creating the induction variable.
3523 (rename_variables_from_edge, rename_phis_end_scop): New.
3524 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3525 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3526 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3527 compute_cloog_iv_types): New.
3528 (gloog): Call compute_cloog_iv_types before starting the
3529 translation of the clast.
3531 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3532 (GBB_CLOOG_IV_TYPES): New.
3533 (debug_ivtype_map): Declared.
3534 (oldiv_for_loop): New.
3536 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3539 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3540 (param_index): Assert if parameter is not know after parameter
3542 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3543 (find_scop_parameters): Mark, that we have finished parameter
3545 (graphite_transform_loops): Move condition detection before parameter
3547 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3548 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3550 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3552 * graphite.c (graphite_transform_loops): Always call find_transform ()
3553 in ENABLE_CHECKING. So we test these code paths, even if we do not
3556 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3558 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3559 (print_scop): Ditto.
3561 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3564 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3565 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3566 regions more than once.
3568 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3570 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3571 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3574 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3576 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3577 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3578 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3579 (max_precision_type): New.
3580 (value_clast): Removed.
3581 (clast_to_gcc_expression): Be more careful to types of expressions.
3582 Use max_precision_type and update use of gmp_cst_to_tree.
3583 (graphite_translate_clast_equation): Use max_precision_type.
3584 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3585 use the type of the condition.
3586 (graphite_create_new_loop): Do not use integer_type_node, use the
3587 max_precision_type of lb and ub.
3589 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3591 * graphite.c (build_scops_1): Initialize open_scop.exit
3594 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3596 * testsuite/gcc.dg/graphite/pr38084.c: New.
3597 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3598 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3599 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3600 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3601 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3603 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3604 Jan Sjodin <jan.sjodin@amd.com>
3605 Harsha Jagasia <harsha.jagasia@amd.com>
3617 * testsuite/gcc.dg/graphite/pr38073.c: New.
3618 * testsuite/gcc.dg/graphite/pr37928.c: New.
3619 * testsuite/gcc.dg/graphite/pr37883.c: New.
3620 * testsuite/gcc.dg/graphite/pr38125.c: New.
3621 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3622 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3623 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3625 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3626 the number of detected scops. Copy exact same test for loop
3628 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3629 loops to be blocked as reductions are not handled.
3630 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3632 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3633 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3635 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3636 * Makefile.in (graphite.o): Depend on value-prof.h.
3637 (graphite.o-warn): Removed -Wno-error.
3638 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3639 to be a NULL pointer. Call update_stmt. Return the newly created
3640 cannonical induction variable.
3642 * graphite.h (debug_rename_map): Declared. Fix some comments.
3644 * graphite.c: Reimplement the code generation from graphite to gimple.
3645 Include value-prof.h.
3646 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3647 (get_old_iv_from_ssa_name): Removed.
3648 (graphite_stmt_p): New.
3649 (new_graphite_bb): Test for useful statements before building a
3650 graphite statement for the basic block.
3651 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3652 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3654 (recompute_all_dominators, graphite_verify,
3655 nb_reductions_in_loop, graphite_loop_normal_form): New.
3656 (scop_record_loop): Call graphite_loop_normal_form.
3657 (build_scop_loop_nests): Iterate over all the blocks of the
3658 function instead of relying on the incomplete information from
3659 SCOP_BBS. Return the success of the operation.
3660 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3661 (add_bb_domains): Removed.
3662 (build_loop_iteration_domains): Don't call add_bb_domains.
3663 Add the iteration domain only to the basic blocks that have been
3664 translated to graphite.
3665 (build_scop_conditions_1): Add constraints only if the basic
3666 block have been translated to graphite.
3667 (build_scop_data_accesses): Completely disabled until data
3668 dependence is correctly implemented.
3669 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3670 (remove_all_edges_1, remove_all_edges): Removed.
3671 (get_new_name_from_old_name): New.
3672 (graphite_rename_variables_in_stmt): Renamed
3673 rename_variables_in_stmt. Call get_new_name_from_old_name.
3674 Use replace_exp and update_stmt.
3675 (is_old_iv): Renamed is_iv.
3676 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3677 Use replace_exp and update_stmt.
3678 (expand_scalar_variables_expr): Same. Use the map to get the
3679 new names for the renaming of induction variables and for the
3680 renaming of variables after a basic block has been copied.
3681 (expand_scalar_variables): Same.
3682 (graphite_rename_variables): Renamed rename_variables.
3683 (move_phi_nodes): Removed.
3684 (get_false_edge_from_guard_bb): New.
3685 (build_iv_mapping): Do not insert the induction variable of a
3686 loop in the renaming iv map if the basic block does not belong
3688 (register_old_new_names, graphite_copy_stmts_from_block,
3689 copy_bb_and_scalar_dependences): New.
3690 (translate_clast): Heavily reimplemented: copy basic blocks,
3691 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3692 At each translation step call graphite_verify ensuring the
3693 consistency of the SSA, loops and dominators information.
3694 (collect_virtual_phis, find_vdef_for_var_in_bb,
3695 find_vdef_for_var_1, find_vdef_for_var,
3696 patch_phis_for_virtual_defs): Removed huge hack.
3697 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3698 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3699 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3700 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3701 if_region_get_condition_block, if_region_set_false_region,
3702 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3703 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3704 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3705 rewrite_into_sese_closed_ssa): New.
3706 (gloog): Remove dead code. Early return if code cannot be
3707 generated. Call cleanup_tree_cfg once the scop has been code
3709 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3710 block loops with less than two loops.
3711 (graphite_apply_transformations): Remove the call to
3712 scop_remove_ignoreable_gbbs.
3713 (limit_scops): When build_scop_loop_nests fails, continue on
3714 the next scop. Fix open_scop.entry.
3715 (graphite_transform_loops): Call recompute_all_dominators: force the
3716 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3717 Call initialize_original_copy_tables and free_original_copy_tables
3718 to be able to copy basic blocks during code generation.
3719 When build_scop_loop_nests fails, continue on next scop.
3720 (value_clast): New union.
3721 (clast_to_gcc_expression): Fix type cast warning.
3723 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3725 * Merge from mainline (r140838:141727).
3727 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3731 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3733 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3737 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3738 exits and conditions.
3739 * testsuite/gcc.dg/graphite/pr37943.c: New.
3741 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3744 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3746 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3748 * doc/invoke.texi: Fix spaces.
3750 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3752 PR tree-optimization/37891
3753 Reverted last commit.
3754 * graphite.c (create_single_entry_edge): Set
3755 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3757 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3758 Mitul Thakkar <mitul.thakkar@amd.com>
3760 * graphite.c (create_single_entry_edge): Set
3761 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3763 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3765 * doc/invoke.texi: Add -fgraphite-identity.
3766 * graphite.c (graphite_apply_transformations): Check for
3767 -fgraphite-identity.
3768 * toplev.c (process_options): Add flag_graphite_identity.
3769 * tree-ssa-loop.c: Add flag_graphite_identity.
3771 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3773 Undo changes from 2008-10-02:
3774 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3775 operand type when copying the operand to a variable of different type.
3776 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3777 with the IV name after increment.
3779 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3780 Harsha Jagasia <harsha.jagasia@amd.com>
3782 PR tree-optimization/37828
3783 * testsuite/gcc.dg/graphite/pr37828.c: New.
3784 * graphite.c (graphite_trans_loop_block): Do not loop block
3785 single nested loops.
3787 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3788 Sebastian Pop <sebastian.pop@amd.com>
3790 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3791 rename_map_elt_info, eq_rename_map_elts): New.
3792 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3793 (expand_scalar_variables_expr): Change parameters.
3794 (expand_scalar_variables_stmt): Same.
3795 (expand_scalar_variables): Same.
3796 (graphite_rename_ivs): Rename graphite_rename_variables.
3797 (build_iv_mapping): New.
3798 (translate_clast): Call build_iv_mapping.
3799 * graphite.h (gbb_p): New name.
3801 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3803 PR tree-optimization/37684
3804 * gcc.dg/graphite/pr37684.c: New.
3805 * graphite.c (exclude_component_ref): New.
3806 (is_simple_operand): Call exclude_component_ref.
3808 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3809 Harsha Jagasia <harsha.jagasia@amd.com>
3811 PR tree-optimization/37485
3812 * gcc.dg/graphite/block-2.c: New
3813 * graphite.c (gmp_cst_to_tree): Moved.
3814 (iv_stack_entry_is_constant): New.
3815 (iv_stack_entry_is_iv): New.
3816 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3817 (loop_iv_stack_insert_constant): New.
3818 (loop_iv_stack_pop): Use new datatpype.
3819 (loop_iv_stack_get_iv): Same.
3820 (loop_iv_stack_get_iv_from_name): Same.
3821 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3822 (loop_iv_stack_patch_for_consts): New.
3823 (loop_iv_stack_remove_constants): New.
3824 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3825 (translate_clast): Call loop_iv_stack_patch_for_consts and
3826 loop_iv_stack_remove_constants.
3827 (gloog): Use new datatype. Redirect construction edge to end
3828 block to avoid accidental deletion.
3829 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3831 (union iv_stack_entry_data): New. Data in iv stack entry.
3832 (struct iv_stack_entry): New. Datatype for iv stack entries.
3834 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3836 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3837 operand type when copying the operand to a variable of different type.
3839 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3841 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3842 with the IV name after increment.
3844 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3846 * Merge from mainline (r140164:140838).
3848 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3850 * graphite-data-ref.c: New.
3851 * graphite.c (print_scop): Also dump the dependence graph.
3852 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3853 (new_scop): Initialize SCOP_DEP_GRAPH.
3854 (build_scop_dynamic_schedules): New.
3855 (build_access_matrix_with_af): Fixed column numbering.
3856 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3857 * graphite.h: Add ifndef/define guards against multiple inclusion.
3858 (struct scop): Add dep_graph field.
3859 (SCOP_DEP_GRAPH): Defined.
3860 (ref_nb_loops): Fixed and moved to other position.
3861 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3862 (nb_loops_around_loop_in_scop): New.
3863 (graphite_dump_dependence_graph): Declared.
3864 (graphite_build_rdg_all_levels): Declared.
3865 (graphite_test_dependence): Declared.
3866 * Makefile.in (graphite-data-ref.o): New target.
3868 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3870 * Merge from mainline (139870:140164).
3872 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3874 * Merge from mainline (138275:139870).
3875 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3876 the commits from trunk broke the niter detection.
3878 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3880 * graphite.c: Add more documentation. Fix formatting.
3881 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3882 loop_iv_stack_debug): Moved...
3883 (schedule_to_scattering): Move before use.
3884 (dot_all_scops): Include in "#if 0" the code for system
3887 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3888 loop_iv_stack_debug): ...here.
3890 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3892 * tree-phinodes.c (make_phi_node): Extern.
3893 (add_phi_node_to_bb): New.
3894 (create_phi_node): Call add_phi_node_to_bb.
3895 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3896 (remove_statement): Handle case where stored phi was updated
3897 and is no longer the same.
3898 * graphite.c (is_parameter): New.
3900 (expand_scalar_variables_expr): New.
3901 (expand_scalar_variables_stmt): New.
3902 (expand_scalar_variables): New.
3903 (move_phi_nodes): Create new phi instead of moving old one.
3904 (translate_clast): Call expand_scalar_variables.
3905 (find_vdef_for_var_in_bb): Also scan regular definitions.
3906 (skip_phi_defs): New.
3907 (collect_scop_exit_phi_args): New.
3908 (patch_scop_exit_phi_args): New.
3909 (gloog): Patch phis after scop.
3910 * tree-flow.h: (add_phi_node_to_bb): Declared.
3911 (make_phi_node): Declared.
3913 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3915 * graphite.c (end_scop): Split the entry of the scop when it
3916 is the header of the loop in which the scop is ending.
3917 (build_scops_1, limit_scops): Update uses of end_scop.
3919 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3921 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3922 SCOP_ENTRY or SCOP_EXIT.
3924 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3926 * graphite.c (get_construction_edge): Removed.
3927 (gloog): Construction edge is the scop entry edge.
3929 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3931 * graphite.c (can_generate_for_scop): Removed.
3932 (gloog): Do not call it.
3934 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3936 * graphite.c (new_scop): Entry of a scop is an edge.
3937 Initialize SESE region.
3938 (free_scop): Free SESE region.
3939 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3940 (split_difficult_bb): New, split from end_scop.
3941 (end_scop): Exit of a scop is an edge.
3942 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3943 not automatically updated and thus is always wrong.
3944 * graphite.h (struct sese): New.
3947 (struct scop): New field for a SESE region. Remove entry, exit.
3948 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3949 semantics as before. Moved comment around.
3951 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3952 Sebastian Pop <sebastian.pop@amd.com>
3954 * graphite.c (graphite_transform_loops): Always enable gloog
3955 and find_transform when ENABLE_CHECKING.
3957 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3959 * graphite.c (graphite_transform_loops): Move pretty printer
3960 of SCOPs before doing any transform. Remove call to print_scops
3961 and dot_all_scops_1.
3963 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3965 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3966 (print_graphite_bb): Same.
3968 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3970 * graphite.c (dot_all_scops_1): Cleanup.
3971 (move_scops): Fix comment.
3973 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3975 * graphite.c (build_scop_bbs): Revert commit 139355:
3977 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3978 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3980 * graphite.c (build_scop_bbs): Factor up code.
3982 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3984 * graphite.c (gloog): Update dominator info.
3986 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3988 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3990 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3992 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3994 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3995 (translate_clast): Correct formatting.
3996 * graphite.h (struct num_map): Removed.
3997 (struct graphite_bb): Remove num_map field.
3998 (GBB_INDEX_TO_NUM_MAP): Removed.
4000 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4002 * graphite.c (build_access_matrix_with_af): Fix comments.
4003 (build_scop_data_accesses): Same.
4005 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4007 * graphite.c (build_scop_data_accesses): Don't construct
4008 access matrices. Add a FIXME and an assert condition that
4009 should pass when the access matrices will be needed.
4011 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
4013 * tree-data-ref.c (stmt_simple_memref_p): Don't call
4015 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
4016 Moved close by free_graphite_bb.
4017 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
4018 (new_scop): Move close by free_scop.
4019 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
4021 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
4023 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
4024 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
4025 instead of recursive call.
4026 (graphite_translate_clast_equation): New.
4027 (graphite_create_guard_cond_expr): New.
4028 (graphite_create_new_guard): New.
4029 (get_stack_index_from_iv): Removed.
4030 (graphite_rename_ivs_stmt): Use gbb_loop_index.
4031 (get_true_edge_from_guard_bb): New.
4032 (translate_clast): Handle stmt_guard in clast.
4033 (get_construction_edge): Allow construction edge detection for
4034 a scope entry with multiple predecessors if one predecessor is
4035 the immediate dominator of scope entry.
4036 (can_generate_code_stmt): Enable code generation for clast_guard.
4037 (gloog): Use correct context loop. Removed check for post dominators.
4038 * cfgloop.h (create_empty_if_region_on_edge): Declared.
4040 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4042 * graphite.c (remove_dead_loops): Document better which
4045 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4047 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
4049 (graphite.o): Also depends on pointer-set.h.
4051 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4053 * graphite.c (scop_record_loop): Fix compile warning.
4055 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
4056 Sebastian Pop <sebastian.pop@amd.com>
4058 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
4060 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
4062 * graphite.c (build_graphite_bb): Initialize bb->aux to
4063 point to the graphite_bb_p.
4064 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
4066 (add_bb_domains): Does not use the scop parameter.
4067 (graphite_transform_loops): Clean bb->aux at the end.
4069 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4070 Sebastian Pop <sebastian.pop@amd.com>
4072 * testsuite/lib/target-supports.exp
4073 (check_effective_target_fgraphite): New.
4075 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
4076 check_effective_target_fgraphite returns false.
4077 Set dg-do-what-default to compile.
4078 (scan-graphite-dump-times): Removed.
4079 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
4081 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
4082 Use scan-tree-dump-times instead of scan-graphite-dump-times.
4083 * testsuite/gcc.dg/graphite/scop-1.c: Same.
4084 * testsuite/gcc.dg/graphite/scop-2.c: Same.
4085 * testsuite/gcc.dg/graphite/scop-3.c: Same.
4086 * testsuite/gcc.dg/graphite/scop-4.c: Same.
4087 * testsuite/gcc.dg/graphite/scop-5.c: Same.
4088 * testsuite/gcc.dg/graphite/scop-6.c: Same.
4089 * testsuite/gcc.dg/graphite/scop-7.c: Same.
4090 * testsuite/gcc.dg/graphite/scop-8.c: Same.
4091 * testsuite/gcc.dg/graphite/scop-9.c: Same.
4092 * testsuite/gcc.dg/graphite/scop-10.c: Same.
4093 * testsuite/gcc.dg/graphite/scop-11.c: Same.
4094 * testsuite/gcc.dg/graphite/scop-12.c: Same.
4095 * testsuite/gcc.dg/graphite/scop-13.c: Same.
4096 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
4097 * testsuite/gcc.dg/graphite/scop-14.c: Same.
4098 * testsuite/gcc.dg/graphite/scop-15.c: Same.
4099 * testsuite/gcc.dg/graphite/block-0.c: Same.
4100 * testsuite/gcc.dg/graphite/scop-16.c: Same.
4101 * testsuite/gcc.dg/graphite/block-1.c: Same.
4102 * testsuite/gcc.dg/graphite/scop-17.c: Same.
4103 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4104 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
4105 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
4106 * testsuite/gfortran.dg/graphite/block-2.f: Same.
4108 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4110 * graphite.c: Fix some XXX comments.
4111 (build_scop_dynamic_schedules): Removed.
4113 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4115 * graphite.h (scop_max_loop_depth): Moved...
4116 * graphite.c (scop_max_loop_depth): ...here.
4117 (remove_all_edges_1): New.
4118 (remove_all_edges): Factored code.
4119 (remove_cond_exprs): Check only the last statement for
4120 a GIMPLE_COND expression.
4122 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4124 * graphite.c (scan_tree_for_params): Early return when the
4125 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
4126 (find_scop_parameters): Factor out code.
4127 (graphite_trans_bb_strip_mine): Remove dead code.
4129 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4131 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
4132 graphite_trans_bb_move_loop): Factor asserts.
4133 (gloog): Perform sanity checks only for ENABLE_CHECKING.
4134 Do not call calculate_dominance_info and estimate_bb_frequencies.
4136 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
4138 * graphite.c (create_loops_mapping, free_loops_mapping,
4139 create_loops_mapping_num, debug_loop_mapping_1,
4140 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
4141 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
4142 graphite_loops_mapping_add_child_num,
4143 graphite_loops_mapping_insert_child,
4144 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
4145 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
4146 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
4147 create_num_from_index, get_num_from_index,
4148 swap_loop_mapped_depth): Removed.
4149 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
4150 (free_scop): Do not call free_loops_mapping.
4151 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
4152 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
4153 get_loop_mapped_depth.
4154 (graphite_trans_bb_move_loop): Do not update the loop mapping.
4155 (graphite_trans_bb_strip_mine): Same.
4156 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
4157 (struct scop): Remove field loops_mapping.
4159 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4160 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4162 * graphite.c (scop_record_loop): Factor out one level of the
4163 condition by early return.
4164 (build_scop_loop_nests): Format following FSF coding style.
4165 (build_scop_dynamic_schedules): Factor out code.
4166 (scopdet_bb_info): Reindent. Default case should not be reachable.
4168 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4169 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4171 * graphite.c (loop_affine_expr): Check for DECL_P or struct
4172 assignments that are not handled as simple operands for now.
4174 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4175 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4177 * graphite.c (build_scop_bbs): Factor up code.
4179 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4180 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4182 * graphite.c (stmt_simple_for_scop_p): Factor code out
4184 (enum gbb_type): New. Group all the GBB_* types under it.
4185 (is_loop_exit): Moved...
4186 (end_scop): Enable BB spliting.
4187 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
4188 * cfgloop.h (is_loop_exit): Declared.
4190 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4192 * doc/invoke.texi: Remove strides from examples containing
4193 DO loops when the strides are equal to 1.
4195 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
4196 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4198 * graphite.c (graphite_trans_scop_block): Or the result with
4199 the result from graphite_trans_loop_block.
4200 * testsuite/gcc.dg/graphite/block-1.c: New.
4201 * testsuite/gfortran.dg/graphite/block-1.f90: New.
4202 * testsuite/gfortran.dg/graphite/block-2.f: New.
4204 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4206 * graphite.c (graphite_transform_loops): Call cloog_initialize
4209 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4211 * tree-data-ref.c) (stmt_simple_memref_p): New.
4212 * tree-data-ref.h (stmt_simple_memref_p): Declared.
4213 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
4214 (is_simple_operand): Call stmt_simple_memref_p.
4216 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
4217 using pointer arithmetic, as this is optimized by PRE and
4218 makes the code too difficult to analyze.
4220 * testsuite/gcc.dg/graphite/scop-18.c: Same.
4222 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
4224 * gdbinit.in (pgg): New.
4226 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4228 * graphite.c (graphite_trans_loop_block): Fix warning.
4230 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4232 * graphite.c (graphite_trans_loop_block): Fix my merge error.
4234 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
4236 * graphite.c (graphite_trans_bb_block): Remove check for
4237 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
4238 Check if loop blocking is profitable for every loop, before applying
4240 (graphite_apply_transformations): Call graphite_trans_bb_block only,
4241 if flag_loop_block is set.
4243 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4245 * graphite.c: Add some more documentation for the loop
4248 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4250 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
4251 * graphite.c: Format on less than 80 columns.
4254 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4256 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
4258 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
4260 * doc/invoke.texi (floop-block, floop-strip-mine,
4261 floop-interchange): Update documentation with examples.
4263 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4265 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
4267 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
4269 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
4271 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
4272 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
4273 * tree-scalar-evolution.c: Revert useless changes.
4274 * tree-phinodes.c: Same.
4277 * tree-vectorizer.h: Same.
4278 * tree-flow.h: Same.
4280 * common.opt (fgraphite): Update documentation.
4282 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
4284 * doc/invoke.texi (-floop-block, -floop-strip-mine,
4285 -floop-interchange): Add more text for explaining what each of these
4287 * tree-into-ssa.c (gimple_vec): Moved to...
4288 * graphite.c: Include gimple.h.
4289 (gimple_vec): Moved to...
4290 (del_loop_to_cloog_loop): Removed.
4291 (loop_affine_expr): Do not call create_data_ref when the
4292 operand is a constant.
4293 (new_scop): Use free instead of del_loop_to_cloog_loop.
4294 * Makefile.in (graphite.o): Depend on GIMPLE_H.
4295 * gimple.h (gimple_vec): ... here.
4297 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4299 * graphite.c (scopdet_bb_info): Only allow loops with known number of
4301 (build_loop_iteration_domains): Fail, if latch executions unknown.
4303 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4305 * graphite.c (add_conditions_to_domain): New.
4306 (build_scop_conditions_1): Call add_conditions_to_domain.
4307 (set_cloog_options): Allow to disable optimizations.
4309 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4311 * graphite.c (find_params_in_bb): Look for parameters in conditions.
4312 Do not use walk_dominator_tree.
4313 (find_scop_parameters): Do not use walk_dominator_tree.
4315 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4317 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
4318 (idx_record_params): Adapt.
4319 * graphite.h (scop_gimple_loop_depth): New.
4321 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4323 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
4324 (scan_tree_for_params): Remove value_init.
4325 (build_scop_context): Remove value_init.
4326 (build_loop_iteration_domains): Remove value_init.
4327 (schedule_to_scattering): Remove value_init.
4328 (graphite_trans_bb_strip_mine): Remove value_init.
4330 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4332 * gcc/graphite.c (limit_scops): New.
4333 (graphite_transform_loops): Add limit SCoPs.
4334 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
4335 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
4336 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
4337 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
4338 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
4339 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
4340 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
4341 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
4342 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
4343 Change loop numbers.
4344 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
4345 Change loop numbers.
4346 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
4347 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
4348 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
4349 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
4350 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
4351 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
4352 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
4353 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
4354 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
4355 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
4357 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
4359 * graphite.c (graphite_transform_loops): Call always find_transform.
4361 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
4363 * graphite.c (free_loops_mapping): New.
4364 (stmt_simple_for_scop_p): Fix typo.
4365 (stmt_simple_for_scop_p): Fix tuples functions, that
4367 (free_graphite_bb): Fix some memleaks.
4368 (free_scop): Fix some memleaks.
4369 (scopdet_bb_info): Do not forget some tmp SCoPs.
4370 (find_params_in_bb): Fix some memleaks.
4371 (clast_to_gcc_expression): Fix warning.
4373 2008-08-07 Tobias Grosser <grosser@fim.uni-passau.de>
4375 * testsuite/gcc.dg/graphite/scop-16.c: Fix for 32bit.
4376 * testsuite/gcc.dg/graphite/scop-17.c: Fix for 32bit.
4378 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4380 * tree-ssa-loop.c (tree-ssa-loop.o): Do not include toplev.h.
4381 Move code ifdef-ed HAVE_cloog...
4382 * graphite.c: Include toplev.h.
4384 * Makefile.in (OBJS-common): Always build graphite.o.
4385 (BACKEND): Remove @GRAPHITE@.
4386 (tree-ssa-loop.o): Do not depend on TOPLEV_H.
4387 (graphite.o): Depend on TOPLEV_H.
4389 2008-08-04 Sebastian Pop <sebastian.pop@amd.com>
4391 * Makefile.in (tree-ssa-loop.o): Depend on TOPLEV_H.
4392 Remove typo left from polylib to ppl conversion.
4393 * graphite.c (graphite_transforms): Use sorry instead of fatal.
4395 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4397 * toplev.c (process_options): Move the graphite loop optimization
4399 * tree-ssa-loop.c (graphite_transforms): ... here.
4400 When not configured with CLooG, print to dump_file that
4401 Graphite transforms were not performed.
4402 * testsuite/gcc.dg/graphite/graphite.exp (scan-graphite-dump-times):
4404 * testsuite/gcc.dg/graphite/*.c: Updated all testcases to use
4405 scan-graphite-dump-times.
4407 2008-08-03 Sebastian Pop <sebastian.pop@amd.com>
4409 * graphite.c (dot_scop, dot_all_scops): Do not call system.
4410 Do not open /tmp/scop.dot and /tmp/allscops.dot.
4412 2008-08-02 Sebastian Pop <sebastian.pop@amd.com>
4413 Jan Sjodin <jan.sjodin@amd.com>
4415 * configure: Regenerated.
4416 * omp-low.c (expand_omp_sections): Remove now unused code.
4417 * config.in (HAVE_polylib): Removed.
4418 * configure.ac (HAVE_polylib, POLYLIBLIBS, POLYLIBINC): Removed.
4419 (PPLLIBS, PPLINC): Added.
4420 * graphite.c: Replace unsigned with int wherever possible.
4421 Don't access Cloog's data structures, but use accessor functions.
4422 Clast's stmt->type is now implemented as a vtable: change the
4423 switches of stmt->type into ifs.
4424 (polylib/polylibgmp.h): Don't include.
4425 (initialize_dependence_polyhedron,
4426 initialize_data_dependence_polyhedron, is_empty_polyhedron,
4427 statement_precedes_p, test_dependence, build_rdg_all_levels,
4428 dump_dependence_graph): Removed until this code is cleaned up
4430 * Makefile.in (POLYLIBLIBS): Renamed PPLLIBS.
4431 (POLYLIBINC): Renamed PPLINC.
4433 2008-08-01 Harsha Jagasia <harsha.jagasia@amd.com>
4434 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4435 Jan Sjodin <jan.sjodin@amd.com>
4437 Finish the merge and tuplification of graphite.
4439 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4440 Jan Sjodin <jan.sjodin@amd.com>
4442 Partial merge from mainline (138072:138275).
4443 * graphite.c still has to be tuplified.
4445 2008-07-29 Jan Sjodin <jan.sjodin@amd.com>
4447 * graphite.c (graphite_loops_mapping_max_loop_num): New.
4448 (create_num_from_index): New.
4449 (get_num_from_index): Also pass in the graphite BB.
4450 (free_graphite_bb): Free GBB_INDEX_TO_NUM_MAP.
4451 (build_graphite_bb): Initialize GBB_INDEX_TO_NUM_MAP.
4452 (graphite_trans_bb_strip_mine): Call create_num_from_index.
4453 (is_interchange_valid): Return false when failing.
4454 * graphite.h (struct num_map): New.
4455 (struct graphite_bb): New field num_map.
4456 (GBB_LOOPS_MAPPING): Renamed GBB_INDEX_TO_NUM_MAP.
4458 2008-07-29 Tobias Grosser <grosser@fim.uni-passau.de>
4460 * graphite.c (dump_gbb_conditions): Print also conditions like
4461 "if (a)". Remove dublicated code and use print_generic_expr ().
4462 (stmt_simple_for_scop_p): Only allow conditions we can handle
4465 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4467 * graphite.h (struct scop): Removed new_ivs field.
4468 (SCOP_NEWIVS): Deleted.
4469 * graphite.c (new_scop, free_scop, clast_name_to_gcc,
4470 clast_to_gcc_expression, graphite_create_new_loop):
4471 Removed use of new_ivs.
4473 2008-07-25 Jan Sjodin <jan.sjodin@amd.com>
4475 * graphite.c (debug_oldivs, debug_loop_vec, create_loops_mapping,
4476 create_loops_mapping_num, debug_loop_mapping_1): New.
4477 (debug_loop_mapping): Call debug_loop_mapping_1.
4478 (get_loop_mapping_for_num,
4479 graphite_loops_mapping_add_child,
4480 graphite_loops_mapping_add_child_num,
4481 graphite_loops_mapping_insert_child,
4482 graphite_loops_mapping_parent,
4483 split_loop_mapped_depth_for_num,
4484 loop_mapped_depth_split_loop): New.
4485 (increment_loop_mapped_depths): Removed.
4486 (swap_loop_mapped_depth_for_num): Reimplemented.
4487 (new_scop): Call create_loops_mapping.
4488 (scop_record_loop): Call graphite_loops_mapping_insert_child.
4489 (translate_clast): Pass the old loop father in parameter, and pass
4490 it to get_old_iv_from_ssa_name.
4491 (remove_edges_around_useless_blocks, can_generate_code_stmt,
4492 can_generate_code, can_generate_for_scop): New.
4493 (graphite_trans_bb_block): Returns false when it fails to transform.
4494 * graphite.h (graphite_loop_node, graphite_loops_mapping): New.
4496 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4498 Reverted all the changes related to the streamization and
4500 These changes are now tracked in the streamization branch.
4502 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4503 Jan Sjodin <jan.sjodin@amd.com>
4505 * graphite.c (gbb_compare): Correctly constify.
4506 (gbb_can_be_ignored): Indent.
4507 (graphite_trans_scop_swap_1and2): Add legality check.
4510 2008-07-25 Sebastian Pop <sebastian.pop@amd.com>
4512 Remove fallouts from "Reverted the Condate changes".
4513 * tree.h: Remove unused decl.
4514 * testsuite/gcc.dg/tree-checker: Same.
4515 * timevar.def: Remove counter.
4517 2008-07-24 Sebastian Pop <sebastian.pop@amd.com>
4519 * Merge from mainline (135673:138072).
4521 Reverted the MIRO changes (from 2008-04-05) that are now
4522 tracked in the miro branch.
4523 * tree-bounds.c: Removed.
4524 * tree-bounds.h: Removed.
4526 Reverted the Condate changes (from 2006-07-04, 2007-03-20) that
4527 are now tracked in the condate branch.
4528 * tree-check.c: Removed.
4529 * tree-match.c: Removed.
4530 * condate.y: Removed.
4532 2008-07-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4534 * common.opt: New user flag -floop-block, -floop-strip-mine
4535 and -floop-interchange.
4536 * toplev.c (process_options): Enable -fgraphite pass if any one of the
4537 graphite loop optimization flags is turned on.
4538 * graphite.c (graphite_apply_transformations): Add flag_loop_block,
4539 flag_loop_strip_mine and flag_loop_interchange checks before
4541 * doc/invoke.texi: Remove -fgraphite and add -floop-block,
4542 -floop-strip-mine and -floop-interchange.
4543 * testsuite/gcc.dg/graphite/block-0.c: Add -floop-block and remove
4545 * testsuite/gcc.dg/graphite/scop-16.c: Ditto.
4546 * testsuite/gcc.dg/graphite/scop-17.c: Ditto.
4547 * testsuite/gcc.dg/graphite/scop-18.c: Ditto.
4549 2008-07-23 Jan Sjodin <jan.sjodin@amd.com>
4550 Sebastian Pop <sebastian.pop@amd.com>
4552 * cfgloopmanip.c (update_dominators_in_loop): Make it static.
4553 (create_empty_loop_on_edge): More fixes.
4554 * tree-phinodes.c (resize_phi_node): Extern.
4555 (unlink_phi_node, move_phi_node): New split from remove_phi_node.
4556 * cfghooks.c (update_dominator_information): New split from
4558 * tree-vectorizer.c (rename_variables_in_bb): Extern.
4559 * tree-dfa.c (collect_dfa_stats): Start walking the CFG on the
4560 successor of the function entry block.
4562 * graphite.c: Include pointer-set.h.
4563 (debug_loop_mapping, increment_loop_mapped_depths,
4564 get_loop_mapped_depth_for_num, get_loop_mapped_depth,
4565 set_loop_mapped_depth_for_num, set_loop_mapped_depth,
4566 swap_loop_mapped_depth_for_num, get_num_from_index,
4567 swap_loop_mapped_depth, loop_iv_stack_debug,
4568 loop_iv_stack_push, loop_iv_stack_pop, loop_iv_stack_get_iv,
4569 loop_iv_stack_get_iv_from_name, loop_iv_stack_debug,
4570 get_old_iv_from_ssa_name): New.
4571 (new_scop): Initialize SCOP_LOOPS_MAPPING.
4572 (free_scop): Free SCOP_LOOPS_MAPPING.
4573 (scop_record_loop): Record old ivs.
4574 (create_var_name): Removed.
4575 (initialize_cloog_names): Allocate double space in case strip mine
4576 applies to all loops once.
4577 (clast_name_to_gcc): Look up in the map ivstack passed in parameter.
4578 (clast_to_gcc_expression): Same. Implement more clast to gimple
4580 (graphite_create_new_loop): Pass in ivstack.
4581 (remove_all_edges): Pass in the construction_edge.
4582 (graphite_remove_iv): Removed.
4583 (graphite_rename_ivs, graphite_rename_ivs_stmt,
4584 remove_cond_exprs): Rewritten.
4585 (move_phi_nodes): New.
4586 (disconnect_virtual_phi_nodes, disconnect_cond_expr): Removed.
4587 (translate_clast): Pass in ivstack. Rewrite some cases.
4588 (set_cloog_options, debug_clast_stmt): New.
4589 (find_transform): Use set_cloog_options.
4590 (outermost_loop_layer): Removed.
4591 (get_construction_edge, collect_virtual_phis, find_vdef_for_var_in_bb,
4592 find_vdef_for_var_1, find_vdef_for_var, patch_phis_for_virtual_defs,
4593 mark_old_loops, remove_dead_loops): New.
4595 (graphite_trans_bb_move_loop): Call swap_loop_mapped_depth.
4596 (const_column_index, get_first_matching_sign_row_index,
4597 get_lower_bound_row, get_upper_bound_row, get_lower_bound,
4598 get_upper_bound): New.
4599 (graphite_trans_bb_strip_mine): Also update the iv map.
4601 * graphite.h (graphite_loops_mapping, GBB_LOOPS_MAPPING): New.
4602 (struct name_tree): Add a loop field.
4603 (struct scop): Add a graphite_loops_mapping field.
4604 (SCOP_LOOPS_MAPPING): New.
4605 (debug_clast_stmt): Declare.
4606 * lambda.h (find_induction_var_from_exit_cond): Declare.
4607 (lambda-code.c): (find_induction_var_from_exit_cond): Extern.
4608 * cfgloop.h (update_dominators_in_loop): Removed declaration.
4609 (create_empty_loop_on_edge): Updated.
4610 * tree-flow.h (remove_bb, resize_phi_node, move_phi_node,
4611 rename_variables_in_bb): Declare.
4612 * tree-cfg.c (remove_bb): Extern.
4614 * testsuite/gcc.dg/graphite/block-0.c: New.
4616 2008-07-21 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
4617 Sebastian Pop <sebastian.pop@amd.com>
4619 * graphite.c (strip_mine_profitable_p): New.
4620 (graphite_trans_bb_block): Disable strip mining if not profitable.
4622 * testsuite/gcc.dg/graphite/scop-18.c: New.
4623 * testsuite/gcc.dg/graphite/scop-17.c: Fixed.
4624 * testsuite/gcc.dg/graphite/scop-16.c: Fixed.
4626 2008-07-17 Harsha Jagasia <harsha.jagasia@amd.com>
4627 Jan Sjodin <jan.sjodin@amd.com>
4628 Sebastian Pop <sebastian.pop@amd.com>
4630 * graphite.c (is_interchange_valid): New.
4631 (graphite_trans_bb_block): Check loop nest of basic block for legality
4634 * graphite.h (gbb_inner_most_loop_index, outer_most_loop_1,
4635 outer_most_loop, gbb_outer_most_loop_index): New.
4637 * tree-loop-linear.c (perfect_loop_nest_depth): Remove static.
4638 * tree-flow.h (perfect_loop_nest_depth): Declare as extern.
4639 * testsuite/gcc.dg/graphite/scop-16.c: New.
4640 * testsuite/gcc.dg/graphite/scop-17.c: New.
4642 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4644 * graphite.c (scop_remove_ignoreable_gbbs): Also update bitmap.
4645 (graphite_trans_scop_block): Ignore SCoPs without bbs.
4647 2008-07-11 Tobias Grosser <grosser@fim.uni-passau.de>
4649 * graphite.c (new_scop): Initialize SCOP_EXIT.
4650 (scopdet_info): Add.
4651 (scopdet_bb_info): Rename from is_bb_addable. Cleanup, bugfixes.
4652 (build_scops_1): Cleanup, bugfixes.
4653 (build_scops): Cleanup.
4655 * testsuite/gcc.dg/graphite/scop-matmult.c: Remove duplicated code.
4656 * testsuite/gcc.dg/graphite/scop-15.c: Add SCoP numbers.
4658 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4660 * testsuite/gfortran.dg/graphite/scop-1.f: Update to reduced test case.
4662 * testsuite/gfortran.dg/graphite/graphite.exp: Use
4663 DEFAULT_GRAPHITE_FLAGS.
4665 * testsuite/gcc.dg/graphite/scop-15.c: Update to reduced test case.
4667 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4669 * graphite.c (scan_tree_for_params): Do not assert any more if
4670 MULT_EXPR parameter is negative.
4672 * testsuite/gfortran.dg/graphite/scop-1.f: New.
4674 * testsuite/gfortran.dg/graphite/graphite.exp: New.
4676 * testsuite/gcc.dg/graphite/scop-15.c: New.
4678 2008-07-10 Harsha Jagasia <harsha.jagasia@amd.com>
4680 * graphite.c (is_bb_addable): Fix segfault in spec gzip and reformat.
4682 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4684 * graphite.c (graphite_trans_bb_swap_loops): Rename from
4685 graphite_swap_loops.
4686 (graphite_trans_bb_move_loop): New.
4687 (graphite_trans_bb_strip_mine): Rename from graphite_strip_mine_loop.
4688 (graphite_trans_bb_block): New.
4689 (graphite_trans_loop_block): New.
4690 (graphite_trans_scop_swap_1and2): Rename from
4691 graphite_trans_swap_1and2.
4692 (graphite_trans_scop_strip): Rename from graphite_trans_strip.
4693 (graphite_trans_scop_block): New.
4694 (graphite_apply_transformations): Rename from
4695 graphite_transformations.
4697 * testsuite/gcc.dg/graphite/scop-matmult.c: New.
4699 2008-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
4701 * graphite.c (gbb_compare): New.
4702 (graphite_sort_gbbs): New.
4703 (gbb_can_be_ignored): New.
4704 (scop_remove_ignoreable_gbbs): New.
4705 (graphite_transformations): Cleanup and add
4706 scop_remove_ignoreable_gbbs.
4707 * lambda.h (lambda_vector_compare): New.
4709 2008-07-09 Tobias Grosser <grosser@fim.uni-passau.de>
4711 * graphite.c (print_graphite_bb): Correct printing of static schedule.
4712 (graphite_swap_loops): int -> unsigned
4713 (graphite_strip_mine_loop): int -> unsigned, Fix SCHEDULE
4714 (graphite_transformations): New.
4715 (graphite_transform_loops): Move to graphite_transformations.
4716 * graphite.h (gbb_nb_loops): Return unsigned.
4718 2008-07-04 Tobias Grosser <grosser@fim.uni-passau.de>
4720 * graphite.c (scan_tree_for_params): Fix insertion of parameters into
4721 the domain matrix. This makes scop-0.c work again.
4723 2008-06-20 Richard Guenther <rguenther@suse.de>
4725 * graphite.h: Adjust copyright to GPLv3.
4726 * graphite.c: Likewise.
4727 (stmt_simple_memref_for_scop_p): Split out from ...
4728 (stmt_simple_for_scop_p): ... here. Fix handling of calls
4730 (get_bb_type): Optimize.
4732 (is_bb_addable): Fix memleak, replace is_pred call with
4734 (build_scops): Use current_loops.
4735 (param_index): Fix memleak.
4737 2008-06-20 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4739 * graphite.c: Fix formatting.
4741 2008-06-19 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4743 * graphite.c (new_scop): Memory allocation for SCOP_{NEWIVS, OLDIVS}.
4744 (free_scop): Memory deallocation for SCOP_NEWIVS, SCOP_OLDIVS.
4745 (create_var_name, save_var_name): Newly defined functions.
4746 (initialize_cloog_names): Part of the code factored out to
4748 (clast_to_gcc_expression): Now handles the case of clast_red_sum
4749 in clast_reduction statement.
4750 (graphite_create_new_loop): Now takes a new parameter
4752 (translate_clast): Now also takes the context_loop and bb_exit
4753 parameters. Rewritten the code so that it creates a gimple code
4754 inside the given context.
4755 (outermost_loop_layer, graphite_remove_iv, graphite_rename_ivs,
4756 remove_cond_expr, disconnect_cond_expr,
4757 disconnect_virtual_phi_nodes): Newly defined functions.
4758 * graphite.h (struct scop): added old_ivs vector.
4759 SCOP_OLDIVS: New macro.
4761 2008-06-19 Sebastian Pop <sebastian.pop@amd.com>
4763 * cfgloopmanip.c: Add missing function comments, fix formatting.
4765 2008-06-18 Konrad Trifunovic <konrad.trifunovic@inria.fr>
4767 * cfgloopmanip.c (update_dominators_in_loop): Defined.
4768 (create_empty_loop_on_edge): Defined.
4769 * tree-parloops.c (canonicalize_loop_ivs): Returns tree
4771 * cfgloop.h (create_empty_loop_on_edge): Declared as extern.
4772 (update_dominators_in_loop): Declared as extern
4773 * tree-flow.h (canonicalize_loop_ivs): Declared as extern.
4775 2008-06-16 Tobias Grosser <grosser@fim.uni-passau.de>
4777 * graphite.c (print_graphite_bb): Allow changing number of loops
4779 (initialize_cloog_names): Allow changing number of loops.
4780 (build_cloog_prog): Simplify.
4781 (find_transform): Enable cloog option --strides.
4782 (graphite_swap_loops): New.
4783 (graphite_strip_mine_loop): New.
4784 (graphite_trans_swap_1and2): New.
4785 (graphite_trans_strip): New.
4786 (graphite_transform_loops): Add graphite_trans_strip.
4787 * graphite.h (scop_max_loop_depth): New.
4789 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4791 * graphite.c (build_scop_iteration_domain): Remove forgotten
4792 line. (Fixes compile)
4794 2008-06-15 Tobias Grosser <grosser@fim.uni-passau.de>
4796 * graphite.c (print_graphite_bb): Add output of GBB_LOOPS.
4797 (build_graphite_bb): Add GBB_LOOPS and GBB_DOMAIN and reorder.
4798 (build_bb_loops): New.
4799 (graphite_transform_loops): Add build_bb_loops.
4800 (schedule_to_scattering): Use gbb_nb_loops to support changing loop
4802 * graphite.h (graphite_bb): Add loops.
4803 (gbb_nb_loops): New.
4804 (gbb_loop_at_index): New.
4805 (gbb_loop_index): New.
4806 (nb_params_in_scop): Renamed to scop_nb_params. Updated all functions
4807 using nb_params_in_scop.
4809 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4811 * graphite.c (print_graphite_bb): Adapt to minimized schedule.
4812 (build_scop_canonical_schedules): Build minimized schedule.
4813 (schedule_to_scattering): Adapt to minimized schedule.
4814 * graphite.h (graphite_bb): Add/Update descriptions.
4816 2008-06-14 Adrien Eliche <aeliche@isty.uvsq.fr>
4817 Tobias Grosser <grosser@fim.uni-passau.de>
4819 * graphite.c (print_graphite_bb): Add condition printing.
4821 (dump_gbb_conditions): New.
4822 (build_scop_conditions_1): New.
4823 (build_scop_conditions): New.
4824 * graphite.h (graphite_bb): Add conditions.
4826 2008-06-14 Tobias Grosser <grosser@fim.uni-passau.de>
4828 * graphite.c (print_graphite_bb):
4829 (free_graphite_bb): New.
4830 (free_scop): Free bbs.
4831 (get_bb_type): Free doms.
4832 (build_scop_context): Free context matrix.
4833 (build_loop_iteration_domains): Remove unused code.
4834 (build_cloog_prog): Free scattering function and blocklist.
4835 (find_transform): Free options.
4837 2008-06-13 Tobias Grosser <grosser@fim.uni-passau.de>
4839 * graphite.c (loop_body_to_cloog_stmts): Rename to add_bb_domains.
4840 Remove unnecessery cloog data structures. Make a copy of the domain
4841 (setup_cloog_loop): Rename to build_loop_iteration_domains. Remove
4842 unnecessary cloog data structures. Fix memory leaks. Remove insert
4843 into SCOP_LOOP2CLOOG_LOOP as the inserted CloogLoops will never be
4845 (build_scop_iteration_domain): Remove unnecessary cloog
4846 data structures. Fix memory leaks.
4847 (graphite_transform_loops): Disable build_scop_dynamic_schedules as it
4848 uses SCOP_LOOP2CLOOG_LOOP, that is at the moment not working.
4850 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4852 * graphite.c (find_scop_params): Remove initialize_cloog_names.
4854 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4856 * graphite.c (end_scop): Style fix.
4857 (schedule_to_scattering): Style and comment fix.
4859 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4860 * graphite.c (print_graphite_bb): Fix definiton of
4861 schedule_to_scattering.
4862 (initialize_cloog_names): Change nb_scattdims to max loop
4864 (schedule_to_scattering): Take parameter for number of scattering
4866 (build_cloog_prog): Only build as much scattering dimensions as
4869 2008-06-12 Tobias Grosser <grosser@fim.uni-passau.de>
4871 * graphite.c (end_scop): Disable bb splitting. Fixes SIGSEGV
4872 in polyhedron/aermod.f90.
4874 2008-06-11 Tobias Grosser <grosser@fim.uni-passau.de>
4875 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4876 Harsha Jagasia <harsha.jagasia@amd.com>
4878 * graphite.c (is_bb_addable): Fix segfault.
4880 2008-06-10 Tobias Grosser <grosser@fim.uni-passau.de>
4882 * graphite.c (is_bb_addable): Fix memory leak, handling of loops
4883 with multiple exits and conditional handling in edge cases.
4884 (is_loop_exit): Fix memory leak. (Forgotten in last commit)
4886 * testsuite/gcc.dg/graphite/scop-14.c: New.
4888 2008-06-06 Tobias Grosser <grosser@fim.uni-passau.de>
4889 Adrien Eliche <aeliche@isty.uvsq.fr>
4891 * graphite.c (is_bb_addable): Add more comments and enhance
4892 readablity of the source code. Fix memory leak.
4893 (is_loop_exit): Fix memory leak.
4895 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4897 * graphite.c (first_loop_in_scop): Deleted.
4898 (setup_cloog_loop): Only walk the loop chain for inner loops.
4899 (build_scop_iteration_domain): Execute setup_cloog_loop for
4900 all loops in the first layer.
4902 2008-06-05 Tobias Grosser <grosser@fim.uni-passau.de>
4904 * graphite.c (scan_tree_for_params): Change the way params are
4905 added to be indepenent of the number of loops.
4906 (setup_cloog_loop): Revert to short matrix format. Fix parameter
4908 (build_cloog_prog): Revert to short matrix format.
4910 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4911 Dwarak Rajagopal <dwarak.rajagopal@amd.com>
4913 * tree-loop-fusion.c (fuse_loops): Fix uninitialized variable
4916 2008-06-05 Sebastian Pop <sebastian.pop@amd.com>
4918 * graphite.c (nb_data_refs_in_scop): New.
4919 (graphite_transform_loops): Print more stats: number of
4920 loops, basic blocks and data references per scop.
4922 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4923 Jan Sjodin <jan.sjodin@amd.com>
4925 * graphite.c (loop_affine_expr, idx_record_params,
4926 find_scop_parameters, setup_cloog_loop): Use instantiate_scev
4927 instead of instantiate_parameters.
4929 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4931 * graphite.c (schedule_to_scattering): Fix scattering dimensions,
4932 add support for parameters, add STATIC_SCHEDULE at the right places,
4935 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4937 * graphite.c (build_scop_loop_nests): Only add the loops, that
4938 are contained completely in the SCoP.
4939 (build_cloog_prog): Disable scattering, until schedule_to_scattering
4940 and the domains are fixed.
4941 (build_scop_canonical_schedules): Add support for bbs not contained
4944 2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
4946 * graphite.h (scop_contains_loop): Update comments to match
4947 the actual behavior.
4948 (scop_contains_loop): New.
4949 * graphite.c (schedule_to_scattering): Use scop_contains_loop.
4951 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4953 * graphite.c (get_bb_type): On function body, i.e. loop_0,
4954 don't mark blocks as GBB_LOOP_SING_EXIT_HEADER, mark them
4957 2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
4958 Tobias Grosser <grosser@fim.uni-passau.de>
4960 * graphite.c (graphite_transform_loops): Early return when
4961 there are no loops in the function.
4963 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4964 Jan Sjodin <jan.sjodin@amd.com>
4966 * graphite.c (scan_tree_for_params, setup_cloog_loop): Compute the
4967 offset of the last loop.
4968 (setup_cloog_loop): Copy the entire outer constraint matrix.
4970 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4971 Jan Sjodin <jan.sjodin@amd.com>
4973 * graphite.c (stmt_in_scop_p, function_parameter_p,
4974 invariant_in_scop_p): Removed.
4975 (scan_tree_for_params): Can be used with no constraint
4976 matrix for gathering parameters.
4977 (idx_record_params): Don't use idx_record_param, instead use
4978 scan_tree_for_params.
4979 (find_scop_parameters): Same.
4980 (setup_cloog_loop, build_scop_iteration_domain, build_cloog_prog):
4981 Fix the size of loop domains.
4982 (schedule_to_scattering): Exit when the outer loop is not in scop.
4983 (find_transform): Enable build_cloog_prog.
4985 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4986 Jan Sjodin <jan.sjodin@amd.com>
4988 * graphite.c (schedule_to_scattering): Make scattering domains
4989 uniformly of the same size, as required by CLooG 0.14.0 and before.
4991 2008-05-31 Sebastian Pop <sebastian.pop@amd.com>
4992 Jan Sjodin <jan.sjodin@amd.com>
4994 * graphite.c (schedule_to_scattering): Rewrite, correct the
4995 translation of the scheduling function to scattering.
4996 (build_cloog_prog): Call schedule_to_scattering only once.
4997 * graphite.h (scop_loop_index): Do not fail for loops not
4998 in the scop: return -1.
5000 2008-05-30 Tobias Grosser <grosser@fim.uni-passau.de>
5002 * graphite.c (build_graphite_bb): Initialize GBB_DOMAIN.
5003 (loop_body_to_cloog_stmts): Export GBB_DOMAIN.
5004 (setup_cloog_loop): Export GBB_DOMAIN.
5005 (build_cloog_prog): New. Create new CLOOG_PROG, which should be
5006 able to rebuild the original control flow.
5007 * graphite.h (graphite_bb): Add domain field and access macro.
5010 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5012 * graphite.c (debug_gbb): New.
5013 (print_scop, build_graphite_bb): Use SCOP_BBS.
5014 (build_scop_bbs): Reimplemented.
5015 (dfs_bb_in_scop_p): Removed.
5016 (build_scop_loop_nests): Reorder loops inserted in
5017 SCOP_LOOP_NEST: outer loops should come first.
5018 (build_scop_canonical_schedules): Reinitialize at zero
5019 the components of the SCOP_STATIC_SCHEDULE for the loops
5020 that have already been parsed.
5022 * graphite.h (debug_gbb): Declared.
5024 2008-05-30 Sebastian Pop <sebastian.pop@amd.com>
5025 Jan Sjodin <jan.sjodin@amd.com>
5027 * graphite.c (create_empty_loop): Renamed graphite_create_new_loop.
5028 (graphite_loop_to_gcc_loop): Removed.
5029 (remove_all_edges): New.
5030 (graphite_stmt_to_gcc_stmt): Renamed translate_clast.
5031 (gloog): Remove useless code.
5033 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5035 * graphite.c (get_bb_type): Reworked. We distinguish between
5036 loops with one or multiple exits.
5037 (is_loop_exit): New.
5039 (is_bb_addable): Rework condition handling, now support for case
5040 case statements and loops with multiple exits.
5042 * testsuite/gcc.dg/graphite/scop-11.c: New.
5043 * testsuite/gcc.dg/graphite/scop-12.c: New.
5044 * testsuite/gcc.dg/graphite/scop-13.c: New.
5046 2008-05-29 Tobias Grosser <grosser@fim.uni-passau.de>
5048 * graphite.c (dot_all_scops_1): Fix some colors. Reuse colors, if
5049 we have too many colors.
5051 2008-05-22 Sandeep Maram <smaram_b04@iiita.ac.in>
5053 * doc/invoke.texi (-ftree-loop-fusion): Document.
5054 * tree-pass.h (pass_loop_fusion): Declared.
5055 * tree-loop-fusion.c: New.
5056 * timevar.def (TV_TREE_LOOP_FUSION): Declared.
5057 * tree-data-ref.c (find_data_references_in_loop): Make extern.
5058 * tree-data-ref.h (find_data_references_in_loop): Declared.
5059 * common.opt (ftree-loop-fusion): Declared.
5060 * Makefile.in (tree-loop-fusion.o): Added rule and to OBJS-common.
5062 2008-05-21 Sebastian Pop <sebastian.pop@amd.com>
5064 * graphite.c (build_access_matrix): Fix typo from the merge.
5066 2008-05-20 Sebastian Pop <sebastian.pop@amd.com>
5068 * Merge from mainline (130800:135673).
5070 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5072 * graphite.c (end_scop): The exit of the scop is not part of the scop.
5073 Update dominators after splitting.
5075 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5077 * graphite.c (is_bb_addable): Return the harmful statement.
5078 Factor up some code.
5079 (end_scop): New. Splits end of scope bbs on a harmful statement.
5080 (build_scops_1): Call end_scop.
5082 2008-05-07 Sebastian Pop <sebastian.pop@amd.com>
5084 * graphite.c: (succs_at_same_depth, end_scop, all_preds_visited_p,
5085 all_succs_visited_p, start_new_scop_for_each_succ, start_new_scop,
5086 add_dominators_to_open_scops, stop_last_open_scop, scop_end_loop,
5087 build_scops_1): Removed.
5088 (build_scops_2): Renamed build_scops_1.
5090 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5092 * graphite.c: Fix formatting.
5094 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5096 * graphite.c (get_bb_type): New.
5098 (build_scops_2): New.
5099 (is_bb_addable): New.
5100 (build_scops): Switch the scop detection.
5101 (build_scop_bbs): Add entry bb to scop.
5102 * graphite.h (struct scop): Update comment.
5104 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5106 * graphite.c (dot_all_scops_1): Fix some incorrect colors and add
5109 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5111 * testsuite/gcc.dg/graphite/scop-1.c: Update.
5112 * testsuite/gcc.dg/graphite/scop-2.c: Update.
5113 * testsuite/gcc.dg/graphite/scop-4.c: Update.
5114 * testsuite/gcc.dg/graphite/scop-5.c: Add.
5115 * testsuite/gcc.dg/graphite/scop-6.c: Add.
5117 2008-05-06 Sebastian Pop <sebastian.pop@amd.com>
5119 * testsuite/gcc.dg/graphite/scop-0.c: Add.
5120 * testsuite/gcc.dg/graphite/scop-7.c: Add.
5121 * testsuite/gcc.dg/graphite/scop-8.c: Add.
5122 * testsuite/gcc.dg/graphite/scop-9.c: Add.
5123 * testsuite/gcc.dg/graphite/scop-10.c: Add.
5125 2008-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
5127 * graphite.c (scop_affine_expr): Renamed to loop_affine_expr.
5128 Check affine expressions depending on the outermost loop
5130 (stmt_simple_for_scop_p): Same.
5131 (harmfule_stmt_in_scop): Same.
5133 2008-04-28 Tobias Grosser <grosser@fim.uni-passau.de>
5135 * graphite.c (dot_all_scops): Remove incorrect difficult bb coloring,
5136 mark entry and exit, that are not part of the SCoP and update HTML
5139 2008-04-25 Sebastian Pop <sebastian.pop@amd.com>
5141 * graphite.c (basic_block_simple_for_scop_p): Renamed
5143 (save_scop, preds_at_same_depth, test_for_scop_bound): Removed.
5144 (add_dominators_to_open_scops, build_scops_1): Reimplemented.
5145 (all_preds_visited_p, all_succs_visited_p,
5146 start_new_scop_for_each_succ, start_new_scop, stop_last_open_scop,
5147 scop_end_loop): New.
5148 (build_scops): Do not use dfs_enumerate_from.
5150 * testsuite/gcc.dg/graphite/scop-{1,2,4}.c: Updated.
5152 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5154 * graphite.c: Add comments to functions that are missing a
5156 (graphite_create_iv): Removed. Merged in graphite_loop_to_gcc_loop.
5158 2008-04-23 Sebastian Pop <sebastian.pop@amd.com>
5160 * graphite.c (nb_params_in_scop): Moved...
5161 (graphite_bb_from_bb, loop_body_to_cloog_stmts): New.
5162 (setup_cloog_loop): Call loop_body_to_cloog_stmts.
5163 (clast_to_gcc_expression): Reduce column size to less than 80.
5164 (graphite_create_iv): Return the new name of the IV.
5165 (find_transform): Set options->esp and options->cpp.
5166 (gloog): Comment out the invalidation of the old loop code.
5167 (initialize_dependence_polyhedron): Replace scop_nb_params with
5170 * graphite.h (nb_params_in_scop): ... here.
5171 (scop_nb_params): Removed.
5172 (loop_domain_dim): Return something even when the loop was not
5173 found in the hash table: avoid ICEing on all the graphite.exp
5176 2008-04-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5178 * tree-chrec.c (for_each_scev_op): SCEV can have 3 operands.
5180 * graphite.c (build_scop_dynamic_schedules): Schedule is built
5181 according to nesting level.
5182 (find_scop_parameters): Call instantiate_parameters.
5183 (scan_tree_for_params): Extend it to handle general affine bounds.
5184 Inner loop bound can depend on outer loop induction variable.
5185 (setup_cloog_loop): tmp variable is allocated on stack. Call
5186 instantiate_parameters with respect to outermost_loop_in_scop.
5187 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): moved to
5189 (create_empty_loop): Function loopify should be given edge
5190 probability, instead of edge frequency. Dominance relation from
5191 switch_bb to loop_header.
5192 (clast_to_gcc_expression): Added handling of clast_reduction node.
5193 (gloog): New functionality for removing old loop.
5194 (test_dependence): Factored out from build_rdg_all_levels.
5195 (build_rdg_all_levels): Dependence testing factored out to
5196 test_dependence function.
5198 * graphite.h (struct graphite_bb): Extended with dynamic_schedule.
5199 (loop_domain_dim, ref_nb_loops, loop_iteration_vector_dim): Moved
5202 2008-04-07 Sebastian Pop <sebastian.pop@amd.com>
5204 * graphite.c (free_scop, param_index, initialize_cloog_names,
5205 nb_params_in_scop): Use name_tree map instead of just a tree
5206 for keeping track of the variable name associated to that tree.
5207 (create_empty_loop, gmp_cst_to_tree, clast_name_to_gcc,
5208 clast_to_gcc_expression, graphite_create_iv,
5209 graphite_loop_to_gcc_loop, graphite_cond_to_gcc_cond,
5210 graphite_stmt_to_gcc_stmt): New.
5211 (gloog): Call these.
5212 * graphite.h (struct name_tree): New.
5213 (struct scop): Use name_tree instead of tree for params.
5214 Store a vector of name_tree for new_ivs.
5216 (scop_nb_params): Use name_tree instead of tree.
5218 2008-04-05 Alexander Lamaison <awl03@doc.ic.ac.uk>
5219 Sebastian Pop <sebastian.pop@amd.com>
5221 * tree-bounds.c: New.
5222 * tree-bounds.h: New.
5223 * tree-pass.h: Declare pass_bounds_early and pass_bounds_late.
5224 * passes.c: Schedule pass_bounds_early, pass_bounds_late.
5225 * builtins.c (expand_builtin_alloca): Add flag_bounds as for
5229 * c-cppbuiltin.c: Same.
5233 * tree-outof-ssa.c: Same.
5235 * Makefile.in: Same.
5237 2008-03-15 Antoniu Pop <antoniu.pop@gmail.com>
5238 Sebastian Pop <sebastian.pop@amd.com>
5240 * tree-loop-distribution.c (remaining_stmts,
5241 upstream_mem_writes): Removed static variables.
5242 (copy_loop_before, create_bb_after_loop,
5243 mark_nodes_having_upstream_mem_writes, free_rdg_components,
5244 rdg_build_components, rdg_build_partitions,
5245 dump_rdg_partitions): Extern.
5246 (generate_loops_for_partition, generate_code_for_partition): Do not
5248 (already_processed_vertex_p, predecessor_has_mem_write,
5249 mark_nodes_having_upstream_mem_writes, has_upstream_mem_writes,
5250 rdg_flag_all_uses, rdg_flag_uses, rdg_flag_vertex_and_dependent,
5251 rdg_flag_loop_exits, rdg_flag_similar_memory_accesses,
5252 build_rdg_partition_for_component, rdg_build_partitions, ldist_gen):
5253 Pass remaining_stmts and upstream_mem_writes as parameters.
5254 (rdg_component): Moved...
5255 (build_rdg_partition_for_component): Do not aggregate components when
5256 flag_streamize_loops is set.
5257 (gen_sequential_loops): New.
5258 (ldist_gen): Call gen_sequential_loops.
5260 * tree-pass.h (pass_loop_streamization): Declared.
5262 * omp-low.c (expand_omp_sections): Call add_bb_to_loop on created
5263 basic blocks when loops structures exist.
5265 * builtin-types.def (BT_FN_VOID_PTR_PTR_INT): New.
5267 * tree-ssa-loop-ivopts.c (expr_invariant_in_region_p): New.
5269 * tree-parloops.c (take_address_of, eliminate_local_variables_1,
5270 eliminate_local_variables_stmt, eliminate_local_variables,
5271 separate_decls_in_loop_name, separate_decls_in_loop_stmt,
5272 separate_decls_in_loop, gen_parallel_loop): Make them work on a region
5273 of code delimited by two edges in the CFG.
5274 (separate_decls_in_loop_name): Renamed separate_decls_in_region_name.
5275 (separate_decls_in_loop_stmt): Renamed separate_decls_in_region_stmt.
5276 (separate_decls_in_loop): Renamed separate_decls_in_region. Isolate
5277 the case of parallelisation of reductions.
5278 (create_loop_fn): Extern.
5279 (create_omp_parallel_region): New.
5281 * tree-data-ref.c (dump_data_dependence_relation): Don't call
5282 dump_data_reference for printing dra and drb.
5283 (create_rdg_edge_for_ddr, create_rdg_edges_for_scalar): Initialise
5285 (build_rdg): Don't call free_dependence_relations for the moment, as
5286 we attach dependence relations on each edge of the RDG.
5289 * tree-data-ref.h (rdg_component): ...here.
5290 (struct rdg_edge): New field ddr_p relation.
5291 (RDGE_RELATION): New.
5292 (create_bb_after_loop, copy_loop_before,
5293 mark_nodes_having_upstream_mem_writes, rdg_build_components,
5294 rdg_build_partitions, dump_rdg_partitions,
5295 free_rdg_components): Declared.
5297 * omp-builtins.def (BUILT_IN_GOMP_STREAM_ALIGN_PUSH,
5298 BUILT_IN_GOMP_STREAM_ALIGN_POP): New.
5300 * tree-loop-streamization.c: New.
5302 * tree-flow.h (gather_blocks_in_sese_region, create_loop_fn,
5303 create_omp_parallel_region, expr_invariant_in_region_p): Declared.
5305 * Makefile.in (tree-loop-streamization.o): Added to OBJS-common.
5307 * tree-cfg.c (gather_blocks_in_sese_region): Extern.
5309 * passes.c: Schedule pass_loop_streamization.
5311 2008-03-08 Tobias Grosser <grosser@fmi.uni-passau.de>
5313 * graphite.c (dot_all_scops_1): Fix formatting for difficult bbs and
5316 2008-03-07 Tobias Grosser <grosser@fim.uni-passau.de>
5318 * graphite.c (dot_all_scops): Update formatting.
5319 Bbs can now be part of more than one SCoP.
5321 2008-03-04 Sebastian Pop <sebastian.pop@amd.com>
5323 * graphite.c (new_loop_to_cloog_loop_str, setup_cloog_loop): Fix
5325 (loop_domain_dim): Check for unregistered toplev SCOP loop.
5326 * graphite.h (loop_to_cloog_loop): New.
5328 2008-03-04 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5330 * graphite.c (loop_domain_dim, ref_nb_loops,
5331 loop_iteration_vector_dim): New.
5332 (build_access_matrix_with_af, build_access_matrix,
5333 initialize_dependence_polyhedron): Fixed for new matrix layout.
5334 No longer assume that all iteration domains are of the same
5337 2008-03-02 Sebastian Pop <sebastian.pop@amd.com>
5339 * tree-scalar-evolution.c (instantiate_parameters_1): An SSA_NAME
5340 defined in a loop at depth 0 is invariant.
5341 * tree-chrec.c (evolution_function_is_invariant_rec_p): Ditto.
5342 * tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Should never
5343 be called at loop depth 0.
5345 * graphite.c (basic_block_simple_for_scop_p): Take the scop as
5347 (dot_all_scops_1): Update use of basic_block_simple_for_scop_p.
5348 (down_open_scop): Removed.
5349 (loop_in_scop_p): Redefined.
5350 (scop_affine_expr): New argument: scop.
5351 (stmt_simple_for_scop_p): New argument: scop. RETURN_EXPR is not
5352 a harmful statement ending a scop.
5353 (basic_block_simple_for_scop_p): New argument: scop.
5354 (get_loop_start): Removed.
5355 (new_scop): Initialize SCOP_LOOPS.
5356 (free_scop): Free SCOP_LOOPS.
5357 (succs_at_same_depth, preds_at_same_depth): New.
5358 (end_scop): Test the validity of a scop.
5359 (add_dominators_to_open_scops): New.
5360 (test_for_scop_bound): Call add_dominators_to_open_scops.
5361 Add cases for opening and closing multiple scops.
5362 (build_scops, build_scop_bbs): Iterate over basic blocks in
5364 (build_graphite_bb): Pass scop directly.
5365 (dfs_bb_in_scop_p): New.
5366 (scop_record_loop): Use SCOP_LOOPS for not recording the same loop
5368 (nb_loops_around_gb): Use loop_in_scop_p.
5369 (schedule_to_scattering): Disabled for the moment the code computing
5370 the "textual order for outer loop".
5372 * graphite.h (struct scop): New field loops.
5374 (scop_loop_index): Test that the given loop belongs to SCOP_LOOPS.
5376 * testsuite/gcc.dg/graphite/scop-{1,...,7}.c: Updated.
5378 2008-02-27 Antoniu Pop <antoniu.pop@gmail.com>
5379 Sebastian Pop <sebastian.pop@amd.com>
5381 * builtin-types.def (BT_FN_PTR_SIZE_UINT, BT_FN_BOOL_PTR): New.
5382 * common.opt (fstreamize-loops): New.
5383 * omp-builtins.def (BUILT_IN_GOMP_STREAM_CREATE,
5384 BUILT_IN_GOMP_STREAM_PUSH, BUILT_IN_GOMP_STREAM_HEAD,
5385 BUILT_IN_GOMP_STREAM_POP, BUILT_IN_GOMP_STREAM_EOS_P,
5386 BUILT_IN_GOMP_STREAM_SET_EOS, BUILT_IN_GOMP_STREAM_DESTROY): New.
5388 2008-02-22 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5390 * tree-data-ref.c (build_empty_rdg): New.
5391 (build_rdg): Use it.
5392 * tree-data-ref.h (build_empty_rdg): Declared.
5393 * graphite.c (free_scop): Free SCOP_LOOP2CLOOG_LOOP.
5394 (find_vertex_for_stmt): Removed.
5395 (build_rdg_all_levels): Use build_empty_rdg and rdg_vertex_for_stmt.
5397 2008-02-21 Sebastian Pop <sebastian.pop@amd.com>
5399 * tree-loop-distribution.c (generate_builtin): After cancelling the
5400 loop tree, also delete basic blocks.
5401 (rdg_flag_uses): Stop recursion when a vertex has already been
5404 2008-02-15 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5406 * graphite.c (build_scop_alpha): Removed.
5407 (graphite_transform_loops): Add a dummy call to build_all_rdg_levels
5408 and dump_dependence_graph to avoid compiler warnings.
5410 2008-02-14 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5412 * tree-data-ref.c (dr_may_alias_p, create_rdg_vertices): Extern.
5413 * tree-data-ref.h (dr_may_alias_p, create_rdg_vertices): Declared.
5414 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
5415 eq_loop_to_cloog_loop, del_loop_to_cloog_loop): New.
5416 (new_scop, setup_cloog_loop): Initialize SCOP_LOOP2CLOOG_LOOP.
5417 (initialize_dependence_polyhedron, find_vertex_for_stmt,
5418 initialize_data_dependence_polyhedron, is_empty_polyhedron,
5419 statement_precedes_p, build_rdg_all_levels, build_scop_alpha,
5420 dump_dependence_graph): New.
5421 * graphite.h (struct graphite_bb): New field compressed_alpha_matrix.
5423 (struct scop): New field loop2cloog_loop.
5424 (SCOP_LOOP2CLOOG_LOOP, struct data_dependence_polyhedron,
5425 RDGE_DDP, ddp_p, struct loop_to_cloog_loop_str): New.
5427 2008-02-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5429 * graphite.c (build_graphite_bb): Fix initialization
5430 of the graphite basic block.
5432 2008-02-05 Sebastian Pop <sebastian.pop@amd.com>
5434 * graphite.c (scan_tree_for_params): Rewrite for the new layout of
5435 loop domain matrix. Pass in the number of loops contained in the
5437 (nb_loops_around_gb): Moved before setup_cloog_loop that uses it.
5438 (setup_cloog_loop): Rewrite for the new layout of loop domain matrix:
5439 loops that are not surrounding the current loop are not represented
5440 in the domain constraint matrix.
5441 (build_scop_iteration_domain): Initial domain constraint matrix
5442 contains only the eq/ineq, cst, and scop parameters columns.
5444 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5446 * graphite.c (schedule_to_scattering, nb_loops_around_gb): New.
5447 (print_graphite_bb): Print scattering.
5449 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5451 * graphite.c (initialize_cloog_names): Initialize names of
5452 scattering variables.
5454 2009-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5456 * graphite.c (dot_all_scops_1): Disable debug output while
5459 2008-01-29 Tobias Grosser <grosser@fim.uni-passau.de>
5461 * graphite.c (find_transform): Change cloog output language to C.
5463 2008-01-27 Sebastian Pop <sebastian.pop@amd.com>
5465 * tree-loop-distribution.c (generate_memset_zero,
5466 generate_builtin, generate_code_for_partition,
5467 rdg_flag_all_uses): New.
5468 (rdg_flag_uses): Gather in the same partition the statements defining
5469 the VUSES of the current statement.
5470 (rdg_flag_similar_stores): Renamed rdg_flag_similar_memory_accesses.
5471 Gather in the same partition not only the stores to the same memory
5472 access, but also the reads.
5473 (ldist_generate_loops): Renamed ldist_gen.
5475 2008-01-24 Sebastian Pop <sebastian.pop@amd.com>
5476 Tobias Grosser <grosser@fmi.uni-passau.de>
5478 * graphite.c (setup_cloog_loop): Chain all cloog loops with the
5479 next pointer, don't use the inner pointer.
5481 2008-01-20 Tobias Grosser <grosser@fmi.uni-passau.de>
5483 * graphite.c (dot_all_scops, dot_all_scops_1): New.
5484 (find_transform): Call dot_all_1.
5485 * graphite.h (dot_all_scops): Declared.
5487 2007-12-14 Sebastian Pop <sebastian.pop@amd.com>
5489 * tree-loop-distribution.c: Fix apsi.f ICE.
5490 (create_bb_after_loop): New.
5491 (generate_loops_for_partition): Use it.
5492 * testsuite/gfortran.dg/ldist-1.f90: New.
5494 * tree-data-ref.c (dot_rdg): Use /tmp/rdg.dot for dotty format.
5495 * graphite.c (dot_scop): Use /tmp/scop.dot for dotty format.
5497 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5499 * graphite.c (find_transform): Dump cloog program sent to cloog.
5501 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5503 * graphite.c (initialize_cloog_names): Initialize cloog
5506 2007-12-13 Tobias Grosser <grosser@fmi.uni-passau.de>
5508 * graphite.c (build_scop_context): Fix typo, for the matrix
5509 format: insert '0 >= 0' instead of '-1 >= 0'.
5511 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5513 * Fix merge problems.
5515 2007-12-13 Sebastian Pop <sebastian.pop@amd.com>
5517 * graphite.c (setup_cloog_loop): Fix typo.
5519 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5521 * doc/invoke.texi (-ftree-loop-distribution): Documented.
5522 * tree-loop-distribution.c: Reimplemented.
5523 * tree-pass.h (pass_loop_distribution): New.
5524 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Use
5526 * graphds.h (struct graph): New field indexes.
5527 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5529 * tree-vect-analyze.c: Remove declaration of static functions when not
5531 * tree-vectorizer.c: Same.
5532 (rename_variables_in_loop): Now extern.
5533 (slpeel_tree_duplicate_loop_to_edge_cfg): Renamed
5534 tree_duplicate_loop_to_edge_cfg. Reset PENDING_STMT for edges after
5535 calling redirect_edge_and_branch_force.
5537 * tree-vectorizer.h (tree_duplicate_loop_on_edge): Declared.
5539 * tree-data-ref.c: Don't include tree-chrec.h.
5540 (debug_data_dependence_relations): New.
5541 (dump_data_dependence_relation): Call dump_data_reference on data refs
5543 (same_access_functions): Moved...
5544 (find_vertex_for_stmt): Renamed rdg_vertex_for_stmt.
5545 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5546 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg_1, dot_rdg,
5547 struct rdg_vertex_info, ): New.
5548 (create_rdg_edge_for_ddr): Compute the dependence level before looking
5550 (create_rdg_vertices): Initialize the htab of graph->indexes.
5551 Initialize RDG_MEM_WRITE_STMT and RDG_MEM_READS_STMT.
5552 (stmts_from_loop): Don't save LABEL_EXPR.
5553 (hash_stmt_vertex_info, eq_stmt_vertex_info,
5554 hash_stmt_vertex_del): New.
5555 (build_rdg): Initialize rdg->indexes.
5556 (free_rdg, stores_from_loop, ref_base_address,
5557 rdg_defs_used_in_other_loops_p, have_similar_memory_accesses,
5558 have_similar_memory_accesses_1, ref_base_address_1,
5559 remove_similar_memory_refs): New.
5561 * tree-data-ref.h: Include tree-chrec.h.
5562 (debug_data_dependence_relations): Declared.
5563 (same_access_functions): ...here. Now static inline.
5564 (ddr_is_anti_dependent, ddrs_have_anti_deps,
5565 ddr_dependence_level): New.
5566 (struct rdg_vertex): New fields has_mem_write, has_mem_reads.
5567 (RDGV_HAS_MEM_WRITE, RDGV_HAS_MEM_READS, RDG_STMT, RDG_MEM_WRITE_STMT,
5568 RDG_MEM_READS_STMT): New.
5569 (dump_rdg_vertex, debug_rdg_vertex, dump_rdg_component,
5570 debug_rdg_component, dump_rdg, debug_rdg, dot_rdg,
5571 rdg_vertex_for_stmt): Declared.
5572 (struct rdg_edge): New field level.
5573 (RDGE_LEVEL, free_rdg): New.
5574 (stores_from_loop, remove_similar_memory_refs,
5575 rdg_defs_used_in_other_loops_p,
5576 have_similar_memory_accesses): Declared.
5577 (rdg_has_similar_memory_accesses): New.
5579 * lambda.h (dependence_level): New.
5580 * common.opt (ftree-loop-distribution): New.
5581 * tree-flow.h (debug_loop_ir): Renamed debug_loops.
5582 (print_loop_ir): Renamed print_loops.
5583 (debug_loop, debug_loop_num, print_loops_bb, mark_virtual_ops_in_bb,
5584 tree_duplicate_loop_to_edge_cfg, rename_variables_in_loop): Declared.
5585 * Makefile.in (TREE_DATA_REF_H): Depends on tree-chrec.h.
5586 (tree-loop-distribution.o): Added.
5587 * tree-cfg.c (mark_virtual_ops_in_region): Use mark_virtual_ops_in_bb.
5588 (mark_virtual_ops_in_bb): New.
5589 (print_loops_bb, debug_loop_num, debug_loop): New.
5590 * passes.c: Scheduled pass_loop_distribution.
5592 2007-12-12 Konrad Trifunovic <konrad.trifunovic@inria.fr>
5594 * graphite.c (scan_tree_for_params): Correct the number of columns
5596 (nb_flat_iterator): New.
5597 (setup_cloog_loop): Initialize to 1 the first column for inequalities.
5598 (build_scop_iteration_domain): Correct the number of columns for
5601 2007-12-12 Sebastian Pop <sebastian.pop@amd.com>
5603 * Merge from mainline (129697:130800).
5605 2007-10-30 Sebastian Pop <sebastian.pop@amd.com>
5607 * graphite.c (build_graphite_bb): SCoP's basic blocks are post
5608 dominated by SCoP's exit.
5609 (graphite_transform_loops): Compute post dominators.
5611 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5613 * Merge from mainline (127169:129697).
5615 2007-10-28 Sebastian Pop <sebastian.pop@amd.com>
5617 * graphite.c (affine_expr): Renamed scop_affine_expr. Use an extra
5618 parameter for the basic block that contains the expression. Use
5619 outermost_loop_in_scop for evolution_function_is_affine_multivariate_p.
5620 (stmt_simple_for_scop_p): Pass to scop_affine_expr the basic block of
5622 * graphite.h (gbb_loop): New.
5623 (GBB_LOOP): Removed.
5625 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5627 * Makefile.in: Fix merge problem.
5629 2007-08-03 Sebastian Pop <sebpop@gmail.com>
5631 * Merge from mainline (125309:127169).
5632 * tree-loop-distribution.c: Disabled.
5634 2007-06-05 Sebastian Pop <sebpop@gmail.com>
5636 * Merge from mainline (r123693:125309).
5638 2007-05-30 Sebastian Pop <sebpop@gmail.com>
5640 * tree-loop-distribution.c (correct_modify_expr_p): Renamed
5642 (correct_modify_p, check_statements, number_of_lvalue_uses,
5643 number_of_scalar_dependences, create_edges): Use GIMPLE_MODIFY_STMT
5644 instead of MODIFY_EXPR.
5645 (update_edge_with_ddv): Don't pass index_of_edge. Initialize
5648 2007-05-24 Sebastian Pop <sebpop@gmail.com>
5650 * tree-loop-distribution.c (struct rdg): Replace arrays by
5651 VECs for edges and vertices.
5652 (RDG_NBV, RDG_NBE, RDG_VERTEX, RDG_EDGE): Removed.
5653 (RDGV_NB_PARTITIONS): New.
5654 (PRDG_NBV, PRDG_NBE): Removed.
5655 (build_scc_graph, correct_partitions_p, mark_partitions, build_prdg,
5656 dump_rdg, find_vertex_with_stmt, create_vertices, free_rdg,
5657 number_of_scalar_dependences, create_edges, build_rdg): Use VECs.
5659 2007-05-17 Georges-Andre Silber <silber@cri.ensmp.fr>
5660 Sebastian Pop <sebpop@gmail.com>
5662 * doc/invoke.texi (-ftree-loop-distribution): Document.
5663 * tree-loop-distribution.c: New file.
5664 * tree-pass.h (pass_loop_distribution): Declared.
5665 * timevar.def (TV_TREE_LOOP_DISTRIBUTION): New.
5666 * tree-data-ref.c (initialize_data_dependence_relation): Initialize
5668 * tree-data-ref.h (data_dependence_relation): Add reversed_p.
5669 (DDR_REVERSED_P): New.
5670 * common.opt (-ftree-loop-distribution): New.
5671 * tree-flow.h (distribute_loops): Declared.
5672 * Makefile.in (OBJS-common): Depend on tree-loop-distribution.o.
5673 * passes.c (init_optimization_passes): Schedule loop distribution.
5675 2007-05-12 Sebastian Pop <sebastian.pop@inria.fr>
5677 * graphite.c (print_graphite_bb): Don't call dump_data_references.
5678 (print_scop): Don't print when scop is NULL.
5679 (build_scop_context, find_transform): Don't output to stderr.
5681 2007-05-09 Sebastian Pop <sebastian.pop@inria.fr>
5683 * tree-data-ref.c: Don't include graphite.h.
5684 Comment out the code for printing data reference's scop.
5685 (build_access_matrix_with_af): Moved...
5686 * tree-data-ref.h (build_access_matrix_with_af): Removed declaration.
5687 * graphite.c (build_access_matrix_with_af): ... here. Now static.
5688 (print_graphite_bb): Print basic block's schedule.
5689 (print_scop): Don't print the schedule, call cloog's pretty printer.
5690 (bb_in_scop_p): A basic block is in a scop only if it is both
5691 dominated and postdominated by the scop's entry and exit basic blocks.
5692 (function_parameter_p): New.
5693 (invariant_in_scop_p): Use function_parameter_p.
5694 (new_scop, save_scop): New.
5695 (end_scop, test_for_scop_bound, build_scops): Use new_scop, and
5697 (scan_tree_for_params): Directly build the constraint as CloogMatrix.
5698 (loop_in_scop_p): New.
5699 (scop_record_loop): Use loop_in_scop_p.
5700 (build_scop_domain): Renamed build_scop_iteration_domain.
5701 (setup_cloog_loop, initialize_cloog_names, find_scop_parameters,
5702 nb_params_in_scop, build_scop_context, first_loop_in_scop,
5703 setup_cloog_loop, dot_scop_1, dot_scop): New.
5704 * graphite.h (GBB_LOOP, SCOP_PROG, dot_scop): New.
5705 (struct scop): Add a pointer to cloog's representation of a program.
5707 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5709 * doc/invoke.texi (-ftree-check-verbose): Renamed
5710 -ftree-checks-verbose.
5711 * common.opt (flag_tree_check_verbose): Renamed
5712 flag_tree_checks_verbose.
5713 * tree-check.c (tree_check_warning): Use flag_tree_checks_verbose.
5715 2007-04-14 Sebastian Pop <sebastian.pop@inria.fr>
5717 * configure: Regenerated.
5718 * config.in: Regenerated.
5719 * tree-ssa-loop.c (graphite_transforms): Execute
5720 graphite_transform_loops only when HAVE_cloog.
5721 * configure.ac (HAVE_polylib, HAVE_cloog, GRAPHITE): Defined.
5722 * graphite.c: Include polylibgmp.h and cloog.h.
5723 (graphite_transform_loops): Removed loops parameter.
5724 * tree-flow.h (graphite_transform_loops): Update declaration.
5725 * Makefile.in (POLYLIBLIBS, POLYLIBINC, CLOOGLIBS, CLOOGINC): New.
5726 (LIBS): Depend on CLOOGLIBS and on POLYLIBLIBS.
5727 (INCLUDES): Depend on POLYLIBINC and on CLOOGINC.
5728 (OBJS-common): Remove dependence on graphite.o.
5729 (BACKEND): Depend on @GRAPHITE@.
5731 2007-04-13 Sebastian Pop <sebastian.pop@inria.fr>
5733 * doc/invoke.texi (-ftree-check-verbose): Documented.
5734 * testsuite/gcc.dg/tree-checker/tree-checks-1.c: New.
5735 * testsuite/gcc.dg/tree-checker/tree-checks-2.c: New.
5736 * testsuite/gcc.dg/tree-checker/tree-checks-3.c: New.
5737 * testsuite/gcc.dg/tree-checker/tree-checks-4.c: New.
5738 * testsuite/gcc.dg/tree-checker/tree-checks.exp: New.
5739 * testsuite/gcc.dg/tree-checker/condates.crp: New.
5740 * common.opt (ftree-checks-verbose): New.
5741 * tree-check.c (tree_check_warning): Move extra stderr output
5742 under control of flag_tree_check_verbose.
5744 2007-04-12 Sebastian Pop <sebastian.pop@inria.fr>
5746 * tree-match.c: Fix comments formatting.
5747 * tree-match.h: Fix comments formatting.
5748 * tree-check.c: Fix comments formatting.
5749 (tree_check_init): Restructure.
5751 2007-04-12 Nic Volanschi <nic.volanschi@free.fr>
5753 * doc/invoke.texi (-ftree-check, -ftree-checks): Documented.
5755 2007-04-10 Sebastian Pop <sebastian.pop@inria.fr>
5757 * Merge from mainline (r120733:123693).
5759 2007-03-20 Nic Volanschi <nic.volanschi@free.fr>
5761 * condate.y: New file.
5762 * tree-match.h (struct patt_info_s): New field sign.
5763 (struct condate_s): New field msg.
5764 (normalize_condate, name_condate, add_condate): New.
5765 (conds[], condate_parse): Made extern.
5766 * tree-check.c (tree_check_warning): First arg changed to cond;
5767 warning reformatted.
5768 (tree_check_init): Reset the TREE_VISITED bit on every CFG node.
5770 (tree_check): Process trivial condates.
5771 (read_delimited_string): Removed.
5772 (print_cond): Print name and msg.
5773 (conds[]): Made extern.
5774 (parse_tree_check_file_once): Rewritten to use the parser in
5776 Processing of option --tree_check_string moved to tree_scan().
5777 * Makefile.in: Added condate.y
5779 2007-03-12 Sebastian Pop <sebastian.pop@inria.fr>
5781 * tree-pretty-print.c (dump_generic_bb_buff, lazy_dump_generic_node):
5782 Use VECs instead of varrays.
5783 * diagnostic.h (lazy_dump_generic_node): Update declaration.
5784 * Makefile.in (pretty-print.o): Depend on vec.h.
5785 * pretty-print.c: Include tree.h and vec.h.
5786 (pp_clear_state, pp_write_list_to_stream, pp_base_format,
5787 pp_base_format, pp_construct, pp_base_string, pp_lazy_mode,
5788 new_tree_chunk, pp_add_tree, pp_add_string, pp_add_char, pp_write_list,
5789 pp_free_list): Use VECs instead of varrays.
5790 * pretty-print.h: Do not include varray.h.
5791 (struct tree_chunk_s): Declaration moved before its use.
5792 (output_buffer): Rename varray field to chunks.
5793 * tree-match.c (tree_equal, chunk_1st_char, chunks_lookahead,
5794 tree_1st_char, match_chunks_pattinfo, match_tree_pattinfo,
5795 save_global_holes): Use VECs instead of varrays.
5796 * tree-match.h: Declare VECs of cfg_node, and hole_p.
5797 * tree-check.c (scan_cfg_stmts, push_node,
5798 print_matching_stmt): Removed.
5799 (tree_check_instance, push_global_holes_if_new, tree_check,
5800 execute_tree_check): Use VECs instead of varrays.
5801 (gate_tree_check): Don't execute the CFG check when basic_block_info
5804 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5806 * Merge from mainline (r115016:120733).
5808 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5810 * Merge from mainline (r117632:117661).
5812 2007-01-12 Sebastian Pop <sebastian.pop@inria.fr>
5814 * tree-dump.c (dump_option_value_in): Add TDF_DEBUG.
5815 * tree-pass.h (TDF_DEBUG, debug_p): New.
5816 * tree-scalar-evolution.c (set_scalar_evolution, get_scalar_evolution,
5817 get_scalar_evolution, add_to_evolution, set_nb_iterations_in_loop,
5818 get_loop_exit_condition, analyze_evolution_in_loop,
5819 analyze_initial_condition, analyze_scalar_evolution,
5820 instantiate_parameters, number_of_latch_executions): Use debug_p.
5821 * tree-chrec.c (chrec_apply): Use debug_p.
5822 * tree-data-ref.c: Include graphite.h.
5823 (dump_data_reference): Print also the access matrix.
5824 (analyze_array, analyze_indirect_ref, init_data_ref,
5825 analyze_offset_expr, address_analysis, object_analysis,
5826 create_data_ref, finalize_ddr_dependent,
5827 non_affine_dependence_relation, analyze_ziv_subscript,
5828 analyze_siv_subscript_cst_affine,
5829 compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine,
5830 can_use_analyze_subscript_affine_affine, analyze_siv_subscript,
5831 analyze_miv_subscript, analyze_overlapping_iterations,
5832 build_classic_dist_vector, subscript_dependence_tester,
5833 compute_affine_dependence, analyze_all_data_dependences): Use debug_p.
5834 (build_access_matrix_with_af): No longer static.
5835 * tree-data-ref.h (scop_p): ... declaration here.
5836 (data_reference.scop): New field.
5837 (DR_SCOP, DR_ACCESS_MATRIX): New.
5838 (build_access_matrix_with_af, dr_num_subscripts): Declared.
5839 * graphite.c (print_graphite_bb): Call dump_data_references.
5840 (print_scop): Use scop_nb_loops and scop_dim_domain.
5841 (test_for_scop_bound): Use debug_p.
5842 (scan_tree_for_params): Use scop_nb_loops, scop_nb_loops and
5844 (scop_loop_index): Moved...
5845 (scop_record_loop): New.
5846 (build_scop_loop_nests): Use scop_record_loop.
5847 (build_scop_domain): Use scop_dim_domain.
5848 (build_access_matrix): Implemented.
5849 (build_scop_canonical_schedules): Use scop_nb_loops.
5850 (build_graphite_bb): Initialize GBB_SCOP.
5851 * graphite.h (scop_p): Moved...
5852 (graphite_bb.scop): New field.
5853 (graphite_bb.iteration_domain, GBB_DOMAIN, scop.nb_params,
5854 scop.nb_loops, scop.dim_domain, SCOP_NB_LOOPS, SCOP_NB_PARAMS,
5855 SCOP_DIM_DOMAIN, SCOP_STMTS): Removed.
5856 (scop_nb_params, scop_nb_loops, scop_dim_domain, gbb_dim_domain,
5857 scop_loop_index): New.
5858 * Makefile.in (tree-data-ref.o): Depends on graphite.h.
5860 2007-01-05 Sebastian Pop <sebastian.pop@inria.fr>
5862 * Merge from mainline (r117661:120450).
5864 2006-10-12 Sebastian Pop <sebastian.pop@inria.fr>
5866 * tree-scalar-evolution.c (instantiate_parameters_1): Don't stop
5867 at the first declaration outside the varying loop, instantiate as
5869 * tree-chrec.c (for_each_scev_op): New.
5870 * tree-chrec.h (for_each_scev_op): Declared.
5871 * tree-ssa-loop.c (pass_graphite_trans): Don't dump the function.
5872 * tree-data-ref.c (get_references_in_stmt,
5873 find_data_references_in_stmt): New, from trunk.
5874 (find_data_references_in_loop): Use get_references_in_stmt
5875 and find_data_references_in_loop, modified as in trunk.
5876 (build_access_matrix_with_af): New.
5877 * tree-data-ref.h (data_reference): Add a field access_matrix.
5878 (data_ref_loc): New, as in trunk.
5879 * graphite.c (print_graphite_bb, bb_in_scop_p, stmt_in_scop_p,
5880 invariant_in_scop_p, param_index, scan_tree_for_params,
5881 scop_loop_index, build_scop_loop_nests, build_scop_domain, irp_data,
5882 idx_record_param, idx_record_params, build_access_matrix,
5883 build_scop_data_accesses, build_scop_canonical_schedules,
5884 build_graphite_bb, build_scop_bbs, find_params_in_bb,
5885 build_scop_params): New.
5886 * graphite.h (graphite_bb): New.
5887 (scop): Add fields static_schedule, params, loop_nest,
5889 * lambda.h: Declare vecs of lambda_matrix.
5890 * tree-flow.h (print_loop_ir_bb): Declared.
5891 * tree-cfg.c (print_loop_ir_bb): New.
5892 (print_loop): Use print_loop_ir_bb.
5894 2006-10-12 Sebastian Pop <pop@cri.ensmp.fr>
5896 * Merge from mainline (r115016:117632).
5898 2006-10-11 Sebastian Pop <pop@cri.ensmp.fr>
5900 * graphite.c (debug_scops): Adjust definition for avoiding a bootstrap
5901 break due to a warning.
5903 2006-10-10 Sebastian Pop <pop@cri.ensmp.fr>
5905 * graphite.c (print_scops, debug_scops): New.
5906 (graphite_transform): Renamed graphite_find_transform.
5907 * graphite.h (debug_scops): Declared.
5909 2006-08-17 Sebastian Pop <pop@cri.ensmp.fr>
5911 * tree-match.c: Reformat following the GNU style.
5912 * tree-match.h: Reformat following the GNU style.
5913 * tree-pattern.h: Removed empty file.
5914 * Makefile.in: Remove references to tree-pattern.h.
5915 * tree-check.c: Reformat following the GNU style.
5916 (execute_tree_check): Move gate condition code to...
5917 (gate_tree_check): ...here. New function.
5918 (pass_check): Use the gate function.
5920 2006-07-04 Nic Volanschi <nic.volanschi@free.fr>
5922 * tree-pattern.h: New. Tree pattern matching and checking using
5924 * tree-check.c: New. Tree/CFG checking pass.
5925 * tree-match.c: New. Library for tree pattern matching.
5926 * opts.c, common.opt: Add options --ftree-check & --ftree-checks.
5927 * toplev.c, flags.h: Add globals for tree-check pass.
5928 * Makefile.in: Integrate the files in tree-check pass.
5929 * timevar.def, tree-optimize.c, tree-pass.h: Register tree-check pass.
5930 * pretty-print.c, pretty-print.h, tree-pretty-print.c, diagnostic.h:
5931 Introduce a "lazy" pretty-print mode.
5932 * tree.c, tree.h: Add tree_name.
5934 2006-07-04 Sebastian Pop <pop@cri.ensmp.fr>
5936 * doc/invoke.texi (-fgraphite): Correct typo.
5937 * tree-scalar-evolution.c (number_of_iterations_for_all_loops): Update
5938 use of print_loop_ir.
5939 * testsuite/gcc.dg/graphite/scop-1.c: New.
5940 * testsuite/gcc.dg/graphite/scop-2.c: New.
5941 * testsuite/gcc.dg/graphite/graphite.exp: New.
5942 * graphite.c: Include domwalk.h.
5943 (print_scop): Print only the entry and exit blocks.
5944 (debug_scop): No longer static.
5945 (affine_expr): Fix formating. Return also true when the expression is
5947 (stmt_simple_for_scop_p): Fix formating.
5948 (build_scops): Use domwalk.
5949 (get_loop_start, end_scop, test_for_scop_bound): New.
5950 (graphite_transform_loops): Avoid printing on stderr.
5951 * graphite.h (debug_scop): Declared.
5952 * tree-flow.h (debug_loop_ir, print_loop_ir): Update declarations.
5953 * Makefile.in (graphite.o): Depend on domwalk.h.
5954 * tree-cfg.c (print_loop, print_pred_bbs, print_succ_bbs): Remove
5955 declarations for static functions.
5956 (print_loop, print_loop_ir, debug_loop_ir): Use an extra parameter for
5957 controlling output verbosity.
5959 2006-06-26 Sebastian Pop <pop@cri.ensmp.fr>
5960 Plesco Alexandru <shurikx@gmail.com>
5962 * doc/invoke.texi (-fgraphite): Document.
5963 * tree-pass.h (pass_graphite_transforms): Declared.
5964 * timevar.def (TV_GRAPHITE_TRANSFORMS): New.
5965 * tree-ssa-loop.c (graphite_transforms, gate_graphite_transforms): New.
5966 (pass_graphite_transforms): Defined.
5967 * tree-data-ref.c (free_data_ref, data_reference): Extern.
5968 * tree-data-ref.h (free_data_ref, data_reference): Declared.
5969 * graphite.c, graphite.h: New.
5970 * common.opt (fgraphite): Declared.
5971 * tree-flow.h (graphite_transform_loops): Declared.
5972 * Makefile.in (OBJS-common): Add graphite.o.
5973 (graphite.o): New rule.
5974 * passes.c (pass_graphite_transforms): Scheduled.