1 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
4 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
6 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
8 * tree-scalar-evolution.c (instantiate_scev_convert): New.
9 (instantiate_scev_1): Move code in instantiate_scev_convert.
11 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
13 * tree-scalar-evolution.c (instantiate_scev_binary): New.
14 (instantiate_scev_1): Move code in instantiate_scev_binary.
16 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
18 * tree-scalar-evolution.c (instantiate_scev_name): New.
19 (instantiate_scev_1): Move code in instantiate_scev_name.
21 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
23 * Merge from mainline (150992:151171).
25 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
27 * graphite-dependences.c (graphite_legal_transform_bb): Call
28 pbb_remove_duplicate_pdrs.
29 * graphite-poly.c (can_collapse_pdr): Removed.
30 (pdr_find_duplicate): Removed.
31 (can_collapse_pdrs): New.
32 (pbb_remove_duplicate_pdrs): New.
33 (new_poly_dr): Do not look for duplicates.
34 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
35 (PBB_PDR_DUPLICATES_REMOVED): New.
36 (pbb_remove_duplicate_pdrs): Declared.
38 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
40 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
41 the strides by multiplying by PDR_NB_REFS.
42 * graphite-poly.c (can_collapse_pdr): New.
43 (pdr_find_duplicate): New.
44 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
45 Initialize PDR_NB_REFS.
46 * graphite-poly.h (struct poly_dr): Add field nb_refs.
48 (new_poly_dr): Number of subscripts is a graphite_dim_t.
50 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
52 Revert one of the previous commits:
53 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
54 the computation of symmetric data dependence relations.
55 (dependency_between_pbbs_p): Same.
57 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
60 * graphite-poly.c (apply_poly_transforms): Remove legality test before
63 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
65 * graphite-dependences.c (pddr_original_scattering): Return NULL
66 for read-read dependence relations.
67 * graphite-poly.h (enum poly_dr_type): Fix comment.
70 (pdr_may_write_p): New.
72 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
74 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
75 (struct poly_dr): Same.
77 * graphite-poly.c (new_poly_dr): Same.
79 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
80 Sebastian Pop <sebastian.pop@amd.com>
82 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
83 pbb_strip_mine_time_depth. Changed the implementation so that
84 transformation is expressed as a transformation on
85 time (scatttering) dimensions. Also, ensures that the 2d+1
86 scheduling format is preserved.
87 (pbb_strip_mine_profitable_p): Profitability is based on the
88 iteration number of a given time (scattering) dimension,
89 and not on a original loop depth dimension.
90 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
91 (pbb_do_strip_mine): Call psct_dynamic_dim.
92 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
93 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
94 (pbb_nb_dynamic_scattering_transform): New.
95 (psct_dynamic_dim): New.
97 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
99 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
100 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
101 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
102 * graphite-interchange.c (build_linearized_memory_access): Same.
103 (memory_stride_in_loop): Same.
105 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
107 * graphite-dependences.c (pddr_original_scattering): New.
108 (graphite_legal_transform_dr): Call pddr_original_scattering.
111 * graphite-dependences.h (dot_deps): Declared.
112 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
113 (print_pdr): Print PDR_ID.
114 * graphite-poly.h (struct poly_dr): Add field id.
117 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
119 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
121 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
122 not delete the original dependence relation.
124 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
126 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
127 the computation of symmetric data dependence relations.
128 (dependency_between_pbbs_p): Same.
130 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
132 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
133 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
134 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
135 (free_poly_ddr): New.
136 (pddr_is_empty): New.
137 (dependence_polyhedron_1): Now returns a poly_ddr_p.
138 (dependence_polyhedron): Same. Remove useless gcc_assert.
140 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
141 (graphite_carried_dependence_level_k): Call pddr_is_empty.
142 * graphite-dependences.h (enum poly_dependence_kind): New.
143 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
144 (PDRP_SOURCE): Renamed PDDR_SOURCE.
145 (PDRP_SINK): Renamed PDDR_SINK.
146 (PDRP_DDP): Renamed PDDR_DDP.
148 (free_poly_ddr): Declared.
149 * graphite-poly.c (new_scop): Use the new hash function names.
150 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
152 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
154 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
156 * Merge from mainline (150764:150992).
158 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
160 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
161 bounds with LT_EXPR to make niter analysis more precise on code
162 generated by Graphite.
164 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
166 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
167 (graphite_legal_transform_bb): Same.
168 (poly_drs_may_alias_p): Same.
170 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
173 * graphite-ppl.c (ppl_max_for_le): Correct the use of
174 ppl_Pointset_Powerset_C_Polyhedron_maximize.
176 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
178 * graphite-poly.c (print_pbb): Print PBB index.
180 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
182 * Merge from mainline (r150672:150764).
184 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
186 * graphite-interchange.c (ppl_max_for_le): Moved...
187 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
188 * graphite-ppl.c (ppl_max_for_le): ... here.
189 * graphite-ppl.h (ppl_max_for_le): Declared.
191 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
193 * Merge from mainline (r150372:150672).
195 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
198 * sese.c (convert_for_phi_arg): New.
199 (add_guard_exit_phis): Use convert_for_phi_arg.
201 * testsuite/gfortran.dg/graphite/id-17.f: New.
203 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
205 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
206 unknown subscript upper bounds.
208 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
210 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
211 Pranav Garg <pranav.garg2107@gmail.com>
213 * graphite-interchange.c (gather_access_strides): Removed.
214 (ppl_max_for_le): New.
215 (build_linearized_memory_access): New.
216 (memory_stride_in_loop): New.
217 (pbb_interchange_profitable_p): Reimplemented.
218 * graphite-ppl.h (ppl_new_id_map): New.
219 (ppl_interchange): New.
221 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
223 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
225 * graphite-interchange.c (compute_subscript): Removed.
226 (compute_array_size_cstr): Removed.
227 (compute_array_size_poly): Removed.
228 (compute_array_size): Removed.
229 (gather_access_strides_poly): Removed.
230 (gather_access_strides): Empty.
232 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
234 * graphite-dependences.c (dependence_polyhedron_1): Replace
235 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
236 (graphite_legal_transform_dr): Same.
237 (graphite_carried_dependence_level_k): Same.
238 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
239 Initialize PDR_NB_SUBSCRIPTS.
240 (print_pdr_access_layout): Replace pdr_nb_subscripts with
242 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
243 (PDR_NB_SUBSCRIPTS): New.
244 (pdr_nb_subscripts): Removed.
245 (pdr_dim): Simplified.
246 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
247 with PDR_NB_SUBSCRIPTS.
249 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
251 * graphite-interchange.c (compute_array_size): Remove use of
253 * graphite-poly.c (new_poly_dr): Remove argument data_container.
254 Do not initialize PDR_DATA_CONTAINER.
255 (print_pdr): Do not print PDR_DATA_CONTAINER.
256 * graphite-poly.h (struct poly_dr): Remove data_container field.
257 (PDR_DATA_CONTAINER): Removed.
258 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
260 (build_poly_dr): Same.
262 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
264 * testsuite/gcc.dg/graphite/interchange-9.c: New.
266 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
267 Sebastian Pop <sebastian.pop@amd.com>
269 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
270 copy of the dependence polyhedron. Free the temporary objects.
271 (graphite_carried_dependence_level_k): Free unused objects before
274 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
275 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
276 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
277 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
278 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
280 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
282 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
283 Early return without analyzing the data dependences if no
284 transform has been done. Call restore_scattering if the transform
286 (graphite-interchange.c): Same.
287 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
288 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
289 (apply_poly_transforms): Do not gcc_assert that
290 the transform is legal.
291 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
292 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
293 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
294 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
295 * graphite-poly.h (struct poly_scattering): New.
296 (struct poly_bb): Add original, transformed, and saved fields.
297 Remove transformed_scattering, original_scattering, nb_local_variables,
298 and nb_scattering_transform fields.
299 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
300 (poly_scattering_new): New.
301 (poly_scattering_free): New.
302 (poly_scattering_copy): New.
303 (store_scattering_pbb): New.
304 (store_scattering): New.
305 (restore_scattering_pbb): New.
306 (restore_scattering): New.
307 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
308 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
310 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
312 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
315 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
317 * Makefile.in (graphite.o): Depends on PREDICT_H.
318 * graphite.c: Include predict.h.
319 (graphite_finalize): Call tree_estimate_probability.
320 * predict.c (predict_loops): Do not call scev_initialize and
322 (tree_estimate_probability_bb): New.
323 (tree_estimate_probability): Do not initialize loops: move that
324 code to the driver. Call tree_estimate_probability_bb.
325 (tree_estimate_probability_driver): New.
326 (pass_profile): Use tree_estimate_probability_driver.
327 * predict.h (tree_estimate_probability): Declared.
329 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
331 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
332 * graphite-dependences.c (graphite_legal_transform): Add time to
333 TV_GRAPHITE_DATA_DEPS.
334 (dependency_between_pbbs_p): Same.
335 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
337 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
339 * Merge from mainline (r149952:150372).
341 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
343 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
344 * graphite-blocking.c: Same.
345 * graphite-clast-to-gimple.c: Same.
346 * graphite-dependences.c: Same.
347 * graphite-poly.c: Same.
348 * graphite-poly.h: Same.
349 * graphite-ppl.c: Same.
350 * graphite-scop-detection.c: Same.
351 * graphite-sese-to-poly.c: Same.
354 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
356 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
357 (remove_simple_copy_phi): New.
358 (remove_invariant_phi): New.
359 (simple_copy_phi_p): New.
360 (reduction_phi_p): New.
361 (gsi_for_ssa_name_def): New.
362 (insert_out_of_ssa_copy): New.
363 (insert_out_of_ssa_copy_on_edge): New.
364 (create_zero_dim_array): New.
365 (scalar_close_phi_node_p): New.
366 (rewrite_close_phi_out_of_ssa): New.
367 (rewrite_phi_out_of_ssa): New.
368 (rewrite_reductions_out_of_ssa): New.
369 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
371 * testsuite/gcc.dg/graphite/id-11.c: New.
372 * testsuite/gcc.dg/graphite/id-15.c: New.
373 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
374 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
375 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
376 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
377 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
378 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
379 * testsuite/gfortran.dg/graphite/id-13.f: New.
380 * testsuite/gfortran.dg/graphite/id-5.f: New.
382 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
384 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
385 check that nb_reductions_in_loop is zero.
386 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
388 (nb_reductions_in_loop): Removed.
389 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
390 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
391 (bb_contains_non_iv_scalar_phi_nodes): Removed.
392 (scop_contains_non_iv_scalar_phi_nodes): Removed.
393 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
395 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
397 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
398 statements that have an empty iteration domain.
399 * testsuite/gfortran.dg/graphite/id-16.f: New.
401 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
403 * tree-scalar-evolution.c (instantiate_scev_1): Return
404 chrec_dont_know when the result is not above instantiate_below.
405 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
406 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
407 the tree has a known scalar evolution.
408 * testsuite/gfortran.dg/graphite/id-14.f: New.
409 * testsuite/gfortran.dg/graphite/id-15.f: New.
411 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
413 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
415 (rename_variables): Keep inserting renames after the ones already
418 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
420 * graphite-sese-to-poly.c (compare_bb_depths): New.
421 (graphite_sort_dominated_info): New.
422 (build_scop_bbs_1): Call graphite_sort_dominated_info.
423 (build_scop_scattering): Fix comment.
425 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
427 * graphite.c (graphite_finalize): Call print_loops instead of
428 dump_function_to_file.
429 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
430 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
431 loops generated in the graphite output file.
432 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
433 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
434 * testsuite/gfortran.dg/graphite/id-12.f: New.
436 2009-07-24 Li Feng <nemokingdom@gmail.com>
438 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
441 2009-07-24 Li Feng <nemokingdom@gmail.com>
442 Tobias Grosser <grosser@fim.uni-passau.de>
444 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
445 alias set number build alias in ACCESSES polyhedron.
446 (build_alias_set_for_drs): New.
447 (build_pbb_drs): Added build_alias_set_for_drs.
448 * graphite-dependences.c (poly_drs_may_alias_p): New.
449 (graphite_carried_dependence_level_k): Check alias information
450 before building polyhedron.
452 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
454 * Makefile.in (lambda-code.o): Fix formatting.
456 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
458 * Merge from mainline (r149350-149952)
460 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
462 * graphite-poly.c (apply_poly_transforms): Move strip_mine
463 before interchange to prepare for loop blocking.
465 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
467 * graphite-poly.c (apply_poly_transforms): Add checks after every
469 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
470 done in apply_poly_transforms.
472 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
474 * graphite-dependences.c (build_lexicographically_gt_constraint):
475 Replace RES parameter with *RES.
476 (dependence_polyhedron_1): Pass an address of the parameter RES
477 instead of value of RES.
479 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
481 * graphite.c (graphite_finalize): Fix comment.
482 (graphite_transform_loops): Reset scev info after code generation
485 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
487 * graphite.c (graphite_finalize): Call scev_reset.
489 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
491 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
492 GBB_CLOOG_IV_TYPES hash table twice.
493 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
494 (add_condition_to_domain): Clear GMP values.
496 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
498 * graphite-dependences.c: Fix formatting.
499 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
500 (pbb_number_of_iterations): Free ppl_Linear_Expression.
501 * graphite-sese-to-poly.c: Fix formatting.
502 * graphite.c (graphite_transform_loops): Create the hash table
503 after the early return.
505 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
507 * testsuite/gcc.dg/graphite/id-14.c: New.
508 * testsuite/gcc.dg/graphite/pr40157.c: New.
509 * testsuite/gfortran.dg/graphite/id-11.f: New.
511 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
513 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
514 (build_poly_scop): Return false when there are no pbbs within
515 loops to avoid to pass to cloog scops with no loops.
517 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
519 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
520 useless test "i % 2".
521 (build_pbb_scattering_polyhedrons): Fix formatting.
522 (build_poly_dr): Same.
523 * graphite.c (graphite_transform_loops): Restructure.
525 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
527 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
528 reduction_list parameter.
529 (rewrite_all_phi_nodes_with_iv): Same.
530 (canonicalize_loop_ivs): Same.
531 * tree-parloops.c (struct brli): Removed.
532 (build_reduction_list_info): Removed.
533 (build_new_reduction): New.
534 (analyze_reduction_list): Removed.
535 (gather_scalar_reductions): Find reductions instead of phi
536 nodes that can't be canonicalized.
537 (try_create_reduction_list): Remove reduction_list parameter.
538 (gen_parallel_loop): Same.
539 (parallelize_loops): Remove analyze_reductions variable,
540 initialization and free.
541 Change reduction_list htab initialization to reduction_info
542 elements instead of ssa names.
543 Call try_create_reduction_list and gen_parallel_loop without
544 analyzed_reduction argument.
545 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
546 canonicalize_loop_ivs with one less argument.
547 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
549 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
551 * graphite-dependences.c (new_poly_dr_pair): New.
552 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
553 (new_poly_dr_pair): New.
554 (eq_poly_dr_pair_p): New.
555 (hash_poly_dr_pair_p): New.
556 * graphite-dependences.h (struct poly_dr_pair): New.
557 (eq_poly_dr_pair_p): Declared.
558 (hash_poly_dr_pair_p): Declared.
559 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
560 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
561 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
562 * Makefile.in (graphite-poly.o): Add dependence on
563 graphite-dependences.h.
565 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
567 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
568 polynomials of degree > 1 pass to Graphite.
569 * tree-chrec.c (scev_is_linear_expression): Call
570 evolution_function_is_affine_multivariate_p.
571 * testsuite/gfortran.dg/graphite/id-10.f90: New.
573 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
575 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
576 Instantiate scevs varying in outer loops.
577 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
579 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
581 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
582 redundant constraint.
584 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
586 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
587 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
588 based on the file names as in the C testsuite.
589 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
590 * testsuite/gfortran.dg/graphite/block-2.f: Same.
591 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
592 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
593 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
594 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
595 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
596 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
597 * testsuite/gfortran.dg/graphite/id-6.f: Same.
598 * testsuite/gfortran.dg/graphite/id-9.f: Same.
599 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
600 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
601 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
603 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
605 * sese.c (expand_scalar_variables_call): New.
606 (expand_scalar_variables_ssa_name): Handle calls in expander.
608 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
610 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
611 Expect to see the pattern twice.
612 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
613 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
614 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
616 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
618 * testsuite/gcc.dg/graphite/id-10.c: New.
619 * testsuite/gcc.dg/graphite/id-12.c: New.
620 * testsuite/gfortran.dg/graphite/id-7.f: New.
621 * testsuite/gfortran.dg/graphite/id-8.f: New.
623 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
625 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
628 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
630 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
632 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
634 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
636 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
638 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
639 building PDR subscripts.
641 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
643 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
644 computation of array sizes.
646 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
648 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
650 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
652 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
653 build_pairwise_constraint, dr_equality_constraints,
654 build_pairwise_scheduling_equality,
655 build_pairwise_scheduling_inequality, lexicographically_gt_p,
656 build_lexicographically_gt_constraint, dependence_polyhedron,
657 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
658 Move from NNC_Polyhedron to C_Polyhedron.
659 * graphite-interchange.c (compute_array_size_poly,
660 gather_access_strides): Dito.
661 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
662 free_scop, pbb_number_of_iterations): Dito.
663 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
664 pbb_dim_iter_domain, struct scop): Dito.
665 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
666 new_Cloog_Domain_from_ppl_Polyhedron,
667 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
668 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
669 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
670 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
671 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
672 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
673 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
674 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
675 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
676 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
677 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
678 build_scop_iteration_domain, build_poly_dr): Dito
680 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
682 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
684 * testsuite/gcc.dg/graphite/run-id-1.c: New.
686 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
688 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
689 positivity constraint on the symbolic number of iterations.
691 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
693 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
695 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
696 Tobias Grosser <grosser@fim.uni-passau.de>
698 * graphite-clast-to-gimple.c (build_scop_context): Removed.
699 (build_cloog_prog): Directly use SCOP_CONTEXT.
700 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
701 (free_scop): Free SCOP_CONTEXT.
702 (print_scop_context): New.
703 (print_scop): Call print_scop_context.
704 (debug_scop_context): New.
705 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
706 (struct scop): Added field context.
708 * graphite-sese-to-poly.c (add_param_constraints): New.
709 (build_scop_context): New.
710 (build_poly_scop): Call build_scop_context.
712 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
714 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
715 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
716 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
717 * graphite-ppl.h: Include double-int.h and tree.h.
718 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
719 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
720 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
721 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
723 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
725 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
726 POINTER_PLUS_EXPR for pointer types.
727 (clast_to_gcc_expression): Same.
729 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
731 * graphite-poly.c (print_scattering_function): Early return when
732 PBB_TRANSFORMED_SCATTERING is not initialized.
733 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
735 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
737 * tree-parloops.c (analyze_reduction_list): Remove unused variable
740 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
742 * tree-parloops.c (analyze_reduction_list): Change return
744 (try_create_reduction_list): Move the call to
745 analyze_reduction_list to the beginining.
746 Call reduction_phi with analyzed_reductions as argument
747 instead of reduction_list.
749 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
751 * Merge from mainline (r148296:149346)
753 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
755 * graphite-scop-detection.c (graphite_can_represent_init): New.
756 (graphite_can_represent_scev): Call graphite_can_represent_init:
757 check that the initial value does not contain multiplications of
759 (stmt_has_simple_data_refs_p): New.
760 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
761 (is_simple_operand): Fix formatting.
762 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
764 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
766 * testsuite/gcc.dg/graphite/id-13.c: New.
767 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
768 analyze_scalar_evolution, use scalar_evolution_in_region.
769 (scan_tree_for_params_right_scev): Add extra assert.
770 (parameter_index_in_region_1): Split from parameter_index_in_region.
771 (idx_record_params): Use scalar_evolution_in_region.
772 (find_params_in_bb): Same.
773 (find_scop_parameters): Same.
774 (build_loop_iteration_domains): Same.
775 (create_linear_expr_from_tree): Same.
776 * sese.c (scalar_evolution_in_region): New.
777 * sese.h (scalar_evolution_in_region): Declared.
778 (defined_in_sese_p): New.
779 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
781 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
784 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
786 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
787 TREE_DATA_REF_H also implies SCEV_H.
789 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
791 * graphite-poly.c (print_scop_params): New.
792 (print_scop): Call print_scop_params.
793 (debug_scop_params): New.
794 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
796 2009-07-07 Li Feng <nemokingdom@gmail.com>
798 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
799 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
800 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
801 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
802 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
803 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
805 2009-07-07 Li Feng <nemokingdom@gmail.com>
807 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
808 for dependency checking part.
809 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
810 tests for dependency checking.
811 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
812 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
813 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
814 flag -fdump-tree-graphite-all for autopar testsuites.
816 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
818 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
819 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
820 canonicalize_loop_ivs): Moved...
821 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
823 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
825 * tree-parloops.c (try_create_reduction_list): Pass an extra
826 argument analyzed_reductions. Call analyze_reduction_list.
827 (gen_parallel_loop): Do not call analyze_reduction_list.
828 (parallelize_loops): Init and finalize analyzed_reductions.
830 2009-07-06 Li Feng <nemokingdom@gmail.com>
832 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
833 Added flag -fno-loop-strip-mine for autopar testcase.
835 2009-07-04 Li Feng <nemokingdom@gmail.com>
837 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
838 transformed scattering dimension instead of unmatch orignal when
839 calling dependence_polyhedron.
841 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
843 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
845 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
847 * graphite-poly.c (pbb_number_of_iterations): Check for returned
848 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
850 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
852 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
853 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
854 * graphite-poly.c (pbb_number_of_iterations): New.
855 * graphite-poly.h (pbb_number_of_iterations): Declared.
856 (pbb_iterator_dim, pbb_parameter_dim): New.
858 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
860 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
861 last commit on type of lower and upper bound of loops.
863 2009-06-29 Li Feng <nemokingdom@gmail.com>
865 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
866 graphite-dependences.h.
867 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
868 (mark_bb_with_pbb): New.
869 (get_stmtfor_depth): New.
870 (find_pbb_via_hash): New.
871 (dependency_in_loop_p): New.
872 (mark_loops_parallel): New.
873 (free_aux_in_new_loops): New.
874 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
875 bb with it's relevant pbb. Mark newly created loops. Remove mark
876 innermost loop parallel without checking.
877 (gloog): Add parameter BB_PBB_MAPPING.
878 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
879 (gloog): Change declaration.
880 (mark_loop_parallel): Make extern.
881 (free_aux_in_new_loops): Declare.
882 (bb_pbb_map_hash): New.
883 (eq_bb_pbb_map): New.
884 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
885 auto parallelization when flag_graphite_force_parallel is set.
886 (graphite_finalize): Added free_aux_in_new_loops.
887 * tree-parloops.c (parallelize_loops): Only generate parallel code for
888 the innermost loop that marked parallel. Use
889 flag_graphite_force_parallel instead of loop->can_be_parallel.
890 (loop_parallel_p): Move inner most checking out of function.
892 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
894 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
895 type of lower and upper bound of loops signed long int.
897 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
899 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
900 expression outside the loop.
902 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
904 * gcc.dg/graphite/interchange-8.c: New.
906 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
908 * gcc.dg/graphite/interchange-0.c: XFailed.
909 * gcc.dg/graphite/interchange-5.c: XFailed.
910 * gcc.dg/graphite/interchange-6.c: XFailed.
912 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
914 * graphite-interchange.c (compute_array_size_poly): The end of the
915 recursion should return 1.
917 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
919 * graphite-interchange.c (compute_array_size_cstr): Allow the
920 subscript multiplier to be -1.
921 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
922 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
923 data_container. Initializes PDR_DATA_CONTAINER.
924 (print_pdr_access_layout): New.
925 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
926 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
928 (PDR_DATA_CONTAINER): New.
929 (new_poly_dr): Update declaration.
930 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
931 (build_poly_dr): Call pdr_add_data_dimensions.
933 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
935 * graphite-poly.h (struct poly_dr): Fix comment.
936 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
937 (pdr_add_memory_accesses): New.
938 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
940 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
942 * graphite-poly.c (print_pdrs, debug_pdrs): New.
943 (print_pbb): Add call to print_pdrs.
944 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
946 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
947 Li Feng <nemokingdom@gmail.com>
949 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
950 (dependency_between_pbbs_p): New.
951 (lexicographically_gt_p): Assure !empty_p before polyhedron
953 (build_lexicographically_gt_constraint): Correct lexicographically
955 * graphite-dependences.h: New.
956 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
958 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
960 * graphite-clast-to-gimple.c (print_clast_stmt): New.
961 (gloog): Print to dump_file the generated clast.
962 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
963 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
965 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
967 * graphite-poly.c (extend_scattering): Increment
968 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
970 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
972 * graphite-interchange.c (compute_array_size_poly): Added exit of
973 recursion condition. Continue iterating even after the first equality.
974 (compute_array_size): Same.
976 2009-06-24 Li Feng <nemokingdom@gmail.com>
978 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
979 -fdump-tree-final_cleanup to -fdump-tree-optimized.
980 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
981 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
982 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
984 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
986 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
987 only when the use verifies is_gimple_reg.
989 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
991 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
992 Allocate scaldims after call to unify_scattering_dimensions.
994 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
996 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
998 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
999 Albert Cohen <albert.cohen@inria.fr>
1001 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1002 variables for the strip mining.
1004 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1005 Pranav Garg <pranav.garg2107@gmail.com>
1007 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1008 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1009 (graphite-blocking.o): New rule.
1010 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1011 * graphite-blocking.c: New.
1012 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1013 flag_loop_strip_mine.
1014 (psct_scattering_dim_for_loop_depth): New.
1015 * graphite-poly.h (scop_do_strip_mine): Declared.
1016 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1017 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1018 flag_loop_strip_mine.
1020 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1022 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1023 a GMP value and a PPL coefficient at each iteration of a loop.
1025 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1027 * graphite-dependences.c (dependence_polyhedron): Do not use
1028 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1029 pbb_nb_scattering_transform.
1030 (graphite_legal_transform_dr): Same.
1031 * graphite-poly.c (extend_scattering): Same.
1032 (unify_scattering_dimensions): Same.
1033 (print_scattering_function): Same.
1034 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1035 PBB_NB_LOCAL_VARIABLES.
1036 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1037 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1038 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1039 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1040 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1041 (pbb_nb_scattering_transform): New.
1042 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1043 (psco_scattering_dim): Add assert on parameters.
1044 (psct_scattering_dim): Same.
1045 (psct_scattering_dim_for_loop_depth): Declared.
1046 (psct_local_var_dim): New.
1047 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1048 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1049 correct layout, call pbb_nb_local_vars.
1050 (psct_add_local_variable, psct_add_scattering_dimension): New.
1051 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1052 Initialize PBB_NB_SCATTERING_TRANSFORM.
1054 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1056 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1057 (set_coef): Renamed ppl_set_coef.
1058 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1060 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1062 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1063 test a boolean against 1.
1064 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1065 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1066 (pbb_do_interchange): Returns true when a transform has been performed.
1067 (scop_do_interchange): Same.
1068 * graphite-poly.c (apply_poly_transforms): Use the return value of
1069 scop_do_interchange.
1070 * graphite-poly.h (scop_do_interchange): Update declaration.
1072 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1074 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1076 * sese.c (sese_reset_aux_in_loops): New.
1077 * sese.h (sese_reset_aux_in_loops): New.
1079 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1081 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1082 multiplier and multiply the constant by the multiplier.
1083 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1084 (build_poly_dr): Do not use the multiplier to define the subscript.
1086 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1088 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1089 compiler's data reference. Initialize PDR_CDR.
1090 (print_pdr): Call dump_data_reference.
1091 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1092 Add compiler_dr field.
1093 (PDR_BB): Renamed PDR_PBB.
1095 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1096 GCC's data reference representation.
1097 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1098 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1100 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1102 * graphite-poly.c (print_scattering_function): Also print the layout.
1103 * graphite-poly.h (pbb_nb_local_vars): New.
1105 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1107 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1109 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1111 * graphite-poly.c (print_pdr, debug_pdr): New.
1112 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1113 (PDR_BASE): Removed.
1115 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1117 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1120 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1122 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1123 subscript identification column.
1124 (pbb_do_interchange): Print to dump_file that some loops "will be
1125 interchanged". Rely on that chain of characters in the testcases.
1126 * gcc.dg/graphite/interchange-0.c: New.
1127 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1128 interchange-*.c files and compile them with -floop-interchange.
1130 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1132 * graphite-interchange.c (interchange_profitable_p): Renamed
1133 pbb_interchange_profitable_p.
1135 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1136 Harsha Jagasia <harsha.jagasia@amd.com>
1137 Pranav Garg <pranav.garg2107@gmail.com>
1139 * graphite-interchange.c (interchange_profitable_p): Make static.
1140 (pbb_interchange_loop_depths, pbb_do_interchange,
1141 scop_do_interchange): New.
1142 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1143 for flag_loop_interchange.
1144 * graphite-poly.h (scop_do_interchange): Declared.
1145 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1146 flag_loop_interchange is used.
1148 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1150 * graphite-dependences.c (dependence_polyhedron): Update use of
1151 pbb_nb_scattering_dims.
1152 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1153 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1154 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1155 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1157 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1159 * graphite.c: Cleanup foo.
1161 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1163 * Merge from mainline (r143684:148293).
1164 * Disabled libpcp until it gets fixed.
1166 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1167 Harsha Jagasia <harsha.jagasia@amd.com>
1169 * graphite-interchange.c: New.
1170 * Makefile.in (graphite-interchange.o): New.
1171 * graphite-poly.h (interchange_profitable_p): Declared.
1172 * graphite-ppl.h (value_max): New.
1174 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1176 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1177 * graphite-poly.h: Fix some comments.
1181 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1184 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1185 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1186 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1187 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1188 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1189 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1190 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1191 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1192 * graphite-clast-to-gimple.c: Same.
1193 * graphite-dependences.c: Same.
1194 * graphite-poly.c: Same.
1195 * graphite-sese-to-poly.c: Same.
1197 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1199 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1200 expressions for an IV rename, as returned by clast_to_gcc_expression.
1201 (copy_renames): Rename new_name to expr.
1202 * sese.c (debug_rename_elt): Same.
1205 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1206 the information from the rename map.
1207 (rename_variables_in_stmt): Same.
1208 (add_loop_exit_phis): Rename new_name to expr.
1209 (insert_loop_close_phis): Same.
1210 (add_guard_exit_phis): Same. Call force_gimple_operand.
1211 * sese.h (struct rename_map_elt): Rename new_name to expr.
1212 (new_rename_map_elt): Same.
1214 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1216 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1217 * sese.c (set_rename): Make it extern.
1218 * sese.h (set_rename): Declared.
1220 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-poly.c (extend_scattering): Free values.
1223 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1225 (ppl_print_powerset_matrix): Same.
1226 * graphite-scop-detection.c (free_scops_1): New.
1227 (limit_scops): Call free_scops_1.
1228 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1229 (build_poly_dr): Free PPL coefficients.
1230 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1232 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1234 * graphite-dependences.c: New.
1235 * graphite-data-ref.c: Removed.
1236 * graphite-data-ref.h: Removed.
1237 * Makefile.in (graphite-data-ref.o): Removed.
1238 (graphite-dependences.o): Added.
1239 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1240 * graphite-poly.c: Same.
1241 Move the data dependence testing to graphite-dependences.c.
1243 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1245 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1246 from graphite_cannot_represent_loop. Code refactored.
1247 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1249 2009-05-17 Li Feng <nemokingdom@gmail.com>
1251 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1252 Cover all the testcases (not only the filtered ones).
1254 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1256 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1257 unnecessary check. Update comments. Move check for REAL_TYPE here.
1258 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1259 done in (stmt_simple_for_scop_p).
1261 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1263 * graphite.c (print_global_statistics): New.
1264 (print_graphite_scop_statistic): New.
1265 (print_graphite_statistics): New.
1266 (graphite_initialize, graphite_transform_loops): Print statistics.
1267 * graphite-scop-detection (build_scops): Print statistics.
1268 (print_graphite_scop_statistics): New.
1269 (print_graphite_statistics): New.
1271 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1273 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1274 (debug_clast_name_index): Removed.
1275 (debug_clast_name_indexes_1): Removed.
1276 (debug_clast_name_indexes): Removed.
1277 (clast_name_index_elt_info): Removed.
1278 (eq_clast_name_indexes): Removed.
1279 (clast_name_to_index): Removed.
1280 (new_clast_name_index): Removed.
1281 (save_clast_name_index): Removed.
1282 (save_var_name): Moved...
1283 (init_sese_params_index): Removed.
1284 (clast_name_to_gcc): Remove use of name_tree.
1285 (initialize_cloog_names): Same.
1286 (gloog): Do not call init_sese_params_index.
1287 * graphite-sese-to-poly.c (save_var_name): ...here.
1288 (parameter_index_in_region): New.
1289 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1290 (parameter_index_in_region): Removed.
1291 (is_parameter): Remove use of name_tree.
1292 * sese.h (struct name_tree): Removed.
1293 (struct sese): Remove use of name_tree. New field params_names.
1294 (SESE_PARAMS_NAMES): New.
1295 (SESE_PARAMS): Remove duplicate.
1296 (parameter_index_in_region): Removed.
1297 (sese_nb_params): Remove use of name_tree.
1298 (struct clast_name_index): New.
1299 (new_clast_name_index): New.
1300 (clast_name_to_index): New.
1301 (save_clast_name_index): New.
1302 (debug_clast_name_index): New.
1303 (debug_clast_name_indexes_1): New.
1304 (debug_clast_name_indexes): New.
1305 (clast_name_index_elt_info): New.
1306 (eq_clast_name_indexes): New.
1308 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1310 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1311 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1312 (graphite_loop_normal_form): Do not pass region. Do not
1313 initialize SESE_OLDIVS.
1314 (build_graphite_loop_normal_form): Update call to
1315 graphite_loop_normal_form.
1316 * sese.c (debug_oldivs): Removed.
1317 (new_sese): Do not initialize SESE_OLDIVS.
1318 (free_sese): Do not free SESE_OLDIVS.
1319 (oldiv_for_loop): Removed.
1320 * sese.h (struct sese): Remove old_ivs.
1321 (SESE_OLDIVS): Removed.
1322 (oldiv_for_loop): Removed.
1324 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1326 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1327 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1328 replaced by a call to newivs_to_depth_to_newiv.
1329 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1330 (clast_to_gcc_expression_red): Same.
1331 (gcc_type_for_clast_expr): Same.
1332 (gcc_type_for_clast_eq): Same.
1333 (graphite_translate_clast_equation): Same.
1334 (graphite_create_guard_cond_expr): Same.
1335 (graphite_create_new_guard): Same.
1336 (graphite_create_new_loop): Same.
1337 (build_iv_mapping): Same.
1338 (translate_clast): Same.
1340 (loop_iv_stack_patch_for_consts): Removed. *
1341 sese.c (iv_stack_entry_is_constant): Removed.
1342 (iv_stack_entry_is_iv): Removed.
1343 (loop_iv_stack_push_iv): Removed.
1344 (loop_iv_stack_insert_constant): Removed.
1345 (loop_iv_stack_pop): Removed.
1346 (loop_iv_stack_get_iv): Removed.
1347 (loop_iv_stack_get_iv_from_name): Removed.
1348 (debug_loop_iv_stack): Removed.
1349 (free_loop_iv_stack): Removed.
1350 (loop_iv_stack_remove_constants): Removed. *
1351 sese.h (iv_stack_entry_kind): Removed.
1352 (iv_stack_entry_data_union): Removed.
1353 (iv_stack_entry_struct): Removed.
1354 (iv_stack_entry_p): Removed.
1355 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1356 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1357 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1358 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1359 (gbb_loop_at_index): Fix indenting.
1360 (gbb_loop_index): Removed.
1362 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1364 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1365 Call clast_name_to_index.
1367 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1369 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1370 do not pass params. Get params from SESE_PARAMS.
1371 (clast_to_gcc_expression): Same.
1372 (clast_to_gcc_expression_red): Same.
1373 (gcc_type_for_clast_eq): Same.
1374 (graphite_translate_clast_equation): Same.
1375 (graphite_create_new_loop): Same.
1376 * sese.c (rename_variables_in_stmt): Fix comment.
1378 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1380 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1382 Call save_clast_name_index.
1383 (translate_clast): Pass newivs_index.
1384 (gloog): Create and free newivs_index.
1386 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1388 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1389 (clast_name_index_p): New type.
1390 (debug_clast_name_index): New.
1391 (debug_clast_name_indexes_1): New.
1392 (debug_clast_name_indexes): New.
1393 (clast_name_index_elt_info): New.
1394 (eq_clast_name_indexes): New.
1395 (clast_name_to_index): New.
1396 (new_clast_name_index): New.
1397 (save_clast_name_index): New.
1398 (init_sese_params_index): New.
1399 (gloog): Call init_sese_params_index.
1400 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1401 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1402 (free_sese): Free SESE_PARAMS_INDEX.
1403 * sese.h (struct sese): Add params_index.
1404 (SESE_PARAMS_INDEX): New.
1406 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1408 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1409 (graphite_create_new_loop): Pass the newivs vector. Push the
1410 newly created IV to newivs.
1411 (translate_clast): Pass the newivs vector.
1412 (gloog): Create and destroy the newivs vector.
1414 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1416 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1417 (graphite_loop_normal_form): Initialize loop->aux with the unique
1418 IV that has been created.
1420 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1422 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1423 scev with parameters in the base part. They where forbidden
1426 2009-05-11 Li Feng <nemokingdom@gmail.com>
1428 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1429 compile options by file names.
1430 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1431 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1432 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1433 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1435 2009-05-08 Li Feng <nemokingdom@gmail.com>
1437 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1438 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1439 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1440 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1442 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1444 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1447 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1449 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1450 allow integer constant strides.
1451 (graphite_can_represent_expr): Depend on outermost_loop.
1452 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1453 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1454 build_scops_1): Same.
1455 (scopdet_basic_block_info): Same and insert layered SCoP
1457 (try_generate_gimple_bb): Cleanup.
1458 (build_scops): Enable data references.
1460 * testsuite/gcc.dg/graphite/id-5.c: New.
1461 * testsuite/gcc.dg/graphite/id-9.c: New.
1462 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1463 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1465 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1467 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1468 that we have not yet built for this SCoP.
1470 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1472 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1473 for complex numbers.
1475 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1477 * graphite-ppl.c: Fix build if cloog is not available.
1479 2009-05-04 Li Feng <nemokingdom@gmail.com>
1481 * tree-parloops.c (loop_parallel_p): Remove construction of
1482 NITER and REDUCTION_LIST.
1483 (try_get_loop_niter): New.
1484 (try_create_reduction_list): New.
1485 (parallelize_loops): Bypass the failed checkings in autopar
1486 when can_be_parallel in loop structure is set to true.
1488 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1490 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1491 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1493 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1495 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1496 Enable EQ_EXPR and NE_EXPR again.
1498 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1500 * graphite-scop-detection.c (graphite_can_represent_scev):
1501 Add check if scev is affine multivariate.
1502 (harmful_stmt_in_bb): Check if we can represent the conditions.
1503 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1505 * testsuite/gcc.dg/graphite/id-7.c: New.
1507 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1509 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1510 Check all bbs in region, not only the bbs that are represented in
1512 (build_poly_scop): Add newline.
1513 * testsuite/gcc.dg/graphite/id-8.c: New.
1515 2009-04-30 Li Feng <nemokingdom@gmail.com>
1517 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1518 when loop initialize.
1519 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1520 * common.opt: Declare flag_graphite_force_parallel.
1521 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1523 * graphite-poly.c (apply_poly_transforms): Introduce
1524 flag_graphite_force_parallel.
1525 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1526 * toplev.c (process_options): ditto and replace a not correctly
1529 2009-04-30 Li Feng <nemokingdom@gmail.com>
1531 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1532 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1533 to the redefinition.
1534 (compute_cloog_iv_types_1): ditto.
1535 (build_iv_mapping): ditto.
1536 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1538 (free_gimple_bb): Removed GBB_LOOPS related free part.
1539 (build_bb_loops): Removed.
1540 * sese.h (struct gimple_bb): Removed loops.
1541 (GBB_LOOPS): Removed.
1542 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1543 (gbb_loop_index): ditto.
1545 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1547 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1548 allow non constant strides.
1549 * testsuite/gcc.dg/graphite/scop-20.c: New.
1551 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1553 * graphite-scop-detection.c (dot_all_scops): Fix system call
1554 return value warning.
1557 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1559 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1560 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1562 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1564 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1565 build_pairwise_constraint, dr_equality_constraints,
1566 build_pairwise_scheduling_equality,
1567 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1568 build_lexicographically_gt_constraint, dependence_polyhedron,
1569 graphite_legal_transform_dr, graphite_legal_transform_bb,
1570 graphite_legal_transform): New.
1571 * graphite-poly.h (graphite_legal_transform): Declared.
1572 * graphite-sese-to-poly.c (build_poly_scop): Call to
1573 graphite_legal_transform is disabled for the moment.
1575 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1577 * graphite-poly.h (pbb_nb_scattering_dims): New.
1578 (pbb_nb_scattering): Use it.
1580 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1582 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1583 Pointset_Powerset version of ppl_insert_dimensions.
1584 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1586 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1588 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1590 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1592 * graphite-poly.h: Fix comment.
1594 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1596 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1598 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1600 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1603 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1605 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1606 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1609 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1611 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1612 handle EQ_EXPR and NE_EXPR.
1614 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1616 * graphite-poly.h (poly_dr): Fix comment.
1618 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1619 Tobias Grosser <grosser@fim.uni-passau.de>
1621 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1622 with a zero dimension polyhedron.
1623 (find_scop_parameters): Move the call to scop_set_nb_params here.
1624 (build_loop_iteration_domains): Store in loop->aux the iteration
1626 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1627 by any loop in scop.
1628 (build_poly_scop): Do not call scop_set_nb_params.
1630 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1631 Tobias Grosser <grosser@fim.uni-passau.de>
1633 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1634 add_condition_to_domain not GT_EXPR.
1636 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1638 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1639 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1640 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1641 upper_bound_assign to calculate unions.
1642 * testsuite/gcc.dg/graphite/id-6.c: New.
1644 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1646 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1647 handle abnormal edges.
1649 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1651 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1652 (free_poly_bb): Also free poly_drs.
1653 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1654 (poly_dr): Polyhedron to Pointset_Powerset.
1655 (pdr_accessp_nb_subscripts): Same.
1656 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1659 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1661 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1662 names into more meaningful names.
1664 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1666 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1667 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1669 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1671 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1673 * tree-parloops.c (rewrite_phi_with_iv): New.
1674 (rewrite_all_phi_nodes_with_iv): New.
1675 (canonicalize_loop_ivs): Call them.
1677 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1679 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1680 graphite_find_data_references_in_stmt.
1681 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1682 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1684 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1686 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1688 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1690 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1691 instead of bb_in_region.
1692 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1693 (build_sese_conditions): Use flag_bb_in_sese.
1694 * sese.c (register_bb_in_sese): Removed.
1695 (new_sese): Remove initialization of SESE_REGION_BBS.
1696 (free_sese): Do not free SESE_REGION_BBS.
1697 * sese.h (struct sese): Remove field region_basic_blocks.
1698 (SESE_REGION_BBS): Removed.
1699 (bb_in_sese_p): Implement in function of bb_in_region.
1701 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1703 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1706 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1708 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1710 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1711 (add_condition_to_domain): New.
1712 (add_condition_to_pbb): New.
1713 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1714 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1716 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1718 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1719 ppl_Pointset_Powerset.
1720 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1721 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1722 (pbb_nb_loops): Same.
1723 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1724 add_conditions_to_domain): Same.
1725 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1726 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1727 ppl_const_Polyhedron_t.
1728 (ppl_print_powerset_matrix): New.
1729 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1730 ppl_print_powerset_matrix): New.
1731 (ppl_print_polyhedron_matrix): Updated.
1733 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1735 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1737 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1739 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1740 (print_iteration_domains, debug_iteration_domain,
1741 debug_iteration_domains): New.
1742 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1743 debug_iteration_domains): Declared.
1744 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1747 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1748 Sebastian Pop <sebastian.pop@amd.com>
1750 * graphite-poly.h (print_iteration_domain): New.
1751 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1752 (build_sese_conditions_1, build_sese_conditions_after,
1753 build_sese_conditions_before): New.
1754 (build_sese_conditions): Rewritten.
1756 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1757 Tobias Grosser <grosser@fim.uni-passau.de>
1759 Cleanup of code generation liveouts.
1760 * graphite-clast-to-gimple.c (translate_clast): Use a single
1761 rename_map instead of one per translated statement.
1762 Do not use SESE_LIVEOUT_RENAMES.
1763 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1764 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1765 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1766 phi node of a reduction: when a loop contains a reduction used outside
1767 the loop, there should be a scalar close phi node on the exit block.
1768 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1769 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1770 (free_sese): Do not free them.
1771 (sese_build_liveouts_use): Do not use them.
1772 (sese_build_liveouts_bb): Same.
1773 (sese_build_liveouts): Same.
1774 (sese_insert_phis_for_liveouts): Same.
1775 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1776 (defined_in_loop_p): New.
1777 (alive_after_loop): New.
1778 (close_phi_not_yet_inserted_p): New.
1779 (struct alep, alep_p): New.
1780 (add_loop_exit_phis): Remove from the rename_map all the names defined
1781 in the code generated loop.
1782 (insert_loop_close_phis): Traverse the rename_map passed to it.
1783 Don't use SESE_LIVEOUT_RENAMES.
1784 (default_liveout_before_guard): Renamed default_before_guard.
1785 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1786 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1787 (register_sese_liveout_renames): Removed.
1788 (copy_bb_and_scalar_dependences): Do not call it.
1789 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1791 (SESE_LIVEOUT): Removed.
1792 (SESE_LIVEOUT_RENAMES): Removed.
1793 (SESE_REDUCTION_LIST): Removed.
1794 (sese_build_liveouts): Removed.
1795 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1796 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1797 (insert_guard_phis): Same.
1798 (rename_map_elt): Declare a VEC of them.
1799 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1800 trees not pointers to trees.
1802 Rewrite in canonical close SSA form:
1803 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1804 (limit_scops): Close the scop after the block containing the close phi
1806 (canonicalize_loop_closed_ssa): New.
1807 (canonicalize_loop_closed_ssa_form): New.
1808 (build_scops): Call canonicalize_loop_closed_ssa_form.
1810 * graphite-sese-to-poly.c: Fix typos.
1812 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1814 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1816 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1817 (print_pbb): Add conditions.
1819 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1820 Sebastian Pop <sebastian.pop@amd.com>
1822 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1823 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1824 (build_scop_bbs_1): New.
1825 (build_scop_bbs): Rewrite.
1826 * sese.h (bb_in_region): New.
1828 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1830 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1832 (print_scop): Style.
1833 * graphite-poly.h (poly_bb): Add drs vector.
1834 (PBB_DRS): Add accessor.
1835 * graphite-sese-to-poly.c (build_poly_dr): New.
1836 (build_pbb_drs, build_scop_drs): New.
1837 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1839 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1841 * tree-ssa-loop.c: Include forgotten toplev.h
1843 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1845 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1846 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1847 * testsuite/gcc.dg/graphite/pr37928.c: Same
1848 * testsuite/gcc.dg/graphite/pr38409.c: Same
1849 * testsuite/gcc.dg/graphite/pr38498.c: Same
1850 * testsuite/gcc.dg/graphite/pr38559.c: Same
1851 * testsuite/gcc.dg/graphite/pr39335.c: Same
1852 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1853 * testsuite/gfortran.dg/graphite/block-2.f: Same
1854 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1857 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1859 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1860 build_access_matrix, build_scop_data_accesses): Remove access function
1861 building. (We get a new version soon).
1862 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1863 * sese.h (nb_loops_around_loop_in_sese): Remove.
1864 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1866 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1867 Sebastian Pop <sebastian.pop@amd.com>
1869 * graphite-scop-detection.c (struct scopdet_info): Rename last
1871 (scopdet_basic_block_info, build_scops_1): Don't use
1872 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1874 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1875 Sebastian Pop <sebastian.pop@amd.com>
1877 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1878 * sese.c (sese_build_liveouts_use): Renamed from
1879 sese_build_livein_liveouts_use. Remove liveins.
1880 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1881 Call sese_build_liveouts_use.
1882 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1883 Call sese_build_liveouts_bb.
1884 (new_sese, free_sese): Remove liveins.
1885 (sese_add_exit_phis_var): Deleted.
1886 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1888 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1890 * sese.h (sese): Remove num_ver and livein.
1891 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1893 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1895 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1897 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1899 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1900 (build_scop_scattering): Do not use compare_prefix_loops any more.
1901 (nb_common_loops): New.
1903 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1905 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1906 (register_old_and_new_names): Renamed set_rename.
1908 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1910 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1911 of the decl from the previous commit.
1913 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1915 * graphite-scop-detection.c (dot_scop): New.
1916 * graphite-scop-detection.h (dot_scop): Declared.
1918 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1920 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1922 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1924 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1925 condition at the end of the loop.
1926 * graphite.c (graphite_initialize, graphite_finalize): Print to
1927 dump_file the compiled function.
1928 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1929 of create_empty_loop_on_edge.
1930 (translate_clast): Update the code generation of loops for the new
1932 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1934 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1936 Reverted the patch from 2009-03-19.
1938 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1940 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1942 (print_scop): Style.
1943 * graphite-poly.h (poly_bb): Add drs vector.
1944 (PBB_DRS): Add accessor.
1945 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1946 (build_access_matrix_with_af, build_access_matrix,
1947 build_scop_data_accesses): Delete.
1948 (build_poly_dr): New.
1949 (build_pbb_drs, build_scop_drs): New.
1950 (build_poly_scop): call build_scop_drs.
1952 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1954 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1955 once per basic block.
1957 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1959 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1960 (graphite_can_represent_expr): Renamed from loop_affine_expr
1962 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1963 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1964 (scopdet_basic_block_info): Actually define entry_block.
1965 (stmt_simple_memref_p): Moved here from ...
1967 * tree-data-ref.c (stmt_simple_memref_p): here.
1968 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1970 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1972 * testsuite/gcc.dg/graphite/id-4.c: New.
1974 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1976 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
1977 (register_old_and_new_names): Update the content of the map.
1978 When there was already a rename_map_elt in the map at that
1980 (copy_bb_and_scalar_dependences): Do rename_variables after
1981 expand_scalar_variables.
1982 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
1983 of the map. When there was already a rename_map_elt in the
1984 map at that location, free it.
1985 (translate_clast): Pass the rename_map. Do not initialize and free
1986 a rename_map per stmt_user.
1987 (gloog): Initialize and free one rename_map and pass it to
1990 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1992 * sese.c (expand_scalar_variables_stmt,
1993 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
1995 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
1996 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
1997 the gimple_stmt_iterator of the statement to be expanded.
1998 * graphite-scop-detection.c (is_simple_operand): Do handle
2001 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2003 * graphite-scop-detection.c (is_simple_operand): Do not handle
2005 * testsuite/gcc.dg/graphite/id-2.c: New.
2007 * graphite-sese-to-poly.c (build_bb_loops,
2008 add_value_to_dim, scan_tree_for_params_right_scev,
2009 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2010 find_params_in_bb, build_loop_iteration_domains,
2011 add_conditions_to_domain): Remove subtract.
2013 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2015 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2016 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2017 pbb_loop_at_index -> gbb_loop_at_index.
2018 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2019 (debug_loop_vec): Delete.
2020 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2021 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2022 (PBB_LOOPS): Removed.
2023 (PBB_BLACK_BOX): Insert cast.
2024 (pbb_set_black_box): New setter.
2025 (pbb_loop_at_index, pbb_loop_index): Removed.
2026 (scop_set_region, scop_set_nb_params): New.
2027 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2028 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2029 (build_poly_scop): Use scop_set_nb_params.
2030 * sese.h (gimple_bb): Add LOOPS.
2031 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2033 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2035 Revert previous commit.
2037 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2039 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2040 (register_old_and_new_names): Update the content of the map.
2041 When there was already a rename_map_elt in the map at that
2043 (copy_bb_and_scalar_dependences): Do rename_variables after
2044 expand_scalar_variables.
2045 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2046 of the map. When there was already a rename_map_elt in the
2047 map at that location, free it.
2048 (translate_clast): Pass the rename_map. Do not initialize and free
2049 a rename_map per stmt_user.
2050 (gloog): Initialize and free one rename_map and pass it to
2053 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2055 Remove forgotten line in revert.
2057 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2059 Revert previous commit.
2061 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2063 * sese.c (register_old_and_new_names): Update the content
2064 of the map. When there was already a rename_map_elt in the
2065 map at that location, free it.
2066 (copy_bb_and_scalar_dependences): Do rename_variables after
2067 expand_scalar_variables.
2068 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2069 of the map. When there was already a rename_map_elt in the
2070 map at that location, free it.
2071 (translate_clast): Pass the rename_map. Do not initialize and free
2072 a rename_map per stmt_user.
2073 (gloog): Initialize and free one rename_map and pass it to
2076 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2078 * graphite-clast-to-gimple.c (translate_clast): context_loop
2081 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2082 Sebastian Pop <sebastian.pop@amd.com>
2084 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2085 of the use of ppl_Polyhedron_map_space_dimensions.
2087 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2088 Sebastian Pop <sebastian.pop@amd.com>
2090 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2091 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2092 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2093 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2094 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2095 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2096 pbb_nb_params): New.
2097 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2098 nb_loops_around_pbb): Adapt return types.
2100 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2102 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2103 graphite-clast-to-gimple.o, graphite-data-ref.o,
2104 graphite-scop-detection.o, graphite-poly.o): Add
2107 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2109 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2110 graphite-clast-to-gimple.o, graphite-data-ref.o,
2111 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2113 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2115 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2116 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2117 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2118 * testsuite/gcc.dg/graphite/block-0.c: Same.
2119 * testsuite/gcc.dg/graphite/block-1.c: Same.
2120 * testsuite/gcc.dg/graphite/block-2.c: Same.
2121 * testsuite/gcc.dg/graphite/block-3.c: Same.
2122 * testsuite/gcc.dg/graphite/block-4.c: Same.
2123 * testsuite/gcc.dg/graphite/block-5.c: Same.
2124 * testsuite/gcc.dg/graphite/block-6.c: Same.
2125 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2126 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2127 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2128 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2129 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2130 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2131 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2132 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2133 * opts.c: Remove -floop-block from -O2.
2134 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2135 -floop-strip-mine are used.
2137 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2138 Sebastian Pop <sebastian.pop@amd.com>
2140 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2142 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2143 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2144 strip_mine_profitable_p, is_interchange_valid,
2145 graphite_trans_bb_block, graphite_trans_loop_block,
2146 graphite_trans_scop_block): Temporary removed.
2147 (extend_scattering, unify_scattering_dimensions): New.
2148 (print_scattering_function, graphite_read_transforms):
2149 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2150 (graphite_generate_scattering_fns): Removed.
2151 (apply_poly_transforms): Cleanup.
2152 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2153 (schedule_to_scattering): Moved.
2154 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2155 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2156 (pbb_nb_scattering): New.
2157 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2158 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2160 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2162 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2163 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2164 -> PBB_TRANSFORMED_SCATTERING.
2165 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2166 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2167 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2168 (check_poly_representation): Do not return bool.
2169 (graphite_transform_loops): Reformat.
2170 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2172 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2174 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2175 debug_pbb_domain, debug_pbb, debug_scop): New.
2176 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2177 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2179 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2182 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2183 when the type precision of the induction variable should be
2184 larger than the type precision of nit.
2185 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2186 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2187 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2189 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2190 * testsuite/gcc.dg/graphite/pr39335.c: New.
2192 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2194 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2195 SSA_NAMES not struct reduction_info.
2197 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2199 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2201 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2202 Tobias Grosser <grosser@fim.uni-passau.de>
2204 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2205 (free_sese): Free SESE_REDUCTION_LIST.
2206 * sese.h (struct sese): Add field reduction_list.
2207 (SESE_REDUCTION_LIST): New.
2208 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2209 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2211 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2212 Tobias Grosser <grosser@fim.uni-passau.de>
2214 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2217 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2218 Tobias Grosser <grosser@fim.uni-passau.de>
2220 * tree-parloops.c (struct brli, build_reduction_list_info,
2221 analyze_reduction_list, gather_scalar_reductions): New.
2222 (loop_parallel_p): Build a reduction list containing only
2223 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2224 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2225 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2226 * tree-flow.h (gather_scalar_reductions): Declared.
2228 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2231 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2232 number_of_iterations_exit from a gcc_assert.
2234 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2235 Jan Sjodin <jan.sjodin@amd.com>
2237 * output.h (graphite_out_file, graphite_in_file): Declared.
2238 * toplev.c (graphite_out_file, graphite_in_file): New.
2239 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2240 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2241 Don't call schedule_to_scattering.
2242 * common.opt (fgraphite-write, fgraphite-read): New.
2243 * graphite-poly.c: Include output.h.
2244 (print_scattering_function, print_scattering_functions,
2245 debug_scattering_function, debug_scattering_functions,
2246 graphite_write_transforms, graphite_read_transforms,
2247 graphite_generate_scattering_fns): New.
2248 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2249 Call graphite_generate_scattering_fns, graphite_write_transforms,
2250 graphite_read_transforms.
2251 (new_poly_bb): Initialize PBB_SCATTERING.
2252 (free_poly_bb): Free PBB_SCATTERING.
2253 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2254 * graphite-poly.h (struct poly_bb): Add field scattering.
2255 (PBB_SCATTERING): New.
2256 (print_scattering_function, print_scattering_functions,
2257 debug_scattering_function, debug_scattering_functions): Declared.
2258 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2259 GMP values, not integers!
2260 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2261 ppl_read_polyhedron_matrix): New.
2262 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2263 debug_ppl_polyhedron_matrix,
2264 ppl_read_polyhedron_matrix): Declared.
2265 * Makefile.in (graphite-poly.o): Depends on output.h.
2267 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2268 Tobias Grosser <grosser@fim.uni-passau.de>
2271 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2272 scalar evolutions in the scop_entry->loop_father.
2274 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2275 Tobias Grosser <grosser@fim.uni-passau.de>
2277 * graphite.h (ref_nb_loops): Remove declaration.
2278 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2279 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2280 debug_gbb): Moved to sese.h.
2283 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2284 Tobias Grosser <grosser@fim.uni-passau.de>
2286 * graphite-data-ref.[ch]: Disable.
2288 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2289 Tobias Grosser <grosser@fim.uni-passau.de>
2291 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2292 scalar evolutions in the scop_entry->loop_father.
2294 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2296 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2297 (graphite_cannot_represent_loop_niter): Renamed
2298 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2299 (limit_scops): build_sese_loop_nests does not return a bool.
2300 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2301 * sese.c (nb_reductions_in_loop): ... from here.
2302 (graphite_loop_normal_form): ... from here.
2303 (sese_record_loop): Does not fail, so does not return a bool.
2304 (build_sese_loop_nests): Same.
2305 * sese.h (build_sese_loop_nests): Update declaration.
2306 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2307 (build_graphite_loop_normal_form): New.
2308 (gloog): Call build_graphite_loop_normal_form.
2309 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2310 build_sese_loop_nests.
2312 * testsuite/gcc.dg/graphite/id-1.c: New.
2314 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2315 Tobias Grosser <grosser@fim.uni-passau.de>
2317 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2318 The SCoP detection fix is sufficient.
2320 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2322 PR tree-optimization/39260
2323 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2324 the basic block contains a condition with a real type.
2325 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2327 * gcc.dg/graphite/pr39260.c: New.
2329 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2331 * graphite-poly.c: Inlcude params.h.
2332 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2334 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2335 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2337 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2338 Tobias Grosser <grosser@fim.uni-passau.de>
2340 * graphite-scop-detection.c (dot_all_scops_1,
2341 dot_all_scops): Moved here.
2342 * graphite-scop-detection.h (dot_all_scops): Declared here.
2343 * graphite.c (graphite_initialize, graphite_finalize): New.
2344 (graphite_transform_loops): Cleaned up.
2345 * sese.c (debug_oldivs): Moved here.
2346 * graphite-poly.c (graphite_apply_transformations): Renamed
2347 apply_poly_transforms.
2348 (debug_loop_vec): Moved here.
2349 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2350 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2351 find_scop_parameters, build_scop_iteration_domain,
2352 add_conditions_to_constraints, build_scop_canonical_schedules,
2353 build_scop_data_accesses): Now static.
2354 (build_poly_scop, check_poly_representation): New.
2356 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2358 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2359 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2360 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2361 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2362 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2363 scan_tree_for_params, struct irp_data, dx_record_params,
2364 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2365 build_loop_iteration_domains, add_conditions_to_domain,
2366 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2367 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2368 build_sese_conditions, add_conditions_to_constraints,
2369 build_scop_iteration_domain, build_access_matrix_with_af,
2370 build_access_matrix,
2371 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2373 * graphite-sese-to-poly.c: New.
2374 * graphite-sese-to-poly.h: New.
2376 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2378 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2380 * graphite.c: Split graphite code generation to a new file.
2381 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2382 max_precision_type, clast_to_gcc_expression_red,
2383 clast_to_gcc_expression, gcc_type_for_clast_expr,
2384 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2385 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2386 graphite_create_new_guard, clast_get_body_of_loop,
2387 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2388 graphite_create_new_loop, build_iv_mapping, copy_renames,
2389 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2390 compute_cloog_iv_types, free_scattering, save_var_name,
2391 initialize_cloog_names, build_scop_context, build_cloog_prog,
2392 set_cloog_options, debug_clast_stmt, scop_to_clast,
2393 print_generated_program, debug_generated_program,
2394 gloog): Moved to graphite-clast-to-gimple.c.
2396 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2398 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2399 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2400 loop_iv_stack_pop, loop_iv_stack_get_iv,
2401 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2402 free_loop_iv_stack, loop_iv_stack_remove_constants,
2403 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2404 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2405 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2406 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2407 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2408 get_vdef_before_sese, sese_adjust_vphi,
2409 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2410 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2411 is_iv, expand_scalar_variables_ssa_name,
2412 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2413 expand_scalar_variables, rename_variables, remove_condition,
2414 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2415 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2416 default_liveout_before_guard, add_guard_exit_phis,
2417 insert_guard_phis, register_old_and_new_names,
2418 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2419 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2420 if_region_set_false_region, create_if_region_on_edge,
2421 move_sese_in_condition): Moved to sese.c.
2423 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2424 if_region_exit, if_region_get_condition_block,
2425 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2426 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2427 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2428 ivtype_map_elt, new_ivtype_map_elt,
2429 recompute_all_dominators): Moved to sese.h.
2431 * graphite-clast-to-gimple.c: New.
2432 * graphite-clast-to-gimple.h: New.
2433 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2434 * sese.c: Modified as said above.
2437 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2439 * graphite.c: Split scop detection to a new file.
2440 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2441 move_sd_regions, loop_affine_expr, exclude_component_ref,
2442 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2443 graphite_cannot_represent_loop_niter, struct scopdet_info,
2444 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2445 find_single_entry_edge, find_single_exit_edge,
2446 create_single_entry_edge, sd_region_without_exit,
2447 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2448 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2449 Moved to graphite-scop-detection.c.
2451 * graphite-scop-detection.c: New.
2452 * graphite-scop-detection.h: New.
2453 * Makefile.in: Add new rule for graphite-scop-detection.o.
2455 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2456 tree-scalar-evolution.h.
2457 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2458 build_sese_loop_nests): Moved here from graphite.c.
2459 (param_index): Renamed parameter_index_in_region.
2461 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2462 Sebastian Pop <sebastian.pop@amd.com>
2464 * gcc.dg/graphite/block-0.c: Expected to fail now.
2465 * gcc.dg/graphite/block-1.c: Same.
2466 * gcc.dg/graphite/block-5.c: Same.
2467 * gcc.dg/graphite/block-6.c: Same.
2469 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2470 Sebastian Pop <sebastian.pop@amd.com>
2472 * graphite.h: Separate from graphite_bb_p the polyhedral
2473 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2474 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2475 graphite-data-ref.h.
2476 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2477 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2478 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2479 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2480 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2481 scop_nb_params): Moved to graphite-poly.h.
2482 * graphite-data-ref.c: Same.
2483 * graphite-data-ref.h: New.
2485 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2486 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2487 is_interchange_valid, graphite_trans_bb_block,
2488 graphite_trans_loop_block, scop_max_loop_depth,
2489 graphite_trans_scop_block, graphite_apply_transformations,
2490 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2492 * graphite-poly.h: New.
2493 * graphite-poly.c: New.
2494 * Makefile.in (OBJS-common): Add graphite-poly.o.
2495 (graphite-poly.o): New rule.
2496 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2499 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2500 Tobias Grosser <grosser@fim.uni-passau.de>
2502 * graphite.c: Replace gb -> gbb.
2504 * graphite-data-ref.c: Same.
2506 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2507 Tobias Grosser <grosser@fim.uni-passau.de>
2509 * Makefile.in (OBJS-commmon): Add sese.o.
2511 (graphite.o): Add sese.h.
2512 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2513 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2514 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2516 (block_before_scop): Add missing return.
2517 (new_scop, free_scop): Remove SESE data structures.
2518 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2519 find_scop_parameters, build_loop_iteration_domains,
2520 add_conditions_to_domain, register_scop_liveout_renames,
2521 copy_bb_and_scalar_dependences): Scop -> SESE.
2523 (add_conditions_to_domain): SCoP -> SESE and remove check
2524 (scop_contains_non_iv_scalar_phi_nodes): New.
2525 (build_scop_conditions_1, build_scop_conditions): Remove check for
2526 non iv scalar phi nodes.
2527 (print_scop_statistics): New.
2528 (graphite_transform_loops): Cleanup.
2530 * graphite.h: Move to sese & cleanup.
2534 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2535 Tobias Grosser <grosser@fim.uni-passau.de>
2537 * graphite.c (build_scop_conditions_1): Conditions are only
2538 at the end of a basic block.
2540 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2541 Tobias Grosser <grosser@fim.uni-passau>
2543 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2545 (GBB_ALPHA): Removed.
2547 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2548 Tobias Grosser <grosser@fim.uni-passau.de>
2550 * graphite-data-ref.c (graphite_test_dependence): Don't use
2551 GBB_DYNAMIC_SCHEDULE.
2552 * graphite.c (new_graphite_bb): Same.
2553 (free_graphite_bb): Same.
2554 (build_scop_dynamic_schedules): Removed.
2555 (graphite_transform_loops): Don't call it.
2556 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2557 (GBB_DYNAMIC_SCHEDULE): Removed.
2559 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2560 Tobias Grosser <grosser@fim.uni-passau.de>
2562 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2563 (print_graphite_bb): Same.
2564 (build_cloog_prog): Same.
2566 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2567 Tobias Grosser <grosser@fim.uni-passau.de>
2569 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2571 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2572 Tobias Grosser <grosser@fim.uni-passau.de>
2574 * graphite.c (build_scop_context): Don't use CloogMatrix.
2575 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2576 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2578 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2579 Tobias Grosser <grosser@fim.uni-passau.de>
2581 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2582 liveout_renames, add_params fields...
2583 (struct sese): ... here.
2584 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2585 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2587 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2588 Tobias Grosser <grosser@fim.uni-passau.de>
2590 * graphite.c (print_scop): Do not print the CLooG program.
2591 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2592 build_cloog_prog, gloog): Don't use SCOP_PROG.
2593 (find_transform): Renamed scop_to_clast.
2594 (print_generated_program, debug_generated_program): New.
2595 (graphite_transform_loops): Adapt to new interface.
2596 * graphite.h (struct scop): Remove program field.
2597 (SCOP_PROG): Removed.
2598 (print_generated_program, debug_generated_program): Declared.
2600 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2602 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2603 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2604 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2605 free_graphite_bb, build_scop_canonical_schedules,
2606 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2607 schedules are now represented using a ppl_Linear_Expression_t.
2608 * graphite.h (struct graphite_bb): Same.
2609 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2610 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2612 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2614 * graphite.c: Free local memory.
2615 * graphite-ppl.c: Same.
2617 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2619 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2620 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2621 swap_constraint_variables, scale_constraint_variable): Removed.
2622 (graphite_trans_bb_strip_mine): Remove pong.
2623 * graphite-ppl.c: Include missing header files.
2624 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2625 * graphite-ppl.h (ppl_strip_loop): Declared.
2626 * Makefile.in (graphite-ppl.o): Adjust dependences.
2628 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2630 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2631 (build_scop_iteration_domain): Same.
2633 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2635 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2637 (add_value_to_dim, scan_tree_for_params_right_scev,
2638 scan_tree_for_params_int): New.
2639 * graphite-ppl.c (oppose_constraint): New.
2640 (insert_constraint_into_matrix): Implement missing cases.
2641 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2643 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2645 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2646 use ppl_move_dimension.
2648 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2650 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2653 * graphite-ppl.c: Same.
2654 * graphite-ppl.h: Same.
2656 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2658 Revert last 3 commits.
2660 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2662 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2664 (add_value_to_dim, scan_tree_for_params_right_scev,
2665 scan_tree_for_params_int): New.
2666 * graphite-ppl.c (oppose_constraint): New.
2667 (insert_constraint_into_matrix): Implement missing cases.
2668 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2670 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2672 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2674 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2675 Tobias Grosser <grosser@fim.uni-passau.de>
2677 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2678 use ppl_move_dimension.
2679 * graphite-ppl.c (ppl_move_dimension): New.
2680 * graphite-ppl.h (ppl_move_dimension): Declared.
2682 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2684 * graphite.c: Do not include cloog/cloog.h.
2685 (print_graphite_bb): Remove ping pong, call PPL print function.
2687 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2689 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2690 (graphite.o): Add dependence on graphite-ppl.h.
2691 (graphite-ppl.o): New.
2692 (graphite-data-ref.c): Ping pong between PPL data structures
2694 * graphite-ppl.c: New.
2695 * graphite-ppl.h: New.
2696 * graphite.c: Include graphite-ppl.h.
2697 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2698 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2699 Ping pong between PPL data structures and matrices.
2700 (new_graphite_bb): Create a PPL constraint system.
2701 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2702 (build_loop_iteration_domains): Use PPL functions.
2703 * graphite.h: Include graphite-ppl.h. Fix comments.
2704 (graphite_bb): Use a ppl_Constraint_System_t instead of
2705 CloogMatrix for representing the domain.
2706 (scop): Remove static_schedule.
2707 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2709 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2711 * graphite.c: Fix some comments.
2713 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2716 * graphite.c (if_region_set_false_region): After moving a region
2717 in the false branch of a condition, remove the empty dummy
2719 (gloog): Remove wrong fix for PR38953.
2721 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2723 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2724 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2725 register_bb_in_sese, new_sese, free_sese): Moved.
2726 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2727 outermost_loop_in_scop, build_scop_iteration_domain,
2728 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2729 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2730 Use loop_in_sese_p instead of loop_in_scop_p.
2731 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2732 (free_scop): Do not free SCOP_BBS_B.
2733 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2734 ref_nb_loops): Moved here...
2735 * graphite.h (ref_nb_loops): ... from here.
2736 (struct scop): Remove bbs_b bitmap.
2737 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2738 * testsuite/gcc.dg/graphite/scop-19.c: New
2740 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2742 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2745 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2747 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2748 eq_loop_to_cloog_loop): Remove.
2749 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2750 * graphite.h (struct scop): Remove loop2cloog_loop.
2751 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2753 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2755 * opts.c (decode_options): Only add graphite options to O2
2756 if we compile with graphite enabled.
2758 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2760 * Merge from mainline (r143163:143684).
2762 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2764 * graphite.c (debug_value): Removed.
2765 * graphite.h (debug_value): Removed.
2767 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2769 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2770 after graphite: pass_copy_prop does not maintain a proper loop closed
2771 SSA form. pass_copy_prop should be fixed.
2773 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2775 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2777 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2779 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2780 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2781 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2784 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2786 * graphite.c (gloog): Return true when code gen succeeded.
2787 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2788 the code of the function did not changed. After cleanup_tree_cfg
2789 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2792 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2794 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2795 gimple_call_lhs is NULL.
2797 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2798 Tobias Grosser <tobi.grosser@amd.com>
2800 * graphite.c (graphite_trans_scop_block): Do not block single
2803 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2804 Tobias Grosser <tobi.grosser@amd.com>
2806 * graphite.c (build_scop_canonical_schedules): Start schedules at
2809 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2810 Tobias Grosser <tobi.grosser@amd.com>
2812 * graphite.c (compare_prefix_loops): New.
2813 (build_scop_canonical_schedules): Rewritten.
2814 (graphite_transform_loops): Move build_scop_canonical_schedules
2815 after build_scop_iteration_domain.
2817 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2818 Tobias Grosser <tobi.grosser@amd.com>
2820 * graphite.c (add_conditions_to_domain): Add the loops to
2821 the dimension of the iteration domain. Do copy the domain
2822 only when it exists.
2823 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2824 (add_conditions_to_constraints): New.
2825 (can_generate_code_stmt, can_generate_code): Removed.
2826 (gloog): Do not call can_generate_code.
2827 (graphite_transform_loops): Call add_conditions_to_constraints
2828 after building the iteration domain.
2830 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2831 Tobias Grosser <tobi.grosser@amd.com>
2832 Jan Sjodin <jan.sjodin@amd.com>
2834 * graphite.c (scan_tree_for_params): On substractions negate
2835 all the coefficients of the term.
2836 (clast_to_gcc_expression_red): New. Handle reduction expressions
2837 of more than two operands.
2838 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2839 (get_vdef_before_scop): Handle also the case of default definitions.
2841 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2844 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2845 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2846 (gloog): Do not call cleanup_tree_cfg.
2847 (graphite_transform_loops): Call cleanup_tree_cfg after all
2848 scops have been code generated.
2850 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2852 * passes.c (init_optimization_passes): Schedule after
2853 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2855 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2857 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2859 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2860 Set the type of an expression to the type of its assign statement.
2861 (expand_scalar_variables_expr): Do not pass loop_p.
2862 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2863 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2864 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2866 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2868 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2869 an expression to the gimple_expr_type of its assign statement.
2870 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2873 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2875 PR tree-optimization/38786
2876 * testsuite/gcc.dg/graphite/pr38786.c: New.
2877 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2878 the SSA_NAME case of expand_scalar_variables_expr.
2879 (expand_scalar_variables_expr): Also gather the scalar computation
2880 used to index the memory access.
2881 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2882 the gimple_stmt_iterator where it inserts new code.
2884 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2886 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2888 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2890 * opts.c (decode_options): Enable flag_graphite_identity and
2891 flag_loop_block in -O2 and above.
2893 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2895 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2896 Fix merge problem: replace with the file from trunk.
2898 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2900 * Merge from mainline (r141727:143163).
2902 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2903 Jan Sjodin <jan.sjodin@amd.com>
2905 PR tree-optimization/38559
2906 * testsuite/gcc.dg/graphite/pr38559.c: New.
2908 * graphite.c (debug_value, copy_constraint,
2909 swap_constraint_variables, scale_constraint_variable, ): New.
2910 (get_lower_bound, get_upper_bound): Removed.
2911 (graphite_trans_bb_strip_mine): Clean up this code that works
2912 only for constant number of iterations. Fully copy upper and
2913 lower bound constraints, not only the constant part of them.
2914 * graphite.h (debug_value): Declared.
2916 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2918 PR tree-optimization/38492
2919 PR tree-optimization/38498
2920 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2921 * tree-chrec.h (scev_is_linear_expression): Declared.
2922 * graphite.c (graphite_cannot_represent_loop_niter): New.
2923 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2924 (graphite_loop_normal_form): Use gcc_assert.
2925 (scan_tree_for_params): Use CASE_CONVERT.
2926 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2927 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2928 Use gcc_assert. Discard scops that contain unhandled cases.
2929 (build_scop_conditions): Return a boolean status for unhandled cases.
2930 (strip_mine_profitable_p): Print the loop number, not its depth.
2931 (is_interchange_valid): Pass the depth of the loop nest, don't
2932 recompute it wrongly.
2933 (graphite_trans_bb_block): Same.
2934 (graphite_trans_bb_block): Print tentative of loop blocking.
2935 (graphite_trans_scop_block): Do not print that the loop has been
2937 (graphite_transform_loops): Do not handle scops that contain condition
2940 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2942 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2943 * testsuite/gcc.dg/graphite/block-1.c: Same.
2944 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2946 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2947 * testsuite/gcc.dg/graphite/block-3.c: New.
2948 * testsuite/gcc.dg/graphite/pr38498.c: New.
2950 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2952 PR tree-optimization/38510
2953 * gcc.dg/graphite/pr38510.c: New.
2954 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2955 (translate_clast): Call recompute_all_dominators before
2957 (gloog): Call recompute_all_dominators before graphite_verify.
2959 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2961 PR tree-optimization/38492
2962 * graphite.c (rename_map_elt, debug_rename_elt,
2963 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2964 rename_map_elt_info, eq_rename_map_elts,
2965 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2966 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2967 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2968 (sese_build_livein_liveouts): New.
2969 (new_sese, free_sese): New.
2970 (new_scop): Call new_sese.
2971 (free_scop): Call free_sese.
2972 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2973 (register_old_new_names): Renamed register_old_and_new_names.
2974 (register_scop_liveout_renames, add_loop_exit_phis,
2975 insert_loop_close_phis, struct igp,
2976 default_liveout_before_guard, add_guard_exit_phis,
2977 insert_guard_phis, copy_renames): New.
2978 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
2979 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
2980 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
2981 (scop_adjust_phis_for_liveouts): New.
2982 (gloog): Call scop_adjust_phis_for_liveouts.
2984 * graphite.h (struct sese): Documented. Added fields liveout,
2986 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
2987 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
2988 (struct scop): Added field liveout_renames.
2989 (SCOP_LIVEOUT_RENAMES): New.
2991 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2993 PR tree-optimization/38409
2994 * gcc.dg/graphite/pr38409.c: New.
2995 * graphite.c (nb_reductions_in_loop): Use simple_iv.
2997 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
2999 * graphite.c (gcc_type_for_cloog_iv): By default return
3001 (graphite_create_new_loop): Don't fold_convert the already
3002 fold_convert-ed expression.
3004 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3006 PR tree-optimization/38446
3007 * gcc.dg/graphite/pr38446.c: New.
3008 * graphite.c (register_bb_in_sese): New.
3009 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3010 looking at the bbs in the region.
3011 * graphite.h (sese): Add region_basic_blocks pointer set to
3012 structure and initialize at the time of defining new scop.
3014 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3016 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3017 (find_params_in_bb): Do not free data refs.
3018 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3020 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3022 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3023 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3024 * testsuite/gcc.dg/graphite/block-5.c: New.
3025 * testsuite/gcc.dg/graphite/block-6.c: New.
3026 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3027 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3028 * testsuite/gcc.dg/graphite/block-2.c: Same.
3030 * graphite.c (struct ivtype_map_elt): New.
3031 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3032 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3033 gcc_type_for_cloog_iv): New.
3034 (loop_iv_stack_patch_for_consts): Use the type of the induction
3035 variable from the original loop, except for the automatically
3036 generated loops, i.e., in the case of a strip-mined loop, in
3037 which case there is no original loop: in that case just use
3039 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3040 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3041 (clast_name_to_gcc): Accept params to be NULL.
3042 (clast_to_gcc_expression): Take an extra parameter for the type.
3043 Convert to that type all the expressions built by this function.
3044 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3045 (graphite_translate_clast_equation): Compute the type of the
3046 clast_equation before translating its LHS and RHS.
3047 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3048 (graphite_create_new_loop): Compute the type of the induction
3049 variable before translating the lower and upper bounds and before
3050 creating the induction variable.
3051 (rename_variables_from_edge, rename_phis_end_scop): New.
3052 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3053 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3054 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3055 compute_cloog_iv_types): New.
3056 (gloog): Call compute_cloog_iv_types before starting the
3057 translation of the clast.
3059 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3060 (GBB_CLOOG_IV_TYPES): New.
3061 (debug_ivtype_map): Declared.
3062 (oldiv_for_loop): New.
3064 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3067 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3068 (param_index): Assert if parameter is not know after parameter
3070 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3071 (find_scop_parameters): Mark, that we have finished parameter
3073 (graphite_transform_loops): Move condition detection before parameter
3075 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3076 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3078 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3080 * graphite.c (graphite_transform_loops): Always call find_transform ()
3081 in ENABLE_CHECKING. So we test these code paths, even if we do not
3084 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3086 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3087 (print_scop): Ditto.
3089 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3092 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3093 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3094 regions more than once.
3096 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3098 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3099 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3102 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3104 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3105 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3106 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3107 (max_precision_type): New.
3108 (value_clast): Removed.
3109 (clast_to_gcc_expression): Be more careful to types of expressions.
3110 Use max_precision_type and update use of gmp_cst_to_tree.
3111 (graphite_translate_clast_equation): Use max_precision_type.
3112 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3113 use the type of the condition.
3114 (graphite_create_new_loop): Do not use integer_type_node, use the
3115 max_precision_type of lb and ub.
3117 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3119 * graphite.c (build_scops_1): Initialize open_scop.exit
3122 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3124 * testsuite/gcc.dg/graphite/pr38084.c: New.
3125 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3126 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3127 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3128 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3129 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3131 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3132 Jan Sjodin <jan.sjodin@amd.com>
3133 Harsha Jagasia <harsha.jagasia@amd.com>
3145 * testsuite/gcc.dg/graphite/pr38073.c: New.
3146 * testsuite/gcc.dg/graphite/pr37928.c: New.
3147 * testsuite/gcc.dg/graphite/pr37883.c: New.
3148 * testsuite/gcc.dg/graphite/pr38125.c: New.
3149 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3150 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3151 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3153 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3154 the number of detected scops. Copy exact same test for loop
3156 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3157 loops to be blocked as reductions are not handled.
3158 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3160 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3161 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3163 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3164 * Makefile.in (graphite.o): Depend on value-prof.h.
3165 (graphite.o-warn): Removed -Wno-error.
3166 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3167 to be a NULL pointer. Call update_stmt. Return the newly created
3168 cannonical induction variable.
3170 * graphite.h (debug_rename_map): Declared. Fix some comments.
3172 * graphite.c: Reimplement the code generation from graphite to gimple.
3173 Include value-prof.h.
3174 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3175 (get_old_iv_from_ssa_name): Removed.
3176 (graphite_stmt_p): New.
3177 (new_graphite_bb): Test for useful statements before building a
3178 graphite statement for the basic block.
3179 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3180 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3182 (recompute_all_dominators, graphite_verify,
3183 nb_reductions_in_loop, graphite_loop_normal_form): New.
3184 (scop_record_loop): Call graphite_loop_normal_form.
3185 (build_scop_loop_nests): Iterate over all the blocks of the
3186 function instead of relying on the incomplete information from
3187 SCOP_BBS. Return the success of the operation.
3188 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3189 (add_bb_domains): Removed.
3190 (build_loop_iteration_domains): Don't call add_bb_domains.
3191 Add the iteration domain only to the basic blocks that have been
3192 translated to graphite.
3193 (build_scop_conditions_1): Add constraints only if the basic
3194 block have been translated to graphite.
3195 (build_scop_data_accesses): Completely disabled until data
3196 dependence is correctly implemented.
3197 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3198 (remove_all_edges_1, remove_all_edges): Removed.
3199 (get_new_name_from_old_name): New.
3200 (graphite_rename_variables_in_stmt): Renamed
3201 rename_variables_in_stmt. Call get_new_name_from_old_name.
3202 Use replace_exp and update_stmt.
3203 (is_old_iv): Renamed is_iv.
3204 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3205 Use replace_exp and update_stmt.
3206 (expand_scalar_variables_expr): Same. Use the map to get the
3207 new names for the renaming of induction variables and for the
3208 renaming of variables after a basic block has been copied.
3209 (expand_scalar_variables): Same.
3210 (graphite_rename_variables): Renamed rename_variables.
3211 (move_phi_nodes): Removed.
3212 (get_false_edge_from_guard_bb): New.
3213 (build_iv_mapping): Do not insert the induction variable of a
3214 loop in the renaming iv map if the basic block does not belong
3216 (register_old_new_names, graphite_copy_stmts_from_block,
3217 copy_bb_and_scalar_dependences): New.
3218 (translate_clast): Heavily reimplemented: copy basic blocks,
3219 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3220 At each translation step call graphite_verify ensuring the
3221 consistency of the SSA, loops and dominators information.
3222 (collect_virtual_phis, find_vdef_for_var_in_bb,
3223 find_vdef_for_var_1, find_vdef_for_var,
3224 patch_phis_for_virtual_defs): Removed huge hack.
3225 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3226 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3227 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3228 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3229 if_region_get_condition_block, if_region_set_false_region,
3230 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3231 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3232 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3233 rewrite_into_sese_closed_ssa): New.
3234 (gloog): Remove dead code. Early return if code cannot be
3235 generated. Call cleanup_tree_cfg once the scop has been code
3237 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3238 block loops with less than two loops.
3239 (graphite_apply_transformations): Remove the call to
3240 scop_remove_ignoreable_gbbs.
3241 (limit_scops): When build_scop_loop_nests fails, continue on
3242 the next scop. Fix open_scop.entry.
3243 (graphite_transform_loops): Call recompute_all_dominators: force the
3244 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3245 Call initialize_original_copy_tables and free_original_copy_tables
3246 to be able to copy basic blocks during code generation.
3247 When build_scop_loop_nests fails, continue on next scop.
3248 (value_clast): New union.
3249 (clast_to_gcc_expression): Fix type cast warning.
3251 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3253 * Merge from mainline (r140838:141727).
3255 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3259 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3261 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3265 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3266 exits and conditions.
3267 * testsuite/gcc.dg/graphite/pr37943.c: New.
3269 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3272 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3274 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3276 * doc/invoke.texi: Fix spaces.
3278 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3280 PR tree-optimization/37891
3281 Reverted last commit.
3282 * graphite.c (create_single_entry_edge): Set
3283 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3285 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3286 Mitul Thakkar <mitul.thakkar@amd.com>
3288 * graphite.c (create_single_entry_edge): Set
3289 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3291 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3293 * doc/invoke.texi: Add -fgraphite-identity.
3294 * graphite.c (graphite_apply_transformations): Check for
3295 -fgraphite-identity.
3296 * toplev.c (process_options): Add flag_graphite_identity.
3297 * tree-ssa-loop.c: Add flag_graphite_identity.
3299 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3301 Undo changes from 2008-10-02:
3302 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3303 operand type when copying the operand to a variable of different type.
3304 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3305 with the IV name after increment.
3307 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3308 Harsha Jagasia <harsha.jagasia@amd.com>
3310 PR tree-optimization/37828
3311 * testsuite/gcc.dg/graphite/pr37828.c: New.
3312 * graphite.c (graphite_trans_loop_block): Do not loop block
3313 single nested loops.
3315 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3316 Sebastian Pop <sebastian.pop@amd.com>
3318 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3319 rename_map_elt_info, eq_rename_map_elts): New.
3320 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3321 (expand_scalar_variables_expr): Change parameters.
3322 (expand_scalar_variables_stmt): Same.
3323 (expand_scalar_variables): Same.
3324 (graphite_rename_ivs): Rename graphite_rename_variables.
3325 (build_iv_mapping): New.
3326 (translate_clast): Call build_iv_mapping.
3327 * graphite.h (gbb_p): New name.
3329 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3331 PR tree-optimization/37684
3332 * gcc.dg/graphite/pr37684.c: New.
3333 * graphite.c (exclude_component_ref): New.
3334 (is_simple_operand): Call exclude_component_ref.
3336 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3337 Harsha Jagasia <harsha.jagasia@amd.com>
3339 PR tree-optimization/37485
3340 * gcc.dg/graphite/block-2.c: New
3341 * graphite.c (gmp_cst_to_tree): Moved.
3342 (iv_stack_entry_is_constant): New.
3343 (iv_stack_entry_is_iv): New.
3344 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3345 (loop_iv_stack_insert_constant): New.
3346 (loop_iv_stack_pop): Use new datatpype.
3347 (loop_iv_stack_get_iv): Same.
3348 (loop_iv_stack_get_iv_from_name): Same.
3349 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3350 (loop_iv_stack_patch_for_consts): New.
3351 (loop_iv_stack_remove_constants): New.
3352 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3353 (translate_clast): Call loop_iv_stack_patch_for_consts and
3354 loop_iv_stack_remove_constants.
3355 (gloog): Use new datatype. Redirect construction edge to end
3356 block to avoid accidental deletion.
3357 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3359 (union iv_stack_entry_data): New. Data in iv stack entry.
3360 (struct iv_stack_entry): New. Datatype for iv stack entries.
3362 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3364 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3365 operand type when copying the operand to a variable of different type.
3367 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3369 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3370 with the IV name after increment.
3372 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3374 * Merge from mainline (r140164:140838).
3376 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3378 * graphite-data-ref.c: New.
3379 * graphite.c (print_scop): Also dump the dependence graph.
3380 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3381 (new_scop): Initialize SCOP_DEP_GRAPH.
3382 (build_scop_dynamic_schedules): New.
3383 (build_access_matrix_with_af): Fixed column numbering.
3384 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3385 * graphite.h: Add ifndef/define guards against multiple inclusion.
3386 (struct scop): Add dep_graph field.
3387 (SCOP_DEP_GRAPH): Defined.
3388 (ref_nb_loops): Fixed and moved to other position.
3389 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3390 (nb_loops_around_loop_in_scop): New.
3391 (graphite_dump_dependence_graph): Declared.
3392 (graphite_build_rdg_all_levels): Declared.
3393 (graphite_test_dependence): Declared.
3394 * Makefile.in (graphite-data-ref.o): New target.
3396 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3398 * Merge from mainline (139870:140164).
3400 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3402 * Merge from mainline (138275:139870).
3403 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3404 the commits from trunk broke the niter detection.
3406 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3408 * graphite.c: Add more documentation. Fix formatting.
3409 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3410 loop_iv_stack_debug): Moved...
3411 (schedule_to_scattering): Move before use.
3412 (dot_all_scops): Include in "#if 0" the code for system
3415 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3416 loop_iv_stack_debug): ...here.
3418 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3420 * tree-phinodes.c (make_phi_node): Extern.
3421 (add_phi_node_to_bb): New.
3422 (create_phi_node): Call add_phi_node_to_bb.
3423 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3424 (remove_statement): Handle case where stored phi was updated
3425 and is no longer the same.
3426 * graphite.c (is_parameter): New.
3428 (expand_scalar_variables_expr): New.
3429 (expand_scalar_variables_stmt): New.
3430 (expand_scalar_variables): New.
3431 (move_phi_nodes): Create new phi instead of moving old one.
3432 (translate_clast): Call expand_scalar_variables.
3433 (find_vdef_for_var_in_bb): Also scan regular definitions.
3434 (skip_phi_defs): New.
3435 (collect_scop_exit_phi_args): New.
3436 (patch_scop_exit_phi_args): New.
3437 (gloog): Patch phis after scop.
3438 * tree-flow.h: (add_phi_node_to_bb): Declared.
3439 (make_phi_node): Declared.
3441 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3443 * graphite.c (end_scop): Split the entry of the scop when it
3444 is the header of the loop in which the scop is ending.
3445 (build_scops_1, limit_scops): Update uses of end_scop.
3447 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3449 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3450 SCOP_ENTRY or SCOP_EXIT.
3452 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3454 * graphite.c (get_construction_edge): Removed.
3455 (gloog): Construction edge is the scop entry edge.
3457 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3459 * graphite.c (can_generate_for_scop): Removed.
3460 (gloog): Do not call it.
3462 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3464 * graphite.c (new_scop): Entry of a scop is an edge.
3465 Initialize SESE region.
3466 (free_scop): Free SESE region.
3467 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3468 (split_difficult_bb): New, split from end_scop.
3469 (end_scop): Exit of a scop is an edge.
3470 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3471 not automatically updated and thus is always wrong.
3472 * graphite.h (struct sese): New.
3475 (struct scop): New field for a SESE region. Remove entry, exit.
3476 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3477 semantics as before. Moved comment around.
3479 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3480 Sebastian Pop <sebastian.pop@amd.com>
3482 * graphite.c (graphite_transform_loops): Always enable gloog
3483 and find_transform when ENABLE_CHECKING.
3485 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3487 * graphite.c (graphite_transform_loops): Move pretty printer
3488 of SCOPs before doing any transform. Remove call to print_scops
3489 and dot_all_scops_1.
3491 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3493 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3494 (print_graphite_bb): Same.
3496 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3498 * graphite.c (dot_all_scops_1): Cleanup.
3499 (move_scops): Fix comment.
3501 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3503 * graphite.c (build_scop_bbs): Revert commit 139355:
3505 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3506 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3508 * graphite.c (build_scop_bbs): Factor up code.
3510 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3512 * graphite.c (gloog): Update dominator info.
3514 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3516 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3518 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3520 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3522 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3523 (translate_clast): Correct formatting.
3524 * graphite.h (struct num_map): Removed.
3525 (struct graphite_bb): Remove num_map field.
3526 (GBB_INDEX_TO_NUM_MAP): Removed.
3528 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3530 * graphite.c (build_access_matrix_with_af): Fix comments.
3531 (build_scop_data_accesses): Same.
3533 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3535 * graphite.c (build_scop_data_accesses): Don't construct
3536 access matrices. Add a FIXME and an assert condition that
3537 should pass when the access matrices will be needed.
3539 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3541 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3543 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3544 Moved close by free_graphite_bb.
3545 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3546 (new_scop): Move close by free_scop.
3547 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3549 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3551 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3552 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3553 instead of recursive call.
3554 (graphite_translate_clast_equation): New.
3555 (graphite_create_guard_cond_expr): New.
3556 (graphite_create_new_guard): New.
3557 (get_stack_index_from_iv): Removed.
3558 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3559 (get_true_edge_from_guard_bb): New.
3560 (translate_clast): Handle stmt_guard in clast.
3561 (get_construction_edge): Allow construction edge detection for
3562 a scope entry with multiple predecessors if one predecessor is
3563 the immediate dominator of scope entry.
3564 (can_generate_code_stmt): Enable code generation for clast_guard.
3565 (gloog): Use correct context loop. Removed check for post dominators.
3566 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3568 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3570 * graphite.c (remove_dead_loops): Document better which
3573 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3575 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3577 (graphite.o): Also depends on pointer-set.h.
3579 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3581 * graphite.c (scop_record_loop): Fix compile warning.
3583 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3584 Sebastian Pop <sebastian.pop@amd.com>
3586 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3588 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3590 * graphite.c (build_graphite_bb): Initialize bb->aux to
3591 point to the graphite_bb_p.
3592 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3594 (add_bb_domains): Does not use the scop parameter.
3595 (graphite_transform_loops): Clean bb->aux at the end.
3597 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3598 Sebastian Pop <sebastian.pop@amd.com>
3600 * testsuite/lib/target-supports.exp
3601 (check_effective_target_fgraphite): New.
3603 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3604 check_effective_target_fgraphite returns false.
3605 Set dg-do-what-default to compile.
3606 (scan-graphite-dump-times): Removed.
3607 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3609 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3610 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3611 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3612 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3613 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3614 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3615 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3616 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3617 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3618 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3619 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3620 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3621 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3622 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3623 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3624 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3625 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3626 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3627 * testsuite/gcc.dg/graphite/block-0.c: Same.
3628 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3629 * testsuite/gcc.dg/graphite/block-1.c: Same.
3630 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3631 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3632 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3633 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3634 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3636 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3638 * graphite.c: Fix some XXX comments.
3639 (build_scop_dynamic_schedules): Removed.
3641 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3643 * graphite.h (scop_max_loop_depth): Moved...
3644 * graphite.c (scop_max_loop_depth): ...here.
3645 (remove_all_edges_1): New.
3646 (remove_all_edges): Factored code.
3647 (remove_cond_exprs): Check only the last statement for
3648 a GIMPLE_COND expression.
3650 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3652 * graphite.c (scan_tree_for_params): Early return when the
3653 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3654 (find_scop_parameters): Factor out code.
3655 (graphite_trans_bb_strip_mine): Remove dead code.
3657 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3659 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3660 graphite_trans_bb_move_loop): Factor asserts.
3661 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3662 Do not call calculate_dominance_info and estimate_bb_frequencies.
3664 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3666 * graphite.c (create_loops_mapping, free_loops_mapping,
3667 create_loops_mapping_num, debug_loop_mapping_1,
3668 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3669 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3670 graphite_loops_mapping_add_child_num,
3671 graphite_loops_mapping_insert_child,
3672 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3673 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3674 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3675 create_num_from_index, get_num_from_index,
3676 swap_loop_mapped_depth): Removed.
3677 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3678 (free_scop): Do not call free_loops_mapping.
3679 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3680 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3681 get_loop_mapped_depth.
3682 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3683 (graphite_trans_bb_strip_mine): Same.
3684 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3685 (struct scop): Remove field loops_mapping.
3687 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3688 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3690 * graphite.c (scop_record_loop): Factor out one level of the
3691 condition by early return.
3692 (build_scop_loop_nests): Format following FSF coding style.
3693 (build_scop_dynamic_schedules): Factor out code.
3694 (scopdet_bb_info): Reindent. Default case should not be reachable.
3696 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3697 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3699 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3700 assignments that are not handled as simple operands for now.
3702 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3703 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3705 * graphite.c (build_scop_bbs): Factor up code.
3707 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3708 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3710 * graphite.c (stmt_simple_for_scop_p): Factor code out
3712 (enum gbb_type): New. Group all the GBB_* types under it.
3713 (is_loop_exit): Moved...
3714 (end_scop): Enable BB spliting.
3715 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3716 * cfgloop.h (is_loop_exit): Declared.
3718 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3720 * doc/invoke.texi: Remove strides from examples containing
3721 DO loops when the strides are equal to 1.
3723 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3724 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3726 * graphite.c (graphite_trans_scop_block): Or the result with
3727 the result from graphite_trans_loop_block.
3728 * testsuite/gcc.dg/graphite/block-1.c: New.
3729 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3730 * testsuite/gfortran.dg/graphite/block-2.f: New.
3732 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3734 * graphite.c (graphite_transform_loops): Call cloog_initialize
3737 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3739 * tree-data-ref.c) (stmt_simple_memref_p): New.
3740 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3741 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3742 (is_simple_operand): Call stmt_simple_memref_p.
3744 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3745 using pointer arithmetic, as this is optimized by PRE and
3746 makes the code too difficult to analyze.
3748 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3750 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3752 * gdbinit.in (pgg): New.
3754 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3756 * graphite.c (graphite_trans_loop_block): Fix warning.
3758 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3760 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3762 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3764 * graphite.c (graphite_trans_bb_block): Remove check for
3765 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3766 Check if loop blocking is profitable for every loop, before applying
3768 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3769 if flag_loop_block is set.
3771 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3773 * graphite.c: Add some more documentation for the loop
3776 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3778 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3779 * graphite.c: Format on less than 80 columns.
3782 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3784 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3786 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3788 * doc/invoke.texi (floop-block, floop-strip-mine,
3789 floop-interchange): Update documentation with examples.
3791 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3793 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3795 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3797 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3799 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3800 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3801 * tree-scalar-evolution.c: Revert useless changes.
3802 * tree-phinodes.c: Same.
3805 * tree-vectorizer.h: Same.
3806 * tree-flow.h: Same.
3808 * common.opt (fgraphite): Update documentation.
3810 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3812 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3813 -floop-interchange): Add more text for explaining what each of these
3815 * tree-into-ssa.c (gimple_vec): Moved to...
3816 * graphite.c: Include gimple.h.
3817 (gimple_vec): Moved to...
3818 (del_loop_to_cloog_loop): Removed.
3819 (loop_affine_expr): Do not call create_data_ref when the
3820 operand is a constant.
3821 (new_scop): Use free instead of del_loop_to_cloog_loop.
3822 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3823 * gimple.h (gimple_vec): ... here.
3825 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3827 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3829 (build_loop_iteration_domains): Fail, if latch executions unknown.
3831 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3833 * graphite.c (add_conditions_to_domain): New.
3834 (build_scop_conditions_1): Call add_conditions_to_domain.
3835 (set_cloog_options): Allow to disable optimizations.
3837 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3839 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3840 Do not use walk_dominator_tree.
3841 (find_scop_parameters): Do not use walk_dominator_tree.
3843 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3845 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3846 (idx_record_params): Adapt.
3847 * graphite.h (scop_gimple_loop_depth): New.
3849 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3851 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3852 (scan_tree_for_params): Remove value_init.
3853 (build_scop_context): Remove value_init.
3854 (build_loop_iteration_domains): Remove value_init.
3855 (schedule_to_scattering): Remove value_init.
3856 (graphite_trans_bb_strip_mine): Remove value_init.
3858 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3860 * gcc/graphite.c (limit_scops): New.
3861 (graphite_transform_loops): Add limit SCoPs.
3862 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3863 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3864 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3865 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3866 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3867 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3868 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3869 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3870 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3871 Change loop numbers.
3872 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.
3873 Change loop numbers.
3874 * gcc/testsuite/gcc.dg/graphite/scop-18.c: Update number of SCoPs.
3875 * gcc/testsuite/gcc.dg/graphite/scop-2.c: Update number of SCoPs.
3876 * gcc/testsuite/gcc.dg/graphite/scop-3.c: Update number of SCoPs.
3877 * gcc/testsuite/gcc.dg/graphite/scop-4.c: Update number of SCoPs.
3878 * gcc/testsuite/gcc.dg/graphite/scop-5.c: Update number of SCoPs.
3879 * gcc/testsuite/gcc.dg/graphite/scop-6.c: Update number of SCoPs.
3880 * gcc/testsuite/gcc.dg/graphite/scop-7.c: Update number of SCoPs.
3881 * gcc/testsuite/gcc.dg/graphite/scop-8.c: Update number of SCoPs.
3882 * gcc/testsuite/gcc.dg/graphite/scop-9.c: Update number of SCoPs.
3883 * gcc/testsuite/gcc.dg/graphite/scop-matmult.c: Update number of SCoPs.
3885 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3887 * graphite.c (graphite_transform_loops): Call always find_transform.
3889 2008-08-08 Tobias Grosser <grosser@fim.uni-passau.de>
3891 * graphite.c (free_loops_mapping): New.
3892 (stmt_simple_for_scop_p): Fix typo.
3893 (stmt_simple_for_scop_p): Fix tuples functions, that