1 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
3 * tree-scalar-evolution.c (instantiate_scev_bitnot): Renamed
4 instantiate_scev_not. Handle NEGATE_EXPR.
5 (instantiate_scev_r): Handle NEGATE_EXPR.
7 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
9 * tree-scalar-evolution.c (instantiate_scev_1): Renamed
11 (instantiate_scev_r): Move code in instantiate_scev_2
12 and instantiate_scev_1.
14 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
16 * tree-scalar-evolution.c (instantiate_scev_3): New.
17 (instantiate_scev_1): Move code in instantiate_scev_3.
19 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
21 * tree-scalar-evolution.c (instantiate_scev_poly): New.
22 (instantiate_scev_1): Move code in instantiate_scev_poly.
24 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
26 * tree-scalar-evolution.c (instantiate_scev_bitnot): New.
27 (instantiate_scev_1): Move code in instantiate_scev_bitnot.
29 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
31 * tree-scalar-evolution.c (instantiate_scev_convert): New.
32 (instantiate_scev_1): Move code in instantiate_scev_convert.
34 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
36 * tree-scalar-evolution.c (instantiate_scev_binary): New.
37 (instantiate_scev_1): Move code in instantiate_scev_binary.
39 2009-09-01 Sebastian Pop <sebastian.pop@amd.com>
41 * tree-scalar-evolution.c (instantiate_scev_name): New.
42 (instantiate_scev_1): Move code in instantiate_scev_name.
44 2009-08-28 Sebastian Pop <sebastian.pop@amd.com>
46 * Merge from mainline (150992:151171).
48 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
50 * graphite-dependences.c (graphite_legal_transform_bb): Call
51 pbb_remove_duplicate_pdrs.
52 * graphite-poly.c (can_collapse_pdr): Removed.
53 (pdr_find_duplicate): Removed.
54 (can_collapse_pdrs): New.
55 (pbb_remove_duplicate_pdrs): New.
56 (new_poly_dr): Do not look for duplicates.
57 * graphite-poly.h (struct poly_bb): New field pdr_duplicates_removed.
58 (PBB_PDR_DUPLICATES_REMOVED): New.
59 (pbb_remove_duplicate_pdrs): Declared.
61 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
63 * graphite-interchange.c (pbb_interchange_profitable_p): Adjust
64 the strides by multiplying by PDR_NB_REFS.
65 * graphite-poly.c (can_collapse_pdr): New.
66 (pdr_find_duplicate): New.
67 (new_poly_dr): Call pdr_find_duplicate. Collapse duplicate PDRs.
68 Initialize PDR_NB_REFS.
69 * graphite-poly.h (struct poly_dr): Add field nb_refs.
71 (new_poly_dr): Number of subscripts is a graphite_dim_t.
73 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
75 Revert one of the previous commits:
76 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
77 the computation of symmetric data dependence relations.
78 (dependency_between_pbbs_p): Same.
80 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
83 * graphite-poly.c (apply_poly_transforms): Remove legality test before
86 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
88 * graphite-dependences.c (pddr_original_scattering): Return NULL
89 for read-read dependence relations.
90 * graphite-poly.h (enum poly_dr_type): Fix comment.
93 (pdr_may_write_p): New.
95 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
97 * graphite-poly.h (enum POLY_DR_TYPE): Renamed poly_dr_type.
98 (struct poly_dr): Same.
100 * graphite-poly.c (new_poly_dr): Same.
102 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
103 Sebastian Pop <sebastian.pop@amd.com>
105 * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed
106 pbb_strip_mine_time_depth. Changed the implementation so that
107 transformation is expressed as a transformation on
108 time (scatttering) dimensions. Also, ensures that the 2d+1
109 scheduling format is preserved.
110 (pbb_strip_mine_profitable_p): Profitability is based on the
111 iteration number of a given time (scattering) dimension,
112 and not on a original loop depth dimension.
113 (pbb_strip_mine): Call pbb_number_of_iterations_at_time.
114 (pbb_do_strip_mine): Call psct_dynamic_dim.
115 * graphite-poly.c (pbb_number_of_iterations_at_time): New.
116 * graphite-poly.h (pbb_number_of_iterations_at_time): Declared.
117 (pbb_nb_dynamic_scattering_transform): New.
118 (psct_dynamic_dim): New.
120 2009-08-25 Konrad Trifunovic <konrad.trifunovic@gmail.com>
122 * graphite-ppl.c (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
123 * graphite-ppl.h (ppl_max_for_le): Renamed ppl_max_for_le_pointset.
124 * graphite-poly.c (pbb_number_of_iterations): Rename ppl_max_for_le.
125 * graphite-interchange.c (build_linearized_memory_access): Same.
126 (memory_stride_in_loop): Same.
128 2009-08-25 Sebastian Pop <sebastian.pop@amd.com>
130 * graphite-dependences.c (pddr_original_scattering): New.
131 (graphite_legal_transform_dr): Call pddr_original_scattering.
134 * graphite-dependences.h (dot_deps): Declared.
135 * graphite-poly.c (new_poly_dr): Initialize PDR_ID.
136 (print_pdr): Print PDR_ID.
137 * graphite-poly.h (struct poly_dr): Add field id.
140 * graphite-scop-detection.c (dot_all_scops_1): Cleanup comment.
142 2009-08-22 Sebastian Pop <sebastian.pop@amd.com>
144 * graphite-dependences.c (graphite_carried_dependence_level_k): Do
145 not delete the original dependence relation.
147 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
149 * graphite-dependences.c (graphite_legal_transform_bb): Avoid
150 the computation of symmetric data dependence relations.
151 (dependency_between_pbbs_p): Same.
153 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
155 * graphite-dependences.c (new_poly_dr_pair): Renamed new_poly_ddr.
156 (eq_poly_dr_pair_p): Renamed eq_poly_ddr_p.
157 (hash_poly_dr_pair_p): Renamed hash_poly_ddr_p.
158 (free_poly_ddr): New.
159 (pddr_is_empty): New.
160 (dependence_polyhedron_1): Now returns a poly_ddr_p.
161 (dependence_polyhedron): Same. Remove useless gcc_assert.
163 (graphite_legal_transform_dr): Call pddr_is_empty and free_poly_ddr.
164 (graphite_carried_dependence_level_k): Call pddr_is_empty.
165 * graphite-dependences.h (enum poly_dependence_kind): New.
166 (poly_dr_pair): Renamed poly_ddr. Added a field kind.
167 (PDRP_SOURCE): Renamed PDDR_SOURCE.
168 (PDRP_SINK): Renamed PDDR_SINK.
169 (PDRP_DDP): Renamed PDDR_DDP.
171 (free_poly_ddr): Declared.
172 * graphite-poly.c (new_scop): Use the new hash function names.
173 * graphite-poly.h (struct scop): Renamed field original_pdr_pairs
175 (SCOP_ORIGINAL_PDR_PAIRS): Renamed SCOP_ORIGINAL_PDDRS.
177 2009-08-21 Sebastian Pop <sebastian.pop@amd.com>
179 * Merge from mainline (150764:150992).
181 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
183 * cfgloopmanip.c (create_empty_loop_on_edge): Generate upper
184 bounds with LT_EXPR to make niter analysis more precise on code
185 generated by Graphite.
187 2009-08-18 Sebastian Pop <sebastian.pop@amd.com>
189 * graphite-dependences.c (graphite_legal_transform_dr): Fix formatting.
190 (graphite_legal_transform_bb): Same.
191 (poly_drs_may_alias_p): Same.
193 2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
196 * graphite-ppl.c (ppl_max_for_le): Correct the use of
197 ppl_Pointset_Powerset_C_Polyhedron_maximize.
199 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
201 * graphite-poly.c (print_pbb): Print PBB index.
203 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
205 * Merge from mainline (r150672:150764).
207 2009-08-13 Sebastian Pop <sebastian.pop@amd.com>
209 * graphite-interchange.c (ppl_max_for_le): Moved...
210 * graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
211 * graphite-ppl.c (ppl_max_for_le): ... here.
212 * graphite-ppl.h (ppl_max_for_le): Declared.
214 2009-08-12 Sebastian Pop <sebastian.pop@amd.com>
216 * Merge from mainline (r150372:150672).
218 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
221 * sese.c (convert_for_phi_arg): New.
222 (add_guard_exit_phis): Use convert_for_phi_arg.
224 * testsuite/gfortran.dg/graphite/id-17.f: New.
226 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
228 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Dont add
229 unknown subscript upper bounds.
231 * testsuite/gcc.dg/graphite/interchange-6.c: Un-XFAIL.
233 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
234 Pranav Garg <pranav.garg2107@gmail.com>
236 * graphite-interchange.c (gather_access_strides): Removed.
237 (ppl_max_for_le): New.
238 (build_linearized_memory_access): New.
239 (memory_stride_in_loop): New.
240 (pbb_interchange_profitable_p): Reimplemented.
241 * graphite-ppl.h (ppl_new_id_map): New.
242 (ppl_interchange): New.
244 * testsuite/gcc.dg/graphite/interchange-6.c: XFAILed.
246 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
248 * graphite-interchange.c (compute_subscript): Removed.
249 (compute_array_size_cstr): Removed.
250 (compute_array_size_poly): Removed.
251 (compute_array_size): Removed.
252 (gather_access_strides_poly): Removed.
253 (gather_access_strides): Empty.
255 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
257 * graphite-dependences.c (dependence_polyhedron_1): Replace
258 pdr_nb_subscripts with PDR_NB_SUBSCRIPTS.
259 (graphite_legal_transform_dr): Same.
260 (graphite_carried_dependence_level_k): Same.
261 * graphite-poly.c (new_poly_dr): Add a parameter nb_subscripts.
262 Initialize PDR_NB_SUBSCRIPTS.
263 (print_pdr_access_layout): Replace pdr_nb_subscripts with
265 * graphite-poly.h (struct poly_dr): Add nb_subscripts field.
266 (PDR_NB_SUBSCRIPTS): New.
267 (pdr_nb_subscripts): Removed.
268 (pdr_dim): Simplified.
269 * graphite-sese-to-poly.c (build_poly_dr): Replace pdr_nb_subscripts
270 with PDR_NB_SUBSCRIPTS.
272 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
274 * graphite-interchange.c (compute_array_size): Remove use of
276 * graphite-poly.c (new_poly_dr): Remove argument data_container.
277 Do not initialize PDR_DATA_CONTAINER.
278 (print_pdr): Do not print PDR_DATA_CONTAINER.
279 * graphite-poly.h (struct poly_dr): Remove data_container field.
280 (PDR_DATA_CONTAINER): Removed.
281 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Remove use of
283 (build_poly_dr): Same.
285 2009-08-11 Sebastian Pop <sebastian.pop@amd.com>
287 * testsuite/gcc.dg/graphite/interchange-9.c: New.
289 2009-08-05 Konrad Trifunovic <konrad.trifunovic@gmail.com>
290 Sebastian Pop <sebastian.pop@amd.com>
292 * graphite-dependences.c (graphite_legal_transform_dr): Work on a
293 copy of the dependence polyhedron. Free the temporary objects.
294 (graphite_carried_dependence_level_k): Free unused objects before
297 * testsuite/gcc.dg/graphite/interchange-1.c: XFAILed.
298 * testsuite/gcc.dg/graphite/interchange-2.c: XFAILed.
299 * testsuite/gcc.dg/graphite/interchange-3.c: XFAILed.
300 * testsuite/gcc.dg/graphite/interchange-4.c: XFAILed.
301 * testsuite/gcc.dg/graphite/interchange-7.c: XFAILed.
303 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
305 * graphite-blocking.c (scop_do_strip_mine): Call store_scattering.
306 Early return without analyzing the data dependences if no
307 transform has been done. Call restore_scattering if the transform
309 (graphite-interchange.c): Same.
310 * graphite-poly.c (print_scattering_function): Test for PBB_TRANSFORMED.
311 (graphite_read_transforms): Initialize PBB_TRANSFORMED.
312 (apply_poly_transforms): Do not gcc_assert that
313 the transform is legal.
314 (new_poly_bb): Initialize PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
315 Do not initialize PBB_NB_SCATTERING_TRANSFORM, PBB_NB_LOCAL_VARIABLES,
316 PBB_TRANSFORMED_SCATTERING, and PBB_ORIGINAL_SCATTERING.
317 (free_poly_dr): Free PBB_TRANSFORMED, PBB_SAVED, and PBB_ORIGINAL.
318 * graphite-poly.h (struct poly_scattering): New.
319 (struct poly_bb): Add original, transformed, and saved fields.
320 Remove transformed_scattering, original_scattering, nb_local_variables,
321 and nb_scattering_transform fields.
322 (PBB_ORIGINAL, PBB_TRANSFORMED, PBB_SAVED): New.
323 (poly_scattering_new): New.
324 (poly_scattering_free): New.
325 (poly_scattering_copy): New.
326 (store_scattering_pbb): New.
327 (store_scattering): New.
328 (restore_scattering_pbb): New.
329 (restore_scattering): New.
330 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
331 Initialize PBB_TRANSFORMED and PBB_ORIGINAL.
333 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
335 * graphite-poly.c (print_pbb): Add parentheses in the pretty print.
338 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
340 * Makefile.in (graphite.o): Depends on PREDICT_H.
341 * graphite.c: Include predict.h.
342 (graphite_finalize): Call tree_estimate_probability.
343 * predict.c (predict_loops): Do not call scev_initialize and
345 (tree_estimate_probability_bb): New.
346 (tree_estimate_probability): Do not initialize loops: move that
347 code to the driver. Call tree_estimate_probability_bb.
348 (tree_estimate_probability_driver): New.
349 (pass_profile): Use tree_estimate_probability_driver.
350 * predict.h (tree_estimate_probability): Declared.
352 2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
354 * graphite-clast-to-gimple.c (gloog): Add time to TV_GRAPHITE_CODE_GEN.
355 * graphite-dependences.c (graphite_legal_transform): Add time to
356 TV_GRAPHITE_DATA_DEPS.
357 (dependency_between_pbbs_p): Same.
358 * timevar.def (TV_GRAPHITE_DATA_DEPS, TV_GRAPHITE_CODE_GEN): New.
360 2009-08-03 Sebastian Pop <sebastian.pop@amd.com>
362 * Merge from mainline (r149952:150372).
364 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
366 * ChangeLog.graphite: Fix indenting, white spaces and 80 columns.
367 * graphite-blocking.c: Same.
368 * graphite-clast-to-gimple.c: Same.
369 * graphite-dependences.c: Same.
370 * graphite-poly.c: Same.
371 * graphite-poly.h: Same.
372 * graphite-ppl.c: Same.
373 * graphite-scop-detection.c: Same.
374 * graphite-sese-to-poly.c: Same.
377 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
379 * graphite-sese-to-poly.c (loop_entry_phi_arg): New.
380 (remove_simple_copy_phi): New.
381 (remove_invariant_phi): New.
382 (simple_copy_phi_p): New.
383 (reduction_phi_p): New.
384 (gsi_for_ssa_name_def): New.
385 (insert_out_of_ssa_copy): New.
386 (insert_out_of_ssa_copy_on_edge): New.
387 (create_zero_dim_array): New.
388 (scalar_close_phi_node_p): New.
389 (rewrite_close_phi_out_of_ssa): New.
390 (rewrite_phi_out_of_ssa): New.
391 (rewrite_reductions_out_of_ssa): New.
392 (build_poly_scop): Call rewrite_reductions_out_of_ssa.
394 * testsuite/gcc.dg/graphite/id-11.c: New.
395 * testsuite/gcc.dg/graphite/id-15.c: New.
396 * testsuite/gcc.dg/graphite/interchange-1.c: Un-XFAIL.
397 * testsuite/gcc.dg/graphite/interchange-2.c: Un-XFAIL.
398 * testsuite/gcc.dg/graphite/interchange-3.c: Un-XFAIL.
399 * testsuite/gcc.dg/graphite/interchange-4.c: Un-XFAIL.
400 * testsuite/gcc.dg/graphite/interchange-7.c: Un-XFAIL.
401 * testsuite/gcc.dg/graphite/scop-matmult.c: Un-XFAIL.
402 * testsuite/gfortran.dg/graphite/id-13.f: New.
403 * testsuite/gfortran.dg/graphite/id-5.f: New.
405 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
407 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not
408 check that nb_reductions_in_loop is zero.
409 * graphite-scop-detection.c (harmful_stmt_in_bb): Don't filter out
411 (nb_reductions_in_loop): Removed.
412 (graphite_can_represent_loop): Do not call nb_reductions_in_loop.
413 * graphite-sese-to-poly.c (phi_node_is_iv): Removed.
414 (bb_contains_non_iv_scalar_phi_nodes): Removed.
415 (scop_contains_non_iv_scalar_phi_nodes): Removed.
416 (build_poly_scop): Do not call scop_contains_non_iv_scalar_phi_nodes.
418 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
420 * graphite-clast-to-gimple.c (build_cloog_prog): Do not code generate
421 statements that have an empty iteration domain.
422 * testsuite/gfortran.dg/graphite/id-16.f: New.
424 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
426 * tree-scalar-evolution.c (instantiate_scev_1): Return
427 chrec_dont_know when the result is not above instantiate_below.
428 * graphite-scop-detection.c (scopdet_basic_block_info): Fix formatting.
429 * graphite-sese-to-poly.c (create_linear_expr_from_tree): Assert that
430 the tree has a known scalar evolution.
431 * testsuite/gfortran.dg/graphite/id-14.f: New.
432 * testsuite/gfortran.dg/graphite/id-15.f: New.
434 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
436 * sese.c (rename_variables_in_stmt): Pass in an extra parameter
438 (rename_variables): Keep inserting renames after the ones already
441 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
443 * graphite-sese-to-poly.c (compare_bb_depths): New.
444 (graphite_sort_dominated_info): New.
445 (build_scop_bbs_1): Call graphite_sort_dominated_info.
446 (build_scop_scattering): Fix comment.
448 2009-07-28 Sebastian Pop <sebastian.pop@amd.com>
450 * graphite.c (graphite_finalize): Call print_loops instead of
451 dump_function_to_file.
452 * testsuite/gcc.dg/graphite/graphite.exp: Fix formatting.
453 * testsuite/gcc.dg/graphite/pr35356-1.c: New. Look for the number of
454 loops generated in the graphite output file.
455 * testsuite/gcc.dg/graphite/pr35356-2.c: New.
456 * testsuite/gcc.dg/graphite/pr35356-3.c: New. XFAILed for now.
457 * testsuite/gfortran.dg/graphite/id-12.f: New.
459 2009-07-24 Li Feng <nemokingdom@gmail.com>
461 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c:
464 2009-07-24 Li Feng <nemokingdom@gmail.com>
465 Tobias Grosser <grosser@fim.uni-passau.de>
467 * graphite-sese-to-poly.c (pdr_add_alias_set): Use data reference's
468 alias set number build alias in ACCESSES polyhedron.
469 (build_alias_set_for_drs): New.
470 (build_pbb_drs): Added build_alias_set_for_drs.
471 * graphite-dependences.c (poly_drs_may_alias_p): New.
472 (graphite_carried_dependence_level_k): Check alias information
473 before building polyhedron.
475 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
477 * Makefile.in (lambda-code.o): Fix formatting.
479 2009-07-24 Tobias Grosser <grosser@fim.uni-passau.de>
481 * Merge from mainline (r149350-149952)
483 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
485 * graphite-poly.c (apply_poly_transforms): Move strip_mine
486 before interchange to prepare for loop blocking.
488 2009-07-18 Tobias Grosser <grosser@fim.uni-passau.de>
490 * graphite-poly.c (apply_poly_transforms): Add checks after every
492 * graphite-sese-to-poly.c (build_poly_scop): Remove check, as already
493 done in apply_poly_transforms.
495 2009-07-17 Konrad Trifunovic <konrad.trifunovic@gmail.com>
497 * graphite-dependences.c (build_lexicographically_gt_constraint):
498 Replace RES parameter with *RES.
499 (dependence_polyhedron_1): Pass an address of the parameter RES
500 instead of value of RES.
502 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
504 * graphite.c (graphite_finalize): Fix comment.
505 (graphite_transform_loops): Reset scev info after code generation
508 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
510 * graphite.c (graphite_finalize): Call scev_reset.
512 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
514 * graphite-clast-to-gimple.c (compute_cloog_iv_types): Do not create
515 GBB_CLOOG_IV_TYPES hash table twice.
516 * graphite-sese-to-poly.c (free_gimple_bb): Call free_data_refs.
517 (add_condition_to_domain): Clear GMP values.
519 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
521 * graphite-dependences.c: Fix formatting.
522 * graphite-poly.c (free_poly_dr): Also free PDR_DATA_CONTAINER.
523 (pbb_number_of_iterations): Free ppl_Linear_Expression.
524 * graphite-sese-to-poly.c: Fix formatting.
525 * graphite.c (graphite_transform_loops): Create the hash table
526 after the early return.
528 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
530 * testsuite/gcc.dg/graphite/id-14.c: New.
531 * testsuite/gcc.dg/graphite/pr40157.c: New.
532 * testsuite/gfortran.dg/graphite/id-11.f: New.
534 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
536 * graphite-sese-to-poly.c (nb_pbbs_in_loops): New.
537 (build_poly_scop): Return false when there are no pbbs within
538 loops to avoid to pass to cloog scops with no loops.
540 2009-07-16 Sebastian Pop <sebastian.pop@amd.com>
542 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Avoid
543 useless test "i % 2".
544 (build_pbb_scattering_polyhedrons): Fix formatting.
545 (build_poly_dr): Same.
546 * graphite.c (graphite_transform_loops): Restructure.
548 2009-07-14 Razya Ladelsky <razya@il.ibm.com>
550 * tree-ssa-loop-manip.c (rewrite_phi_with_iv): Remove
551 reduction_list parameter.
552 (rewrite_all_phi_nodes_with_iv): Same.
553 (canonicalize_loop_ivs): Same.
554 * tree-parloops.c (struct brli): Removed.
555 (build_reduction_list_info): Removed.
556 (build_new_reduction): New.
557 (analyze_reduction_list): Removed.
558 (gather_scalar_reductions): Find reductions instead of phi
559 nodes that can't be canonicalized.
560 (try_create_reduction_list): Remove reduction_list parameter.
561 (gen_parallel_loop): Same.
562 (parallelize_loops): Remove analyze_reductions variable,
563 initialization and free.
564 Change reduction_list htab initialization to reduction_info
565 elements instead of ssa names.
566 Call try_create_reduction_list and gen_parallel_loop without
567 analyzed_reduction argument.
568 * graphite-clast-to-gimple (graphite_loop_normal_form): Call
569 canonicalize_loop_ivs with one less argument.
570 * tree-flow.h (canonicalize_loop_ivs): Remove one argument.
572 2009-07-14 Konrad Trifunovic <konrad.trifunovic@gmail.com>
574 * graphite-dependences.c (new_poly_dr_pair): New.
575 (dependence_polyhedron): Renamed into dependence_polyhedron_1.
576 (new_poly_dr_pair): New.
577 (eq_poly_dr_pair_p): New.
578 (hash_poly_dr_pair_p): New.
579 * graphite-dependences.h (struct poly_dr_pair): New.
580 (eq_poly_dr_pair_p): Declared.
581 (hash_poly_dr_pair_p): Declared.
582 * graphite-poly.c (new_scop): Initialize SCOP_ORIGINAL_PDR_PAIRS.
583 (free_scop): Free SCOP_ORIGINAL_PDR_PAIRS.
584 * graphite-poly.h (struct scop): Add original_pdr_pairs field.
585 * Makefile.in (graphite-poly.o): Add dependence on
586 graphite-dependences.h.
588 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
590 * graphite-scop-detection.c (graphite_can_represent_scev): Do not let
591 polynomials of degree > 1 pass to Graphite.
592 * tree-chrec.c (scev_is_linear_expression): Call
593 evolution_function_is_affine_multivariate_p.
594 * testsuite/gfortran.dg/graphite/id-10.f90: New.
596 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
598 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop):
599 Instantiate scevs varying in outer loops.
600 * testsuite/gfortran.dg/graphite/id-9.f: Correct testcase.
602 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
604 * graphite-sese-to-poly.c (build_loop_iteration_domains): Do not insert
605 redundant constraint.
607 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
609 * testsuite/gcc.dg/graphite/graphite.exp: Fix comments.
610 * testsuite/gfortran.dg/graphite/graphite.exp: Trigger actions
611 based on the file names as in the C testsuite.
612 * testsuite/gfortran.dg/graphite/block-1.f90: Fix patterns.
613 * testsuite/gfortran.dg/graphite/block-2.f: Same.
614 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
615 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
616 * testsuite/gfortran.dg/graphite/id-1.f90: Same.
617 * testsuite/gfortran.dg/graphite/id-2.f90: Same.
618 * testsuite/gfortran.dg/graphite/id-3.f90: Same.
619 * testsuite/gfortran.dg/graphite/id-4.f90: Same.
620 * testsuite/gfortran.dg/graphite/id-6.f: Same.
621 * testsuite/gfortran.dg/graphite/id-9.f: Same.
622 * testsuite/gfortran.dg/graphite/interchange-1.f: Same.
623 * testsuite/gfortran.dg/graphite/interchange-2.f: Same.
624 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
626 2009-07-14 Sebastian Pop <sebastian.pop@amd.com>
628 * sese.c (expand_scalar_variables_call): New.
629 (expand_scalar_variables_ssa_name): Handle calls in expander.
631 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
633 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c:
634 Expect to see the pattern twice.
635 * testsuite/gcc.dg/graphite/interchange-0.c: Un-XFAIL.
636 * testsuite/gcc.dg/graphite/interchange-5.c: Same.
637 * testsuite/gcc.dg/graphite/interchange-6.c: Same.
639 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
641 * testsuite/gcc.dg/graphite/id-10.c: New.
642 * testsuite/gcc.dg/graphite/id-12.c: New.
643 * testsuite/gfortran.dg/graphite/id-7.f: New.
644 * testsuite/gfortran.dg/graphite/id-8.f: New.
646 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
648 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix division by
651 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
653 * sese.c (rename_variables_in_stmt): Call fold_convert during renaming.
655 2009-07-13 Sebastian Pop <sebastian.pop@amd.com>
657 * sese.c (expand_scalar_variables_stmt): Avoid unnecessary expansion.
659 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
661 * graphite-sese-to-poly.c (pdr_add_memory_accesses): Fix order of
662 building PDR subscripts.
664 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
666 * graphite-sese-to-poly.c (pdr_add_data_dimensions): Fix the
667 computation of array sizes.
669 2009-07-10 Sebastian Pop <sebastian.pop@amd.com>
671 * graphite-sese-to-poly.c (add_param_constraints): Disabled.
673 2009-07-10 Tobias Grosser <grosser@fim.uni-passau.de>
675 * graphite-dependences.c (map_into_dep_poly, map_dr_into_dep_poly,
676 build_pairwise_constraint, dr_equality_constraints,
677 build_pairwise_scheduling_equality,
678 build_pairwise_scheduling_inequality, lexicographically_gt_p,
679 build_lexicographically_gt_constraint, dependence_polyhedron,
680 graphite_legal_transform_dr, graphite_carried_dependence_level_k):
681 Move from NNC_Polyhedron to C_Polyhedron.
682 * graphite-interchange.c (compute_array_size_poly,
683 gather_access_strides): Dito.
684 * graphite-poly.c (apply_poly_transforms, new_poly_dr, free_poly_bb,
685 free_scop, pbb_number_of_iterations): Dito.
686 * graphite-poly.h (struct poly_dr, pdr_nb_subscripts, struct poly_bb,
687 pbb_dim_iter_domain, struct scop): Dito.
688 * graphite-ppl.c (new_Constraint_System_from_Cloog_Matrix,
689 new_Cloog_Domain_from_ppl_Polyhedron,
690 new_Cloog_Domain_from_ppl_Pointset_Powerset, ppl_set_coef_gmp,
691 ppl_insert_dimensions_pointset, ppl_insert_dimensions_pointset,
692 ppl_strip_loop, ppl_strip_loop, ppl_print_polyhedron_matrix,
693 ppl_print_powerset_matrix, debug_ppl_polyhedron_matrix,
694 debug_ppl_powerset_matrix, ppl_read_polyhedron_matrix): Dito.
695 * graphite-ppl.h (ppl_Pointset_Powerset_C_Polyhedron_t,
696 new_C_Polyhedron_from_Cloog_Matrix, ppl_print_powerset_matrix,
697 debug_ppl_powerset_matrix, ppl_insert_dimensions_pointset): Dito.
698 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons,
699 build_loop_iteration_domains, ppl_constraint_type_from_tree_code,
700 add_condition_to_domain, add_condition_to_pbb, build_scop_context,
701 build_scop_iteration_domain, build_poly_dr): Dito
703 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
705 * testsuite/gcc.dg/graphite/graphite.exp: Added a rule to execute
707 * testsuite/gcc.dg/graphite/run-id-1.c: New.
709 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
711 * graphite-sese-to-poly.c (build_loop_iteration_domains): Add the
712 positivity constraint on the symbolic number of iterations.
714 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
716 * graphite-sese-to-poly.c (build_loop_iteration_domains): Rewrite.
718 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
719 Tobias Grosser <grosser@fim.uni-passau.de>
721 * graphite-clast-to-gimple.c (build_scop_context): Removed.
722 (build_cloog_prog): Directly use SCOP_CONTEXT.
723 * graphite-poly.c (new_scop): Initialize SCOP_CONTEXT.
724 (free_scop): Free SCOP_CONTEXT.
725 (print_scop_context): New.
726 (print_scop): Call print_scop_context.
727 (debug_scop_context): New.
728 * graphite-poly.h (print_scop_context, debug_scop_context): Declared.
729 (struct scop): Added field context.
731 * graphite-sese-to-poly.c (add_param_constraints): New.
732 (build_scop_context): New.
733 (build_poly_scop): Call build_scop_context.
735 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
737 * graphite-clast-to-gimple.c (gmp_cst_to_tree): Moved...
738 * graphite-ppl.c (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): New.
739 (ppl_set_inhomogeneous, ppl_set_coef): Moved...
740 * graphite-ppl.h: Include double-int.h and tree.h.
741 (ppl_set_inhomogeneous_gmp, ppl_set_coef_gmp): Declared.
742 (ppl_set_inhomogeneous, ppl_set_coef): ...here.
743 (gmp_cst_to_tree): ...here. Reimplemented using mpz_get_double_int.
744 (tree_int_to_gmp, ppl_set_inhomogeneous_tree, ppl_set_coef_tree): New.
746 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
748 * graphite-clast-to-gimple.c (clast_to_gcc_expression_red): Generate
749 POINTER_PLUS_EXPR for pointer types.
750 (clast_to_gcc_expression): Same.
752 2009-07-09 Sebastian Pop <sebastian.pop@amd.com>
754 * graphite-poly.c (print_scattering_function): Early return when
755 PBB_TRANSFORMED_SCATTERING is not initialized.
756 (print_pbb_domain): Early return when PBB_DOMAIN is not initialized.
758 2009-07-08 Sebastian Pop <sebastian.pop@amd.com>
760 * tree-parloops.c (analyze_reduction_list): Remove unused variable
763 2009-07-08 Razya Ladelsky <razya@il.ibm.com>
765 * tree-parloops.c (analyze_reduction_list): Change return
767 (try_create_reduction_list): Move the call to
768 analyze_reduction_list to the beginining.
769 Call reduction_phi with analyzed_reductions as argument
770 instead of reduction_list.
772 2009-07-08 Tobias Grosser <grosser@fim.uni-passau.de>
774 * Merge from mainline (r148296:149346)
776 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
778 * graphite-scop-detection.c (graphite_can_represent_init): New.
779 (graphite_can_represent_scev): Call graphite_can_represent_init:
780 check that the initial value does not contain multiplications of
782 (stmt_has_simple_data_refs_p): New.
783 (stmt_simple_for_scop_p): Call stmt_simple_for_scop_p.
784 (is_simple_operand): Fix formatting.
785 * graphite-sese-to-poly.c (try_generate_gimple_bb): Fix formatting.
787 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
789 * testsuite/gcc.dg/graphite/id-13.c: New.
790 * graphite-sese-to-poly.c (graphite_stmt_p): Do not call
791 analyze_scalar_evolution, use scalar_evolution_in_region.
792 (scan_tree_for_params_right_scev): Add extra assert.
793 (parameter_index_in_region_1): Split from parameter_index_in_region.
794 (idx_record_params): Use scalar_evolution_in_region.
795 (find_params_in_bb): Same.
796 (find_scop_parameters): Same.
797 (build_loop_iteration_domains): Same.
798 (create_linear_expr_from_tree): Same.
799 * sese.c (scalar_evolution_in_region): New.
800 * sese.h (scalar_evolution_in_region): Declared.
801 (defined_in_sese_p): New.
802 * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop): Not
804 * tree-scalar-evolution.h (compute_overall_effect_of_inner_loop):
807 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
809 * Makefile.in: Replace dependences on tree-chrec.h with SCEV_H.
810 TREE_DATA_REF_H also implies SCEV_H.
812 2009-07-07 Sebastian Pop <sebastian.pop@amd.com>
814 * graphite-poly.c (print_scop_params): New.
815 (print_scop): Call print_scop_params.
816 (debug_scop_params): New.
817 * graphite-poly.h (print_scop_params, debug_scop_params): Declared.
819 2009-07-07 Li Feng <nemokingdom@gmail.com>
821 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-4.c: New.
822 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-5.c: New.
823 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-6.c: New.
824 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-7.c: New.
825 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-8.c: New.
826 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-9.c: New.
828 2009-07-07 Li Feng <nemokingdom@gmail.com>
830 * graphite-clast-to-gimple.c (mark_loops_parallel): Dump information
831 for dependency checking part.
832 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Add
833 tests for dependency checking.
834 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
835 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
836 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Add
837 flag -fdump-tree-graphite-all for autopar testsuites.
839 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
841 * Makefile.in (tree-ssa-loop-manip.o): Depends on langhooks.h.
842 * tree-parloops.c (rewrite_phi_with_iv, rewrite_all_phi_nodes_with_iv,
843 canonicalize_loop_ivs): Moved...
844 * tree-ssa-loop-manip.c: ... here. Include langhooks.h.
846 2009-07-06 Sebastian Pop <sebastian.pop@amd.com>
848 * tree-parloops.c (try_create_reduction_list): Pass an extra
849 argument analyzed_reductions. Call analyze_reduction_list.
850 (gen_parallel_loop): Do not call analyze_reduction_list.
851 (parallelize_loops): Init and finalize analyzed_reductions.
853 2009-07-06 Li Feng <nemokingdom@gmail.com>
855 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
856 Added flag -fno-loop-strip-mine for autopar testcase.
858 2009-07-04 Li Feng <nemokingdom@gmail.com>
860 * graphite-dependences.c (graphite_carried_dependence_level_k): Use
861 transformed scattering dimension instead of unmatch orignal when
862 calling dependence_polyhedron.
864 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
866 * opts.c (decode_options): Enable flag_loop_strip_mine at -O2.
868 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
870 * graphite-poly.c (pbb_number_of_iterations): Check for returned
871 value 1 from ppl_Pointset_Powerset_NNC_Polyhedron_maximize.
873 2009-06-30 Sebastian Pop <sebastian.pop@amd.com>
875 * graphite-blocking.c (pbb_strip_mine_profitable_p): New.
876 (pbb_do_strip_mine): Call pbb_strip_mine_profitable_p.
877 * graphite-poly.c (pbb_number_of_iterations): New.
878 * graphite-poly.h (pbb_number_of_iterations): Declared.
879 (pbb_iterator_dim, pbb_parameter_dim): New.
881 2009-06-29 Sebastian Pop <sebastian.pop@amd.com>
883 * graphite-clast-to-gimple.c (graphite_create_new_loop): Revert the
884 last commit on type of lower and upper bound of loops.
886 2009-06-29 Li Feng <nemokingdom@gmail.com>
888 * Makefile.in (graphite-clast-to-gimple.o): Added dependence on
889 graphite-dependences.h.
890 * graphite-clast-to-gimple.c (new_bb_pbb_def): New.
891 (mark_bb_with_pbb): New.
892 (get_stmtfor_depth): New.
893 (find_pbb_via_hash): New.
894 (dependency_in_loop_p): New.
895 (mark_loops_parallel): New.
896 (free_aux_in_new_loops): New.
897 (translate_clast): Add parameter BB_PBB_MAPPING. Mark newly created
898 bb with it's relevant pbb. Mark newly created loops. Remove mark
899 innermost loop parallel without checking.
900 (gloog): Add parameter BB_PBB_MAPPING.
901 * graphite-clast-to-gimple.h (struct bb_pbb_def): New.
902 (gloog): Change declaration.
903 (mark_loop_parallel): Make extern.
904 (free_aux_in_new_loops): Declare.
905 (bb_pbb_map_hash): New.
906 (eq_bb_pbb_map): New.
907 * graphite.c (graphite_transform_loops): Added BB_PBB_MAPPING. Trigger
908 auto parallelization when flag_graphite_force_parallel is set.
909 (graphite_finalize): Added free_aux_in_new_loops.
910 * tree-parloops.c (parallelize_loops): Only generate parallel code for
911 the innermost loop that marked parallel. Use
912 flag_graphite_force_parallel instead of loop->can_be_parallel.
913 (loop_parallel_p): Move inner most checking out of function.
915 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
917 * graphite-clast-to-gimple.c (graphite_create_new_loop): Make the
918 type of lower and upper bound of loops signed long int.
920 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
922 * cfgloopmanip.c (create_empty_loop_on_edge): Gimplify the loop exit
923 expression outside the loop.
925 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
927 * gcc.dg/graphite/interchange-8.c: New.
929 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
931 * gcc.dg/graphite/interchange-0.c: XFailed.
932 * gcc.dg/graphite/interchange-5.c: XFailed.
933 * gcc.dg/graphite/interchange-6.c: XFailed.
935 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
937 * graphite-interchange.c (compute_array_size_poly): The end of the
938 recursion should return 1.
940 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
942 * graphite-interchange.c (compute_array_size_cstr): Allow the
943 subscript multiplier to be -1.
944 (compute_array_size): Use PDR_DATA_CONTAINER and not PDR_ACCESSES.
945 * graphite-poly.c (new_poly_dr): Takes an extra argument for the
946 data_container. Initializes PDR_DATA_CONTAINER.
947 (print_pdr_access_layout): New.
948 (print_pdr): Call print_pdr_access_layout. Print PDR_DATA_CONTAINER.
949 * graphite-poly.h (struct poly_dr): Adjust comment. Add a new field
951 (PDR_DATA_CONTAINER): New.
952 (new_poly_dr): Update declaration.
953 * graphite-sese-to-poly.c (pdr_add_data_dimensions): New.
954 (build_poly_dr): Call pdr_add_data_dimensions.
956 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
958 * graphite-poly.h (struct poly_dr): Fix comment.
959 * graphite-sese-to-poly.c (pdr_add_alias_set): New.
960 (pdr_add_memory_accesses): New.
961 (build_poly_dr): Call pdr_add_memory_accesses and pdr_add_alias_set.
963 2009-06-26 Sebastian Pop <sebastian.pop@amd.com>
965 * graphite-poly.c (print_pdrs, debug_pdrs): New.
966 (print_pbb): Add call to print_pdrs.
967 * graphite-poly.h (print_pdrs, debug_pdrs): Declared.
969 2009-06-24 Konrad Trifunovic <konrad.trifunovic@gmail.com>
970 Li Feng <nemokingdom@gmail.com>
972 * graphite-dependences.c (graphite_carried_dependence_level_k): New.
973 (dependency_between_pbbs_p): New.
974 (lexicographically_gt_p): Assure !empty_p before polyhedron
976 (build_lexicographically_gt_constraint): Correct lexicographically
978 * graphite-dependences.h: New.
979 * Makefile.in (graphite-dependences.o): Add graphite-dependences.h.
981 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
983 * graphite-clast-to-gimple.c (print_clast_stmt): New.
984 (gloog): Print to dump_file the generated clast.
985 * graphite-clast-to-gimple.h (print_clast_stmt): Declared.
986 * graphite-interchange.c (pbb_do_interchange): Fix dump formatting.
988 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
990 * graphite-poly.c (extend_scattering): Increment
991 PBB_NB_LOCAL_VARIABLES by the number of added dimensions.
993 2009-06-24 Sebastian Pop <sebastian.pop@amd.com>
995 * graphite-interchange.c (compute_array_size_poly): Added exit of
996 recursion condition. Continue iterating even after the first equality.
997 (compute_array_size): Same.
999 2009-06-24 Li Feng <nemokingdom@gmail.com>
1001 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: Update
1002 -fdump-tree-final_cleanup to -fdump-tree-optimized.
1003 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: Ditto.
1004 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: Ditto.
1005 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: Ditto.
1007 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1009 * sese.c (expand_scalar_variables_stmt): Expand scalar variables
1010 only when the use verifies is_gimple_reg.
1012 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1014 * graphite-clast-to-gimple.c (build_cloog_prog): Fix memory corruption.
1015 Allocate scaldims after call to unify_scattering_dimensions.
1017 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1019 * graphite-clast-to-gimple.c (translate_clast): Fix memory leak.
1021 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1022 Albert Cohen <albert.cohen@inria.fr>
1024 * graphite-blocking.c (pbb_strip_mine_loop_depth): Do not use local
1025 variables for the strip mining.
1027 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1028 Pranav Garg <pranav.garg2107@gmail.com>
1030 * Makefile.in (OBJS-common): Added graphite-blocking.o.
1031 (graphite-sese-to-poly.o): Moved down to be in lexicographical order.
1032 (graphite-blocking.o): New rule.
1033 (graphite-poly.o, graphite-ppl.o): Moved to be in lexicographical order.
1034 * graphite-blocking.c: New.
1035 * graphite-poly.c (apply_poly_transforms): Call scop_do_strip_mine for
1036 flag_loop_strip_mine.
1037 (psct_scattering_dim_for_loop_depth): New.
1038 * graphite-poly.h (scop_do_strip_mine): Declared.
1039 (psct_add_local_variable): Increment PBB_NB_LOCAL_VARIABLES.
1040 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when using
1041 flag_loop_strip_mine.
1043 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1045 * graphite-poly.c (extend_scattering): Avoid initializing and freeing
1046 a GMP value and a PPL coefficient at each iteration of a loop.
1048 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1050 * graphite-dependences.c (dependence_polyhedron): Do not use
1051 pbb_nb_scattering_dims anymore. Use pbb_nb_scattering_orig and
1052 pbb_nb_scattering_transform.
1053 (graphite_legal_transform_dr): Same.
1054 * graphite-poly.c (extend_scattering): Same.
1055 (unify_scattering_dimensions): Same.
1056 (print_scattering_function): Same.
1057 (new_poly_bb): Initialize PBB_NB_SCATTERING_TRANSFORM and
1058 PBB_NB_LOCAL_VARIABLES.
1059 * graphite-poly.h (pbb_nb_scattering): Removed declaration.
1060 (struct poly_bb): Added nb_local_variables and nb_scattering_transform.
1061 (PBB_NB_LOCAL_VARIABLES, PBB_NB_SCATTERING_TRANSFORM): New.
1062 (pbb_nb_scattering_orig, pbb_nb_scattering_transform): New.
1063 (pbb_nb_scattering_dims, pbb_nb_scattering): Removed.
1064 (pbb_nb_scattering_transform): New.
1065 (pbb_nb_local_vars): Return PBB_NB_LOCAL_VARIABLES.
1066 (psco_scattering_dim): Add assert on parameters.
1067 (psct_scattering_dim): Same.
1068 (psct_scattering_dim_for_loop_depth): Declared.
1069 (psct_local_var_dim): New.
1070 (psco_iterator_dim, psco_parameter_dim): Add assert on parameters.
1071 (psct_iterator_dim, psct_parameter_dim): Same. To maintain the
1072 correct layout, call pbb_nb_local_vars.
1073 (psct_add_local_variable, psct_add_scattering_dimension): New.
1074 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons):
1075 Initialize PBB_NB_SCATTERING_TRANSFORM.
1077 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1079 * graphite-ppl.c (set_inhomogeneous): Renamed ppl_set_inhomogeneous.
1080 (set_coef): Renamed ppl_set_coef.
1081 * graphite-ppl.h (ppl_set_inhomogeneous, ppl_set_coef): Declared.
1083 2009-06-23 Sebastian Pop <sebastian.pop@amd.com>
1085 * graphite-dependences.c (build_pairwise_scheduling_inequality): Don't
1086 test a boolean against 1.
1087 * graphite-interchange.c (pbb_interchange_loop_depths): Do not build
1088 a new polyhedron for the PBB_TRANSFORMED_SCATTERING.
1089 (pbb_do_interchange): Returns true when a transform has been performed.
1090 (scop_do_interchange): Same.
1091 * graphite-poly.c (apply_poly_transforms): Use the return value of
1092 scop_do_interchange.
1093 * graphite-poly.h (scop_do_interchange): Update declaration.
1095 2009-06-23 Tobias Grosser <grosser@fim.uni-passau.de>
1097 * graphite-clast-to-gimple.c (gloog): Reset loop->aux right
1099 * sese.c (sese_reset_aux_in_loops): New.
1100 * sese.h (sese_reset_aux_in_loops): New.
1102 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1104 * graphite-sese-to-poly.c (scan_tree_for_params_int): Pass in the
1105 multiplier and multiply the constant by the multiplier.
1106 (scan_tree_for_params): Bound the multiplier to its MULT_EXPR.
1107 (build_poly_dr): Do not use the multiplier to define the subscript.
1109 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1111 * graphite-poly.c (new_poly_dr): Pass an extra argument for the
1112 compiler's data reference. Initialize PDR_CDR.
1113 (print_pdr): Call dump_data_reference.
1114 * graphite-poly.h (struct poly_dr): Rename black_box into pbb.
1115 Add compiler_dr field.
1116 (PDR_BB): Renamed PDR_PBB.
1118 * graphite-sese-to-poly.c (build_poly_dr): Pass to new_poly_dr
1119 GCC's data reference representation.
1120 * tree-data-ref.c (debug_data_references, debug_data_reference): New.
1121 * tree-data-ref.h (debug_data_references, debug_data_reference): Decl.
1123 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1125 * graphite-poly.c (print_scattering_function): Also print the layout.
1126 * graphite-poly.h (pbb_nb_local_vars): New.
1128 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1130 * graphite-poly.c (print_pbb_domain): Also print the layout names.
1132 2009-06-19 Sebastian Pop <sebastian.pop@amd.com>
1134 * graphite-poly.c (print_pdr, debug_pdr): New.
1135 * graphite-poly.h (print_pdr, debug_pdr): Declared.
1136 (PDR_BASE): Removed.
1138 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1140 * gcc/testsuite/gcc.dg/graphite/interchange-{1..7}.c: New avatars of
1143 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1145 * graphite-interchange.c (compute_subscript): Allow also -1 in the
1146 subscript identification column.
1147 (pbb_do_interchange): Print to dump_file that some loops "will be
1148 interchanged". Rely on that chain of characters in the testcases.
1149 * gcc.dg/graphite/interchange-0.c: New.
1150 * gcc.dg/graphite/graphite.exp: Iterate over the testsuite
1151 interchange-*.c files and compile them with -floop-interchange.
1153 2009-06-18 Pranav Garg <pranav.garg2107@gmail.com>
1155 * graphite-interchange.c (interchange_profitable_p): Renamed
1156 pbb_interchange_profitable_p.
1158 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1159 Harsha Jagasia <harsha.jagasia@amd.com>
1160 Pranav Garg <pranav.garg2107@gmail.com>
1162 * graphite-interchange.c (interchange_profitable_p): Make static.
1163 (pbb_interchange_loop_depths, pbb_do_interchange,
1164 scop_do_interchange): New.
1165 * graphite-poly.c (apply_poly_transforms): Call scop_do_interchange
1166 for flag_loop_interchange.
1167 * graphite-poly.h (scop_do_interchange): Declared.
1168 * tree-ssa-loop.c (gate_graphite_transforms): Do not fail when
1169 flag_loop_interchange is used.
1171 2009-06-18 Sebastian Pop <sebastian.pop@amd.com>
1173 * graphite-dependences.c (dependence_polyhedron): Update use of
1174 pbb_nb_scattering_dims.
1175 * graphite-poly.h (pbb_nb_scattering_dims): Do not pass SCOP.
1176 (pbb_nb_scattering): Update use of pbb_nb_scattering_dims.
1177 (psco_scattering_dim, psct_scattering_dim, psco_iterator_dim,
1178 psct_iterator_dim, psco_parameter_dim, psct_parameter_dim): New.
1180 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1182 * graphite.c: Cleanup foo.
1184 2009-06-16 Sebastian Pop <sebastian.pop@amd.com>
1186 * Merge from mainline (r143684:148293).
1187 * Disabled libpcp until it gets fixed.
1189 2009-06-05 Sebastian Pop <sebastian.pop@amd.com>
1190 Harsha Jagasia <harsha.jagasia@amd.com>
1192 * graphite-interchange.c: New.
1193 * Makefile.in (graphite-interchange.o): New.
1194 * graphite-poly.h (interchange_profitable_p): Declared.
1195 * graphite-ppl.h (value_max): New.
1197 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1199 * graphite-dependences.c (dependence_polyhedron): Use pdr_dim.
1200 * graphite-poly.h: Fix some comments.
1204 2009-06-04 Sebastian Pop <sebastian.pop@amd.com>
1207 (pdr_accessp_nb_subscripts): Renamed pdr_nb_subscripts.
1208 (pdr_accessp_nb_iterators): Renamed pdr_dim_iter_domain.
1209 (pdr_accessp_nb_params): Renamed pdr_nb_params.
1210 (pdr_accessp_alias_set_dim): Renamed pdr_alias_set_dim.
1211 (pdr_accessp_subscript_dim): Renamed pdr_subscript_dim.
1212 (pdr_accessp_iterator_dim): Renamed pdr_iterator_dim.
1213 (pdr_accessp_param_dim): Renamed pdr_parameter_dim.
1214 (pbb_nb_loops): Renamed pbb_dim_iter_domain.
1215 * graphite-clast-to-gimple.c: Same.
1216 * graphite-dependences.c: Same.
1217 * graphite-poly.c: Same.
1218 * graphite-sese-to-poly.c: Same.
1220 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1222 * graphite-clast-to-gimple.c (build_iv_mapping): Insert full
1223 expressions for an IV rename, as returned by clast_to_gcc_expression.
1224 (copy_renames): Rename new_name to expr.
1225 * sese.c (debug_rename_elt): Same.
1228 (sese_adjust_liveout_phis): Call force_gimple_operand before using
1229 the information from the rename map.
1230 (rename_variables_in_stmt): Same.
1231 (add_loop_exit_phis): Rename new_name to expr.
1232 (insert_loop_close_phis): Same.
1233 (add_guard_exit_phis): Same. Call force_gimple_operand.
1234 * sese.h (struct rename_map_elt): Rename new_name to expr.
1235 (new_rename_map_elt): Same.
1237 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1239 * graphite-clast-to-gimple.c (build_iv_mapping): Use set_rename.
1240 * sese.c (set_rename): Make it extern.
1241 * sese.h (set_rename): Declared.
1243 2009-06-03 Sebastian Pop <sebastian.pop@amd.com>
1245 * graphite-poly.c (extend_scattering): Free values.
1246 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset):
1248 (ppl_print_powerset_matrix): Same.
1249 * graphite-scop-detection.c (free_scops_1): New.
1250 (limit_scops): Call free_scops_1.
1251 * graphite-sese-to-poly.c (build_scop_bbs_1): Free dom.
1252 (build_poly_dr): Free PPL coefficients.
1253 * tree-parloops.c (rewrite_all_phi_nodes_with_iv): Free bbs.
1255 2009-06-02 Sebastian Pop <sebastian.pop@amd.com>
1257 * graphite-dependences.c: New.
1258 * graphite-data-ref.c: Removed.
1259 * graphite-data-ref.h: Removed.
1260 * Makefile.in (graphite-data-ref.o): Removed.
1261 (graphite-dependences.o): Added.
1262 * graphite-clast-to-gimple.c: Remove dependence on graphite-data-ref.h.
1263 * graphite-poly.c: Same.
1264 Move the data dependence testing to graphite-dependences.c.
1266 2009-05-19 Tobias Grosser <grosser@fim.uni-passau.de>
1268 * graphite-scop-detection.c (graphite_can_represent_loop): Renamed
1269 from graphite_cannot_represent_loop. Code refactored.
1270 (scopdet_basic_block_info): Call graphite_can_represent_loop.
1272 2009-05-17 Li Feng <nemokingdom@gmail.com>
1274 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp:
1275 Cover all the testcases (not only the filtered ones).
1277 2009-05-17 Tobias Grosser <grosser@fim.uni-passau.de>
1279 * graphite-scop-detection.c (stmt_simple_for_scop_p): Remove
1280 unnecessary check. Update comments. Move check for REAL_TYPE here.
1281 (harmful_stmt_in_bb): Remove checks for conditions. This is already
1282 done in (stmt_simple_for_scop_p).
1284 2009-05-14 Tobias Grosser <grosser@fim.uni-passau.de>
1286 * graphite.c (print_global_statistics): New.
1287 (print_graphite_scop_statistic): New.
1288 (print_graphite_statistics): New.
1289 (graphite_initialize, graphite_transform_loops): Print statistics.
1290 * graphite-scop-detection (build_scops): Print statistics.
1291 (print_graphite_scop_statistics): New.
1292 (print_graphite_statistics): New.
1294 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1296 * graphite-clast-to-gimple.c (struct clast_name_index): Removed.
1297 (debug_clast_name_index): Removed.
1298 (debug_clast_name_indexes_1): Removed.
1299 (debug_clast_name_indexes): Removed.
1300 (clast_name_index_elt_info): Removed.
1301 (eq_clast_name_indexes): Removed.
1302 (clast_name_to_index): Removed.
1303 (new_clast_name_index): Removed.
1304 (save_clast_name_index): Removed.
1305 (save_var_name): Moved...
1306 (init_sese_params_index): Removed.
1307 (clast_name_to_gcc): Remove use of name_tree.
1308 (initialize_cloog_names): Same.
1309 (gloog): Do not call init_sese_params_index.
1310 * graphite-sese-to-poly.c (save_var_name): ...here.
1311 (parameter_index_in_region): New.
1312 * sese.c (new_sese): Initialize SESE_PARAMS_NAMES.
1313 (parameter_index_in_region): Removed.
1314 (is_parameter): Remove use of name_tree.
1315 * sese.h (struct name_tree): Removed.
1316 (struct sese): Remove use of name_tree. New field params_names.
1317 (SESE_PARAMS_NAMES): New.
1318 (SESE_PARAMS): Remove duplicate.
1319 (parameter_index_in_region): Removed.
1320 (sese_nb_params): Remove use of name_tree.
1321 (struct clast_name_index): New.
1322 (new_clast_name_index): New.
1323 (clast_name_to_index): New.
1324 (save_clast_name_index): New.
1325 (debug_clast_name_index): New.
1326 (debug_clast_name_indexes_1): New.
1327 (debug_clast_name_indexes): New.
1328 (clast_name_index_elt_info): New.
1329 (eq_clast_name_indexes): New.
1331 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1333 * graphite-clast-to-gimple.c (compute_cloog_iv_types_1): Call
1334 pbb_to_depth_to_oldiv. Remove call to oldiv_for_loop.
1335 (graphite_loop_normal_form): Do not pass region. Do not
1336 initialize SESE_OLDIVS.
1337 (build_graphite_loop_normal_form): Update call to
1338 graphite_loop_normal_form.
1339 * sese.c (debug_oldivs): Removed.
1340 (new_sese): Do not initialize SESE_OLDIVS.
1341 (free_sese): Do not free SESE_OLDIVS.
1342 (oldiv_for_loop): Removed.
1343 * sese.h (struct sese): Remove old_ivs.
1344 (SESE_OLDIVS): Removed.
1345 (oldiv_for_loop): Removed.
1347 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1349 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass newivs,
1350 remove ivstack. Remove call to loop_iv_stack_get_iv_from_name,
1351 replaced by a call to newivs_to_depth_to_newiv.
1352 (clast_to_gcc_expression): Pass newivs, remove ivstack.
1353 (clast_to_gcc_expression_red): Same.
1354 (gcc_type_for_clast_expr): Same.
1355 (gcc_type_for_clast_eq): Same.
1356 (graphite_translate_clast_equation): Same.
1357 (graphite_create_guard_cond_expr): Same.
1358 (graphite_create_new_guard): Same.
1359 (graphite_create_new_loop): Same.
1360 (build_iv_mapping): Same.
1361 (translate_clast): Same.
1363 (loop_iv_stack_patch_for_consts): Removed. *
1364 sese.c (iv_stack_entry_is_constant): Removed.
1365 (iv_stack_entry_is_iv): Removed.
1366 (loop_iv_stack_push_iv): Removed.
1367 (loop_iv_stack_insert_constant): Removed.
1368 (loop_iv_stack_pop): Removed.
1369 (loop_iv_stack_get_iv): Removed.
1370 (loop_iv_stack_get_iv_from_name): Removed.
1371 (debug_loop_iv_stack): Removed.
1372 (free_loop_iv_stack): Removed.
1373 (loop_iv_stack_remove_constants): Removed. *
1374 sese.h (iv_stack_entry_kind): Removed.
1375 (iv_stack_entry_data_union): Removed.
1376 (iv_stack_entry_struct): Removed.
1377 (iv_stack_entry_p): Removed.
1378 (debug_oldivs, debug_loop_iv_stack, loop_iv_stack_insert_constant,
1379 loop_iv_stack_get_iv_from_name, loop_iv_stack_push_iv,
1380 loop_iv_stack_get_iv, loop_iv_stack_remove_constants,
1381 loop_iv_stack_pop, free_loop_iv_stack): Removed.
1382 (gbb_loop_at_index): Fix indenting.
1383 (gbb_loop_index): Removed.
1385 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1387 * graphite-clast-to-gimple.c (clast_name_to_gcc): Do not use strcmp.
1388 Call clast_name_to_index.
1390 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1392 * graphite-clast-to-gimple.c (clast_name_to_gcc): Pass region,
1393 do not pass params. Get params from SESE_PARAMS.
1394 (clast_to_gcc_expression): Same.
1395 (clast_to_gcc_expression_red): Same.
1396 (gcc_type_for_clast_eq): Same.
1397 (graphite_translate_clast_equation): Same.
1398 (graphite_create_new_loop): Same.
1399 * sese.c (rename_variables_in_stmt): Fix comment.
1401 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1403 * graphite-clast-to-gimple.c (graphite_create_new_loop): Pass
1405 Call save_clast_name_index.
1406 (translate_clast): Pass newivs_index.
1407 (gloog): Create and free newivs_index.
1409 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1411 * graphite-clast-to-gimple.c (clast_name_index): New structure.
1412 (clast_name_index_p): New type.
1413 (debug_clast_name_index): New.
1414 (debug_clast_name_indexes_1): New.
1415 (debug_clast_name_indexes): New.
1416 (clast_name_index_elt_info): New.
1417 (eq_clast_name_indexes): New.
1418 (clast_name_to_index): New.
1419 (new_clast_name_index): New.
1420 (save_clast_name_index): New.
1421 (init_sese_params_index): New.
1422 (gloog): Call init_sese_params_index.
1423 * graphite-clast-to-gimple.h (debug_clast_name_indexes): Declared.
1424 * sese.c (new_sese): Initialize SESE_PARAMS_INDEX.
1425 (free_sese): Free SESE_PARAMS_INDEX.
1426 * sese.h (struct sese): Add params_index.
1427 (SESE_PARAMS_INDEX): New.
1429 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1431 * graphite-clast-to-gimple.c (newivs_to_depth_to_newiv): New.
1432 (graphite_create_new_loop): Pass the newivs vector. Push the
1433 newly created IV to newivs.
1434 (translate_clast): Pass the newivs vector.
1435 (gloog): Create and destroy the newivs vector.
1437 2009-05-13 Sebastian Pop <sebastian.pop@amd.com>
1439 * graphite-clast-to-gimple.c (pbb_to_depth_to_oldiv): New.
1440 (graphite_loop_normal_form): Initialize loop->aux with the unique
1441 IV that has been created.
1443 2009-05-13 Tobias Grosser <grosser@fim.uni-passau.de>
1445 * tree-chrec.c (evolution_function_right_is_integer_cst): Allow
1446 scev with parameters in the base part. They where forbidden
1449 2009-05-11 Li Feng <nemokingdom@gmail.com>
1451 * testsuite/gcc.dg/graphite/graphite.exp: Set different default
1452 compile options by file names.
1453 * testsuite/gcc.dg/graphite/block{0-6}.c: Remove dg-option line.
1454 * testsuite/gcc.dg/graphite/id-{1-9}.c: Ditto.
1455 * testsuite/gcc.dg/graphite/scop-{0-20}.c: Ditto.
1456 * testsuite/gcc.dg/graphite/scop-matmult.c: Ditto.
1458 2009-05-08 Li Feng <nemokingdom@gmail.com>
1460 * testsuite/gcc.dg/graphite/graphite_autopar/graphite_autopar.exp: New.
1461 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-1.c: New.
1462 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-2.c: New.
1463 * testsuite/gcc.dg/graphite/graphite_autopar/force-parallel-3.c: New.
1465 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1467 * graphite-scop-detection (build_scops_1): Fix little bug introduced
1470 2009-05-07 Tobias Grosser <grosser@fim.uni-passau.de>
1472 * graphite-scop-detection.c (graphite_can_represent_scev): Only
1473 allow integer constant strides.
1474 (graphite_can_represent_expr): Depend on outermost_loop.
1475 (stmt_simple_memref_p, graphite_cannot_represent_loop,
1476 harmful_stmt_in_bb, is_simple_operand, stmt_simple_for_scop_p,
1477 build_scops_1): Same.
1478 (scopdet_basic_block_info): Same and insert layered SCoP
1480 (try_generate_gimple_bb): Cleanup.
1481 (build_scops): Enable data references.
1483 * testsuite/gcc.dg/graphite/id-5.c: New.
1484 * testsuite/gcc.dg/graphite/id-9.c: New.
1485 * tree-chrec.c (evolution_function_right_is_integer_cst): New.
1486 * tree-chrec.h (evolution_function_right_is_integer_cst): New.
1488 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1490 * sese.c (expand_scalar_variables_ssa_name): Only build expressions,
1491 that we have not yet built for this SCoP.
1493 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1495 * sese.c (expand_scalar_variables_expr): Fix expand_scalar_variables
1496 for complex numbers.
1498 2009-05-06 Tobias Grosser <grosser@fim.uni-passau.de>
1500 * graphite-ppl.c: Fix build if cloog is not available.
1502 2009-05-04 Li Feng <nemokingdom@gmail.com>
1504 * tree-parloops.c (loop_parallel_p): Remove construction of
1505 NITER and REDUCTION_LIST.
1506 (try_get_loop_niter): New.
1507 (try_create_reduction_list): New.
1508 (parallelize_loops): Bypass the failed checkings in autopar
1509 when can_be_parallel in loop structure is set to true.
1511 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1513 * testsuite/gcc.dg/graphite/id-6.c: Update testcase.
1514 * testsuite/gcc.dg/graphite/scop-3.c: Dito.
1516 2009-05-01 Tobias Grosser <grosser@fim.uni-passau.de>
1518 * graphite-scop-detection.c (stmt_simple_for_scop_p):
1519 Enable EQ_EXPR and NE_EXPR again.
1521 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1523 * graphite-scop-detection.c (graphite_can_represent_scev):
1524 Add check if scev is affine multivariate.
1525 (harmful_stmt_in_bb): Check if we can represent the conditions.
1526 (scopdet_basic_block_info (basic_block bb, VEC): Pass the loop to
1528 * testsuite/gcc.dg/graphite/id-7.c: New.
1530 2009-04-30 Tobias Grosser <grosser@fim.uni-passau.de>
1532 * graphite-sese-to-poly.c (bb_contains_non_iv_scalar_phi_nodes):
1533 Check all bbs in region, not only the bbs that are represented in
1535 (build_poly_scop): Add newline.
1536 * testsuite/gcc.dg/graphite/id-8.c: New.
1538 2009-04-30 Li Feng <nemokingdom@gmail.com>
1540 * cfgloop.c (alloc_loop): Initialize can_be_parallel to false
1541 when loop initialize.
1542 * cfgloop.h (struct loop): Introduce flag can_be_parallel.
1543 * common.opt: Declare flag_graphite_force_parallel.
1544 * graphite-clast-to-gimple.c (translate_clast): Mark the innermost
1546 * graphite-poly.c (apply_poly_transforms): Introduce
1547 flag_graphite_force_parallel.
1548 * tree-ssa-loop.c (gate_graphite_transforms): ditto.
1549 * toplev.c (process_options): ditto and replace a not correctly
1552 2009-04-30 Li Feng <nemokingdom@gmail.com>
1554 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts):
1555 Change the call of gbb_loop_at_index and/or gbb_loop_index due
1556 to the redefinition.
1557 (compute_cloog_iv_types_1): ditto.
1558 (build_iv_mapping): ditto.
1559 * graphite-sese-to-poly.c (new_gimple_bb): Remove GBB_LOOPS related
1561 (free_gimple_bb): Removed GBB_LOOPS related free part.
1562 (build_bb_loops): Removed.
1563 * sese.h (struct gimple_bb): Removed loops.
1564 (GBB_LOOPS): Removed.
1565 (gbb_loop_at_index): Instead of using GBB_LOOPS, we use sese instead.
1566 (gbb_loop_index): ditto.
1568 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1570 * graphite-scop-detection.c (graphite_can_represent_scev): Do not
1571 allow non constant strides.
1572 * testsuite/gcc.dg/graphite/scop-20.c: New.
1574 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1576 * graphite-scop-detection.c (dot_all_scops): Fix system call
1577 return value warning.
1580 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1582 * testsuite/gcc.dg/graphite/id-6.c: Fix pattern.
1583 * testsuite/gcc.dg/graphite/scop-3.c: Same.
1585 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1587 * graphite-poly.c (map_into_dep_poly, map_dr_into_dep_poly,
1588 build_pairwise_constraint, dr_equality_constraints,
1589 build_pairwise_scheduling_equality,
1590 build_pairwise_scheduling_inequality, lexicographically_gt_p,
1591 build_lexicographically_gt_constraint, dependence_polyhedron,
1592 graphite_legal_transform_dr, graphite_legal_transform_bb,
1593 graphite_legal_transform): New.
1594 * graphite-poly.h (graphite_legal_transform): Declared.
1595 * graphite-sese-to-poly.c (build_poly_scop): Call to
1596 graphite_legal_transform is disabled for the moment.
1598 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1600 * graphite-poly.h (pbb_nb_scattering_dims): New.
1601 (pbb_nb_scattering): Use it.
1603 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1605 * graphite-ppl.c (ppl_insert_dimensions_pointset): Add
1606 Pointset_Powerset version of ppl_insert_dimensions.
1607 * graphite-ppl.h (ppl_insert_dimensions_pointset): Declared.
1609 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1611 * graphite-ppl.c (ppl_insert_dimensions): Fix formatting.
1613 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1615 * graphite-poly.h: Fix comment.
1617 2009-04-24 Sebastian Pop <sebastian.pop@amd.com>
1619 * graphite-sese-to-poly.c (build_poly_dr): Fix data ref multiplier.
1621 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1623 * sese.c (expand_scalar_variables_stmt): Only iterate over the old
1626 2009-04-24 Tobias Grosser <grosser@fim.uni-passau.de>
1628 * graphite-sese-to-poly.c (var_used_in_not_loop_header_phi_node): New.
1629 (graphite_stmt_p): Represent bbs necessary to build the phi nodes of
1632 2009-04-20 Sebastian Pop <sebastian.pop@amd.com>
1634 * graphite-scop-detection.c (stmt_simple_for_scop_p): Do not
1635 handle EQ_EXPR and NE_EXPR.
1637 2009-04-17 Tobias Grosser <grosser@fim.uni-passau.de>
1639 * graphite-poly.h (poly_dr): Fix comment.
1641 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1642 Tobias Grosser <grosser@fim.uni-passau.de>
1644 * graphite-poly.c (new_poly_bb): Do not initialize PBB_DOMAIN
1645 with a zero dimension polyhedron.
1646 (find_scop_parameters): Move the call to scop_set_nb_params here.
1647 (build_loop_iteration_domains): Store in loop->aux the iteration
1649 (build_scop_iteration_domain): Fix PBB_DOMAIN for bbs not surrounded
1650 by any loop in scop.
1651 (build_poly_scop): Do not call scop_set_nb_params.
1653 2009-04-09 Sebastian Pop <sebastian.pop@amd.com>
1654 Tobias Grosser <grosser@fim.uni-passau.de>
1656 * graphite-sese-to-poly.c (add_condition_to_pbb): Pass code to
1657 add_condition_to_domain not GT_EXPR.
1659 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1661 * graphite-ppl.c (debug_ppl_powerset_matrix): New.
1662 * graphite-ppl.h (debug_ppl_powerset_matrix): New.
1663 * graphite-sese-to-poly.c (add_condition_to_pbb): Use
1664 upper_bound_assign to calculate unions.
1665 * testsuite/gcc.dg/graphite/id-6.c: New.
1667 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1669 * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Do not
1670 handle abnormal edges.
1672 2009-04-09 Tobias Grosser <grosser@fim.uni-passau.de>
1674 * graphite-poly.c (new_poly_dr, free_poly_dr): New.
1675 (free_poly_bb): Also free poly_drs.
1676 * graphite-poly.h (new_poly_dr, free_poly_dr): New.
1677 (poly_dr): Polyhedron to Pointset_Powerset.
1678 (pdr_accessp_nb_subscripts): Same.
1679 * graphite-sese-to-poly.c (build_poly_dr): Same. And actually build
1682 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1684 * graphite-clast-to-gimple.c (initialize_cloog_names): Change cloog
1685 names into more meaningful names.
1687 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1689 * testsuite/gfortran.dg/graphite/interchange-1.c: New.
1690 * testsuite/gfortran.dg/graphite/interchange-2.c: New.
1692 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1694 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not build
1696 * tree-parloops.c (rewrite_phi_with_iv): New.
1697 (rewrite_all_phi_nodes_with_iv): New.
1698 (canonicalize_loop_ivs): Call them.
1700 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1702 * graphite-sese-to-poly.c (try_generate_gimple_bb): Use
1703 graphite_find_data_references_in_stmt.
1704 * tree-data-ref.c (graphite_find_data_references_in_stmt): New.
1705 * tree-data-ref.h (graphite_find_data_references_in_stmt): Declared.
1707 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1709 * sese.c (add_loop_exit_phis): Don't fail on non SSA_NAME renames.
1711 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1713 * graphite-sese-to-poly.c (build_scop_bbs_1): Use bb_in_sese_p
1714 instead of bb_in_region.
1715 (flag_bb_in_region): Same. Renamed flag_bb_in_sese.
1716 (build_sese_conditions): Use flag_bb_in_sese.
1717 * sese.c (register_bb_in_sese): Removed.
1718 (new_sese): Remove initialization of SESE_REGION_BBS.
1719 (free_sese): Do not free SESE_REGION_BBS.
1720 * sese.h (struct sese): Remove field region_basic_blocks.
1721 (SESE_REGION_BBS): Removed.
1722 (bb_in_sese_p): Implement in function of bb_in_region.
1724 2009-04-08 Sebastian Pop <sebastian.pop@amd.com>
1726 * graphite-scop-detection.c (limit_scops): Deal only with single exit
1729 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1731 * graphite-scop-detection.c (stmt_simple_for_scop_p): Allow NE_EXPR
1733 * graphite-sese-to-poly.c (create_linear_expr_from_tree): New.
1734 (add_condition_to_domain): New.
1735 (add_condition_to_pbb): New.
1736 (add_conditions_to_domain): Cleanup and handle of NE_EXPR and EQ_EXPR.
1737 * testsuite/gcc.dg/graphite/scop-3.c: Update number of detected SCoPs.
1739 2009-04-08 Tobias Grosser <grosser@fim.uni-passau.de>
1741 * graphite-clast-to-gimple.c (build_cloog_prog): ppl_Polyhedron ->
1742 ppl_Pointset_Powerset.
1743 * graphite-poly.c (new_poly_bb, free_poly_bb): Same.
1744 * graphite-poly.h (poly_bb): poly_bb.domain Same.
1745 (pbb_nb_loops): Same.
1746 * graphite-sese-to-poly.c (build_loop_iteration_domains,
1747 add_conditions_to_domain): Same.
1748 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Pointset_Powerset): New.
1749 (ppl_print_polyhedron_matrix): ppl_Polyhedron_t ->
1750 ppl_const_Polyhedron_t.
1751 (ppl_print_powerset_matrix): New.
1752 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Pointset_Powerset,
1753 ppl_print_powerset_matrix): New.
1754 (ppl_print_polyhedron_matrix): Updated.
1756 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1758 * tree-scalar-evolution.c (analyze_scalar_evolution_1): Fix comment.
1760 2009-04-07 Sebastian Pop <sebastian.pop@amd.com>
1762 * graphite-poly.c (extend_scattering): Fix indenting. Free cstr.
1763 (print_iteration_domains, debug_iteration_domain,
1764 debug_iteration_domains): New.
1765 * graphite-poly.h (print_iteration_domains, debug_iteration_domain,
1766 debug_iteration_domains): Declared.
1767 * graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Fix
1770 2009-04-03 Tobias Grosser <grosser@fim.uni-passau.de>
1771 Sebastian Pop <sebastian.pop@amd.com>
1773 * graphite-poly.h (print_iteration_domain): New.
1774 * graphite-sese-to-poly.c (add_conditions_to_domain): Fixed bug.
1775 (build_sese_conditions_1, build_sese_conditions_after,
1776 build_sese_conditions_before): New.
1777 (build_sese_conditions): Rewritten.
1779 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1780 Tobias Grosser <grosser@fim.uni-passau.de>
1782 Cleanup of code generation liveouts.
1783 * graphite-clast-to-gimple.c (translate_clast): Use a single
1784 rename_map instead of one per translated statement.
1785 Do not use SESE_LIVEOUT_RENAMES.
1786 (graphite_loop_normal_form): Do not use SESE_REDUCTION_LIST.
1787 (gloog): Do not use SESE_LIVEOUT_RENAMES.
1788 * graphite-scop-detection.c (harmful_stmt_in_bb): Return the close
1789 phi node of a reduction: when a loop contains a reduction used outside
1790 the loop, there should be a scalar close phi node on the exit block.
1791 * sese.c (new_sese): Do not initialize SESE_LIVEOUT,
1792 SESE_LIVEOUT_RENAMES, and SESE_REDUCTION_LIST.
1793 (free_sese): Do not free them.
1794 (sese_build_liveouts_use): Do not use them.
1795 (sese_build_liveouts_bb): Same.
1796 (sese_build_liveouts): Same.
1797 (sese_insert_phis_for_liveouts): Same.
1798 (sese_adjust_phis_for_liveouts): Same. Renamed sese_adjust_liveout_phis.
1799 (defined_in_loop_p): New.
1800 (alive_after_loop): New.
1801 (close_phi_not_yet_inserted_p): New.
1802 (struct alep, alep_p): New.
1803 (add_loop_exit_phis): Remove from the rename_map all the names defined
1804 in the code generated loop.
1805 (insert_loop_close_phis): Traverse the rename_map passed to it.
1806 Don't use SESE_LIVEOUT_RENAMES.
1807 (default_liveout_before_guard): Renamed default_before_guard.
1808 (insert_guard_phis): Do not use SESE_LIVEOUT_RENAMES.
1809 (graphite_copy_stmts_from_block): Do not directly call set_rename.
1810 (register_sese_liveout_renames): Removed.
1811 (copy_bb_and_scalar_dependences): Do not call it.
1812 * sese.h (struct sese): Removed fields: liveout, liveout_renames, and
1814 (SESE_LIVEOUT): Removed.
1815 (SESE_LIVEOUT_RENAMES): Removed.
1816 (SESE_REDUCTION_LIST): Removed.
1817 (sese_build_liveouts): Removed.
1818 (sese_adjust_phis_for_liveouts): Renamed sese_adjust_liveout_phis.
1819 (insert_loop_close_phis): Pass a htab_t instead of a sese.
1820 (insert_guard_phis): Same.
1821 (rename_map_elt): Declare a VEC of them.
1822 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
1823 trees not pointers to trees.
1825 Rewrite in canonical close SSA form:
1826 * graphite-scop-detection.c (contains_only_close_phi_nodes): New.
1827 (limit_scops): Close the scop after the block containing the close phi
1829 (canonicalize_loop_closed_ssa): New.
1830 (canonicalize_loop_closed_ssa_form): New.
1831 (build_scops): Call canonicalize_loop_closed_ssa_form.
1833 * graphite-sese-to-poly.c: Fix typos.
1835 2009-04-03 Sebastian Pop <sebastian.pop@amd.com>
1837 * graphite-poly.c (print_scattering_function, print_pbb_domain):
1839 (dump_gbb_conditions, dump_gbb_cases, print_iteration_domain): New.
1840 (print_pbb): Add conditions.
1842 2009-04-01 Tobias Grosser <grosser@fim.uni-passau.de>
1843 Sebastian Pop <sebastian.pop@amd.com>
1845 * graphite-scop-detection.c (bb_in_sd_region): Use bb_in_region.
1846 * graphite-sese-to-poly.c (all_non_dominated_preds_marked_p): New.
1847 (build_scop_bbs_1): New.
1848 (build_scop_bbs): Rewrite.
1849 * sese.h (bb_in_region): New.
1851 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1853 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1855 (print_scop): Style.
1856 * graphite-poly.h (poly_bb): Add drs vector.
1857 (PBB_DRS): Add accessor.
1858 * graphite-sese-to-poly.c (build_poly_dr): New.
1859 (build_pbb_drs, build_scop_drs): New.
1860 (build_poly_scop): call build_scop_drs (Disabled at the moment).
1862 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1864 * tree-ssa-loop.c: Include forgotten toplev.h
1866 2009-03-29 Tobias Grosser <grosser@fim.uni-passau.de>
1868 * graphite-poly.c: (apply_poly_transforms): sorry -> gcc_unreachable.
1869 * testsuite/gcc.dg/graphite/pr37883.c: Remove -floop-*
1870 * testsuite/gcc.dg/graphite/pr37928.c: Same
1871 * testsuite/gcc.dg/graphite/pr38409.c: Same
1872 * testsuite/gcc.dg/graphite/pr38498.c: Same
1873 * testsuite/gcc.dg/graphite/pr38559.c: Same
1874 * testsuite/gcc.dg/graphite/pr39335.c: Same
1875 * testsuite/gcc.dg/graphite/pr39335_1.c: Same
1876 * testsuite/gfortran.dg/graphite/block-2.f: Same
1877 * tree-ssa-loop.c (gate_graphite_transforms): Always fail if called
1880 2009-03-28 Tobias Grosser <grosser@fim.uni-passau.de>
1882 * graphite-sese-to-poly.c (ref_nb_loops, build_access_matrix_with_af,
1883 build_access_matrix, build_scop_data_accesses): Remove access function
1884 building. (We get a new version soon).
1885 (build_bb_loops, scan_tree_for_params_right_scev): Update.
1886 * sese.h (nb_loops_around_loop_in_sese): Remove.
1887 (sese_loop_depth): Do not use SESE_LOOP_NEST any more.
1889 2009-03-27 Tobias Grosser <grosser@fim.uni-passau.de>
1890 Sebastian Pop <sebastian.pop@amd.com>
1892 * graphite-scop-detection.c (struct scopdet_info): Rename last
1894 (scopdet_basic_block_info, build_scops_1): Don't use
1895 CDI_POST_DOMINATORS. CDI_POST_DOMINATORS should never be used.
1897 2009-03-26 Tobias Grosser <grosser@fim.uni-passau.de>
1898 Sebastian Pop <sebastian.pop@amd.com>
1900 * graphite-clast-to-gimple.c (gloog): Call sese_build_liveouts.
1901 * sese.c (sese_build_liveouts_use): Renamed from
1902 sese_build_livein_liveouts_use. Remove liveins.
1903 (sese_build_liveouts_bb): Renamed from sese_build_livein_liveouts_bb.
1904 Call sese_build_liveouts_use.
1905 (sese_build_liveouts): Renamed from sese_build_livein_liveouts.
1906 Call sese_build_liveouts_bb.
1907 (new_sese, free_sese): Remove liveins.
1908 (sese_add_exit_phis_var): Deleted.
1909 (sese_insert_phis_for_liveouts): Call sese_add_exit_phis_edge
1911 (graphite_copy_stmts_from_block): Remove SESE_NUM_VER.
1913 * sese.h (sese): Remove num_ver and livein.
1914 (SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): Removed.
1916 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1918 * graphite-sese-to-poly.c (build_scop_scattering): Fix compile.
1920 2009-03-25 Tobias Grosser <grosser@fim.uni-passau.de>
1922 * graphite-sese-to-poly.c (compare_prefix_loops): Removed.
1923 (build_scop_scattering): Do not use compare_prefix_loops any more.
1924 (nb_common_loops): New.
1926 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1928 * sese.c (get_new_name_from_old_name): Renamed get_rename.
1929 (register_old_and_new_names): Renamed set_rename.
1931 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1933 * graphite-scop-detection.h (nb_reductions_in_loop): Revert removal
1934 of the decl from the previous commit.
1936 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1938 * graphite-scop-detection.c (dot_scop): New.
1939 * graphite-scop-detection.h (dot_scop): Declared.
1941 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1943 * graphite-sese-to-poly.c (compare_prefix_loops): Fix compare.
1945 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1947 * cfgloopmanip.c (create_empty_loop_on_edge): Generate the loop exit
1948 condition at the end of the loop.
1949 * graphite.c (graphite_initialize, graphite_finalize): Print to
1950 dump_file the compiled function.
1951 * graphite-clast-to-gimple.c (graphite_create_new_loop): Update use
1952 of create_empty_loop_on_edge.
1953 (translate_clast): Update the code generation of loops for the new
1955 * cfgloop.h (create_empty_loop_on_edge): Update declaration.
1957 2009-03-24 Sebastian Pop <sebastian.pop@amd.com>
1959 Reverted the patch from 2009-03-19.
1961 2009-03-19 Tobias Grosser <grosser@fim.uni-passau.de>
1963 * graphite-poly.c (new_poly_bb, free_poly_bb): Initialize/free
1965 (print_scop): Style.
1966 * graphite-poly.h (poly_bb): Add drs vector.
1967 (PBB_DRS): Add accessor.
1968 * graphite-sese-to-poly.c (ref_nb_loops): Remove.
1969 (build_access_matrix_with_af, build_access_matrix,
1970 build_scop_data_accesses): Delete.
1971 (build_poly_dr): New.
1972 (build_pbb_drs, build_scop_drs): New.
1973 (build_poly_scop): call build_scop_drs.
1975 2009-03-13 Sebastian Pop <sebastian.pop@amd.com>
1977 * graphite-scop-detection.c (dot_all_scops_1): Close the table
1978 once per basic block.
1980 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1982 * graphite-scop-detection.c (graphite_can_represent_scev): New.
1983 (graphite_can_represent_expr): Renamed from loop_affine_expr
1985 (stmt_simple_for_scop_p): Call graphite_can_represent_expr.
1986 (graphite_cannot_represent_loop): Add scop_entry to parameters.
1987 (scopdet_basic_block_info): Actually define entry_block.
1988 (stmt_simple_memref_p): Moved here from ...
1990 * tree-data-ref.c (stmt_simple_memref_p): here.
1991 * tree-data-ref.h (stmt_simple_memref_p): Removed.
1993 2009-03-13 Tobias Grosser <grosser@fim.uni-passau.de>
1995 * testsuite/gcc.dg/graphite/id-4.c: New.
1997 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
1999 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2000 (register_old_and_new_names): Update the content of the map.
2001 When there was already a rename_map_elt in the map at that
2003 (copy_bb_and_scalar_dependences): Do rename_variables after
2004 expand_scalar_variables.
2005 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2006 of the map. When there was already a rename_map_elt in the
2007 map at that location, free it.
2008 (translate_clast): Pass the rename_map. Do not initialize and free
2009 a rename_map per stmt_user.
2010 (gloog): Initialize and free one rename_map and pass it to
2013 2009-03-12 Sebastian Pop <sebastian.pop@amd.com>
2015 * sese.c (expand_scalar_variables_stmt,
2016 expand_scalar_variables_ssa_name): Add a gimple_stmt_iterator
2018 (expand_scalar_variables_expr): Handle REALPART_EXPR and IMAGPART_EXPR.
2019 (expand_scalar_variables): Pass to expand_scalar_variables_stmt
2020 the gimple_stmt_iterator of the statement to be expanded.
2021 * graphite-scop-detection.c (is_simple_operand): Do handle
2024 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2026 * graphite-scop-detection.c (is_simple_operand): Do not handle
2028 * testsuite/gcc.dg/graphite/id-2.c: New.
2030 * graphite-sese-to-poly.c (build_bb_loops,
2031 add_value_to_dim, scan_tree_for_params_right_scev,
2032 scan_tree_for_params_int, scan_tree_for_params, idx_record_params,
2033 find_params_in_bb, build_loop_iteration_domains,
2034 add_conditions_to_domain): Remove subtract.
2036 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2038 * graphite-clast-to-gimple.c (loop_iv_stack_patch_for_consts,
2039 build_iv_mapping, compute_cloog_iv_types_1, build_cloog_prog):
2040 pbb_loop_at_index -> gbb_loop_at_index.
2041 * graphite-poly.c (new_poly_bb, new_scop): New accessors.
2042 (debug_loop_vec): Delete.
2043 * graphite-poly.h (poly_bb, scop): Change black_box and region to void
2044 pointer. Move LOOPS to gimple_bb_p and insert nb_params.
2045 (PBB_LOOPS): Removed.
2046 (PBB_BLACK_BOX): Insert cast.
2047 (pbb_set_black_box): New setter.
2048 (pbb_loop_at_index, pbb_loop_index): Removed.
2049 (scop_set_region, scop_set_nb_params): New.
2050 * graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb,
2051 build_scop_scattering, build_bb_loops): Add GBB_LOOPS.
2052 (build_poly_scop): Use scop_set_nb_params.
2053 * sese.h (gimple_bb): Add LOOPS.
2054 (GBB_LOOPS, gbb_loop_index, gbb_loop_at_index): New.
2056 2009-03-11 Tobias Grosser <grosser@fim.uni-passau.de>
2058 Revert previous commit.
2060 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2062 * sese.c (expand_scalar_variables_expr): Handle tcc_comparison.
2063 (register_old_and_new_names): Update the content of the map.
2064 When there was already a rename_map_elt in the map at that
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-11 Tobias Grosser <grosser@fim.uni-passau.de>
2078 Remove forgotten line in revert.
2080 2009-03-11 Sebastian Pop <sebastian.pop@amd.com>
2082 Revert previous commit.
2084 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2086 * sese.c (register_old_and_new_names): Update the content
2087 of the map. When there was already a rename_map_elt in the
2088 map at that location, free it.
2089 (copy_bb_and_scalar_dependences): Do rename_variables after
2090 expand_scalar_variables.
2091 * graphite-clast-to-gimple.c (build_iv_mapping): Update the content
2092 of the map. When there was already a rename_map_elt in the
2093 map at that location, free it.
2094 (translate_clast): Pass the rename_map. Do not initialize and free
2095 a rename_map per stmt_user.
2096 (gloog): Initialize and free one rename_map and pass it to
2099 2009-03-10 Sebastian Pop <sebastian.pop@amd.com>
2101 * graphite-clast-to-gimple.c (translate_clast): context_loop
2104 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2105 Sebastian Pop <sebastian.pop@amd.com>
2107 * graphite-ppl.c (ppl_insert_dimensions): Fix stupid mistake
2108 of the use of ppl_Polyhedron_map_space_dimensions.
2110 2009-03-10 Tobias Grosser <grosser@fim.uni-passau.de>
2111 Sebastian Pop <sebastian.pop@amd.com>
2113 * graphite-poly.c (unify_scattering_dimensions): Fix types.
2114 * graphite-poly.h (poly_dr_p, poly_dr, POLY_DR_TYPE, PDR_BB,
2115 PDR_TYPE, PDR_ACCESSES, pdr_accessp_nb_subscripts,
2116 pdr_accessp_nb_iterators, pdr_accessp_nb_params,
2117 pdr_accessp_alias_set_dim, pdr_accessp_subscript_dim,
2118 pdr_accessp_iterator_dim, pdr_accessp_param_dim,
2119 pbb_nb_params): New.
2120 (pbb_nb_loops, pbb_nb_scattering, scop_nb_params,
2121 nb_loops_around_pbb): Adapt return types.
2123 2009-03-09 Tobias Grosser <grosser@fim.uni-passau.de>
2125 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2126 graphite-clast-to-gimple.o, graphite-data-ref.o,
2127 graphite-scop-detection.o, graphite-poly.o): Add
2130 2009-03-05 Tobias Grosser <grosser@fim.uni-passau.de>
2132 * Makefile.in (graphite.o, graphite-sese-to-poly.o,
2133 graphite-clast-to-gimple.o, graphite-data-ref.o,
2134 graphite-scop-detection.o, graphite-poly.o): Add graphite-poly.h.
2136 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2138 * testsuite/gcc.dg/graphite/pr37485.c: Remove -floop-block
2139 * testsuite/gcc.dg/graphite/pr37828.c: Same.
2140 * testsuite/gcc.dg/graphite/pr37684.c: Same.
2141 * testsuite/gcc.dg/graphite/block-0.c: Same.
2142 * testsuite/gcc.dg/graphite/block-1.c: Same.
2143 * testsuite/gcc.dg/graphite/block-2.c: Same.
2144 * testsuite/gcc.dg/graphite/block-3.c: Same.
2145 * testsuite/gcc.dg/graphite/block-4.c: Same.
2146 * testsuite/gcc.dg/graphite/block-5.c: Same.
2147 * testsuite/gcc.dg/graphite/block-6.c: Same.
2148 * testsuite/gfortran.dg/graphite/pr38083.f90: Same.
2149 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
2150 * testsuite/gfortran.dg/graphite/block-3.f90: Same.
2151 * testsuite/gfortran.dg/graphite/pr37852.f90: Same.
2152 * testsuite/gfortran.dg/graphite/block-4.f90: Same.
2153 * testsuite/gfortran.dg/graphite/pr37980.f90: Same.
2154 * testsuite/gfortran.dg/graphite/pr38953.f90: Same.
2155 * testsuite/gfortran.dg/graphite/pr37857.f90: Same.
2156 * opts.c: Remove -floop-block from -O2.
2157 * graphite-poly.c: Fail if -floop-block -floop-interchange or
2158 -floop-strip-mine are used.
2160 2009-03-04 Tobias Grosser <grosser@fim.uni-passau.de>
2161 Sebastian Pop <sebastian.pop@amd.com>
2163 * graphite-clast-to-gimple.c (build_cloog_prog): Unify scattering
2165 * graphite-poly.c (pbb_compare, graphite_sort_pbbs,
2166 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine,
2167 strip_mine_profitable_p, is_interchange_valid,
2168 graphite_trans_bb_block, graphite_trans_loop_block,
2169 graphite_trans_scop_block): Temporary removed.
2170 (extend_scattering, unify_scattering_dimensions): New.
2171 (print_scattering_function, graphite_read_transforms):
2172 PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2173 (graphite_generate_scattering_fns): Removed.
2174 (apply_poly_transforms): Cleanup.
2175 (free_poly_bb): Add PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2176 (schedule_to_scattering): Moved.
2177 (PBB_STATIC_SCHEDULE, PBB_SCATTERING): Removed.
2178 (PBB_ORIGINAL_SCATTERING, PBB_TRANSFORMED_SCATTERING): New.
2179 (pbb_nb_scattering): New.
2180 (SCOP_ENTRY, SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2181 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES):
2183 * graphite-ppl.c (ppl_insert_dimensions): Extended and renamed from
2185 (ppl_strip_loop): PBB_SCATTERING -> PBB_TRANSFORMED_SCATTERING.
2186 * graphite-scop-detection.c (dot_all_scops_1): PBB_SCATTERING
2187 -> PBB_TRANSFORMED_SCATTERING.
2188 * graphite-sese-to-poly.c (build_scop_bbs): Remove region.
2189 (build_pbb_scattering_polyhedron): Moved from schedule_to_scattering.
2190 (build_scop_scattering): Renamed from build_scop_canonical_schedules.
2191 (check_poly_representation): Do not return bool.
2192 (graphite_transform_loops): Reformat.
2193 * sese.h (SESE_ENTRY_BB, SESE_EXIT_BB): New.
2195 2009-03-04 Sebastian Pop <sebastian.pop@amd.com>
2197 * graphite-poly.c (print_pbb_domain, print_pbb, print_scop,
2198 debug_pbb_domain, debug_pbb, debug_scop): New.
2199 * graphite-poly.h (print_pbb_domain, print_pbb, print_scop,
2200 debug_pbb_domain, debug_pbb, debug_scop): Declared.
2202 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2205 * tree-parloops.c (canonicalize_loop_ivs): Call fold_convert
2206 when the type precision of the induction variable should be
2207 larger than the type precision of nit.
2208 (gen_parallel_loop): Update use of canonicalize_loop_ivs.
2209 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Same.
2210 * tree-flow.h (canonicalize_loop_ivs): Update declaration.
2212 * testsuite/gcc.dg/graphite/pr39335_1.c: New.
2213 * testsuite/gcc.dg/graphite/pr39335.c: New.
2215 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2217 * tree-parloops.c (canonicalize_loop_ivs): reduction_list contains
2218 SSA_NAMES not struct reduction_info.
2220 2009-03-02 Sebastian Pop <sebastian.pop@amd.com>
2222 * sese.c (expand_scalar_variables_expr): Handle ADDR_EXPR.
2224 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2225 Tobias Grosser <grosser@fim.uni-passau.de>
2227 * sese.c (new_sese): Initialize SESE_REDUCTION_LIST.
2228 (free_sese): Free SESE_REDUCTION_LIST.
2229 * sese.h (struct sese): Add field reduction_list.
2230 (SESE_REDUCTION_LIST): New.
2231 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Call
2232 canonicalize_loop_ivs on SESE_REDUCTION_LIST.
2234 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2235 Tobias Grosser <grosser@fim.uni-passau.de>
2237 * tree-flow.h (gather_scalar_reductions): Use struct loop * instead
2240 2009-02-27 Sebastian Pop <sebastian.pop@amd.com>
2241 Tobias Grosser <grosser@fim.uni-passau.de>
2243 * tree-parloops.c (struct brli, build_reduction_list_info,
2244 analyze_reduction_list, gather_scalar_reductions): New.
2245 (loop_parallel_p): Build a reduction list containing only
2246 PHI_RESULT SSA_NAMEs: call gather_scalar_reductions.
2247 (gen_parallel_loop): Call the analysis analyze_reduction_list.
2248 (parallelize_loops): Now reduction_list is a htab_t of SSA_NAMEs.
2249 * tree-flow.h (gather_scalar_reductions): Declared.
2251 2009-02-26 Sebastian Pop <sebastian.pop@amd.com>
2254 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Do not call
2255 number_of_iterations_exit from a gcc_assert.
2257 2009-02-25 Sebastian Pop <sebastian.pop@amd.com>
2258 Jan Sjodin <jan.sjodin@amd.com>
2260 * output.h (graphite_out_file, graphite_in_file): Declared.
2261 * toplev.c (graphite_out_file, graphite_in_file): New.
2262 (init_asm_output): Initialize graphite_in_file and graphite_out_file.
2263 * graphite-clast-to-gimple.c (build_cloog_prog): Read PBB_SCATTERING.
2264 Don't call schedule_to_scattering.
2265 * common.opt (fgraphite-write, fgraphite-read): New.
2266 * graphite-poly.c: Include output.h.
2267 (print_scattering_function, print_scattering_functions,
2268 debug_scattering_function, debug_scattering_functions,
2269 graphite_write_transforms, graphite_read_transforms,
2270 graphite_generate_scattering_fns): New.
2271 (apply_poly_transforms): Do not apply transform if flag_graphite_read.
2272 Call graphite_generate_scattering_fns, graphite_write_transforms,
2273 graphite_read_transforms.
2274 (new_poly_bb): Initialize PBB_SCATTERING.
2275 (free_poly_bb): Free PBB_SCATTERING.
2276 (schedule_to_scattering): Does not return, initialize PBB_SCATTERING.
2277 * graphite-poly.h (struct poly_bb): Add field scattering.
2278 (PBB_SCATTERING): New.
2279 (print_scattering_function, print_scattering_functions,
2280 debug_scattering_function, debug_scattering_functions): Declared.
2281 * graphite-ppl.c (cloog_matrix_to_ppl_constraint): Matrices contain
2282 GMP values, not integers!
2283 (ppl_print_polyhedron_matrix, debug_ppl_polyhedron_matrix,
2284 ppl_read_polyhedron_matrix): New.
2285 * graphite-ppl.h (ppl_print_polyhedron_matrix,
2286 debug_ppl_polyhedron_matrix,
2287 ppl_read_polyhedron_matrix): Declared.
2288 * Makefile.in (graphite-poly.o): Depends on output.h.
2290 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2291 Tobias Grosser <grosser@fim.uni-passau.de>
2294 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2295 scalar evolutions in the scop_entry->loop_father.
2297 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2298 Tobias Grosser <grosser@fim.uni-passau.de>
2300 * graphite.h (ref_nb_loops): Remove declaration.
2301 (struct gimple_bb, gimple_bb_p, GBB_BB, GBB_DATA_REFS, GBB_CONDITIONS,
2302 GBB_CONDITION_CASES, GBB_CLOOG_IV_TYPES, gbb_loop, print_gimple_bb,
2303 debug_gbb): Moved to sese.h.
2306 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2307 Tobias Grosser <grosser@fim.uni-passau.de>
2309 * graphite-data-ref.[ch]: Disable.
2311 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2312 Tobias Grosser <grosser@fim.uni-passau.de>
2314 * graphite-scop-detection.c (stmt_simple_for_scop_p): Analyze
2315 scalar evolutions in the scop_entry->loop_father.
2317 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2319 * graphite-scop-detection.c (nb_reductions_in_loop): Moved here...
2320 (graphite_cannot_represent_loop_niter): Renamed
2321 graphite_cannot_represent_loop. Call nb_reductions_in_loop.
2322 (limit_scops): build_sese_loop_nests does not return a bool.
2323 * graphite-scop-detection.h (nb_reductions_in_loop): Declared.
2324 * sese.c (nb_reductions_in_loop): ... from here.
2325 (graphite_loop_normal_form): ... from here.
2326 (sese_record_loop): Does not fail, so does not return a bool.
2327 (build_sese_loop_nests): Same.
2328 * sese.h (build_sese_loop_nests): Update declaration.
2329 * graphite-clast-to-gimple.c (graphite_loop_normal_form): Moved here...
2330 (build_graphite_loop_normal_form): New.
2331 (gloog): Call build_graphite_loop_normal_form.
2332 * graphite-sese-to-poly.c (build_poly_scop): Don't fail on
2333 build_sese_loop_nests.
2335 * testsuite/gcc.dg/graphite/id-1.c: New.
2337 2009-02-23 Sebastian Pop <sebastian.pop@amd.com>
2338 Tobias Grosser <grosser@fim.uni-passau.de>
2340 * graphite-sese-to-poly.c (scan_tree_for_params): Remove REAL_CST.
2341 The SCoP detection fix is sufficient.
2343 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2345 PR tree-optimization/39260
2346 * graphite-scop-detection.c (harmful_stmt_in_bb): Stop a SCoP when
2347 the basic block contains a condition with a real type.
2348 * graphite-sese-to-poly.c (scan_tree_for_params): Handle REAL_CST.
2350 * gcc.dg/graphite/pr39260.c: New.
2352 2009-02-21 Sebastian Pop <sebastian.pop@amd.com>
2354 * graphite-poly.c: Inlcude params.h.
2355 (graphite_trans_loop_block): Use PARAM_LOOP_BLOCK_TILE_SIZE for
2357 * Makefile.in (graphite-poly.o): Depend on PARAMS_H.
2358 * params.def (PARAM_LOOP_BLOCK_TILE_SIZE): Define.
2360 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2361 Tobias Grosser <grosser@fim.uni-passau.de>
2363 * graphite-scop-detection.c (dot_all_scops_1,
2364 dot_all_scops): Moved here.
2365 * graphite-scop-detection.h (dot_all_scops): Declared here.
2366 * graphite.c (graphite_initialize, graphite_finalize): New.
2367 (graphite_transform_loops): Cleaned up.
2368 * sese.c (debug_oldivs): Moved here.
2369 * graphite-poly.c (graphite_apply_transformations): Renamed
2370 apply_poly_transforms.
2371 (debug_loop_vec): Moved here.
2372 * graphite-sese-to-poly.c (build_bb_loops, build_sese_conditions_1,
2373 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions,
2374 find_scop_parameters, build_scop_iteration_domain,
2375 add_conditions_to_constraints, build_scop_canonical_schedules,
2376 build_scop_data_accesses): Now static.
2377 (build_poly_scop, check_poly_representation): New.
2379 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2381 * graphite.c (graphite_stmt_p, new_gimple_bb, free_gimple_bb,
2382 remove_gbbs_in_scop, free_scops, try_generate_gimple_bb,
2383 build_scop_bbs, ref_nb_loops, compare_prefix_loops,
2384 build_scop_canonical_schedules, build_bb_loops, add_value_to_dim,
2385 scan_tree_for_params_right_scev, scan_tree_for_params_int,
2386 scan_tree_for_params, struct irp_data, dx_record_params,
2387 find_params_in_bb, find_scop_parameters, gbb_from_bb,
2388 build_loop_iteration_domains, add_conditions_to_domain,
2389 phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes,
2390 scop_contains_non_iv_scalar_phi_nodes, build_sese_conditions_1,
2391 build_sese_conditions, add_conditions_to_constraints,
2392 build_scop_iteration_domain, build_access_matrix_with_af,
2393 build_access_matrix,
2394 build_scop_data_accesses): Moved to graphite-sese-to-poly.c.
2396 * graphite-sese-to-poly.c: New.
2397 * graphite-sese-to-poly.h: New.
2399 * Makefile.in: Add new rule for graphite-sese-to-poly.o.
2401 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2403 * graphite.c: Split graphite code generation to a new file.
2404 (graphite_verify, gmp_cst_to_tree, clast_name_to_gcc,
2405 max_precision_type, clast_to_gcc_expression_red,
2406 clast_to_gcc_expression, gcc_type_for_clast_expr,
2407 gcc_type_for_clast_eq, loop_iv_stack_patch_for_consts,
2408 graphite_translate_clast_equation, graphite_create_guard_cond_expr,
2409 graphite_create_new_guard, clast_get_body_of_loop,
2410 gcc_type_for_cloog_iv, gcc_type_for_iv_of_clast_loop,
2411 graphite_create_new_loop, build_iv_mapping, copy_renames,
2412 translate_clast, find_cloog_iv_in_expr, compute_cloog_iv_types_1,
2413 compute_cloog_iv_types, free_scattering, save_var_name,
2414 initialize_cloog_names, build_scop_context, build_cloog_prog,
2415 set_cloog_options, debug_clast_stmt, scop_to_clast,
2416 print_generated_program, debug_generated_program,
2417 gloog): Moved to graphite-clast-to-gimple.c.
2419 (struct cloog_prog_clast): Moved to graphite-clast-to-gimple.h.
2421 (iv_stack_entry_is_constant, iv_stack_entry_is_iv,
2422 loop_iv_stack_push_iv, loop_iv_stack_insert_constant,
2423 loop_iv_stack_pop, loop_iv_stack_get_iv,
2424 loop_iv_stack_get_iv_from_name, debug_loop_iv_stack,
2425 free_loop_iv_stack, loop_iv_stack_remove_constants,
2426 debug_rename_elt, debug_rename_map_1, debug_rename_map,
2427 rename_map_elt_info, eq_rename_map_elts, debug_ivtype_elt,
2428 debug_ivtype_map_1, debug_ivtype_map, ivtype_map_elt_info,
2429 eq_ivtype_map_elts, sese_add_exit_phis_edge,
2430 sese_add_exit_phis_var, sese_insert_phis_for_liveouts,
2431 get_vdef_before_sese, sese_adjust_vphi,
2432 get_new_name_from_old_name, sese_adjust_phis_for_liveouts,
2433 oldiv_for_loop, rename_variables_in_stmt, is_parameter,
2434 is_iv, expand_scalar_variables_ssa_name,
2435 expand_scalar_variables_expr, expand_scalar_variables_stmt,
2436 expand_scalar_variables, rename_variables, remove_condition,
2437 get_true_edge_from_guard_bb, get_false_edge_from_guard_bb,
2438 add_loop_exit_phis, insert_loop_close_phis, struct igp,
2439 default_liveout_before_guard, add_guard_exit_phis,
2440 insert_guard_phis, register_old_and_new_names,
2441 graphite_copy_stmts_from_block, register_sese_liveout_renames,
2442 copy_bb_and_scalar_dependences, outermost_loop_in_sese,
2443 if_region_set_false_region, create_if_region_on_edge,
2444 move_sese_in_condition): Moved to sese.c.
2446 (nb_loops_around_loop_in_sese, struct ifsese, if_region_entry,
2447 if_region_exit, if_region_get_condition_block,
2448 struct rename_map_elt, new_rename_map_elt, enum iv_stack_entry_kind,
2449 union iv_stack_entry_data_union, struct iv_stack_entry_struct,
2450 iv_stack_entry_p, loop_iv_stack, struct ivtype_map_elt,
2451 ivtype_map_elt, new_ivtype_map_elt,
2452 recompute_all_dominators): Moved to sese.h.
2454 * graphite-clast-to-gimple.c: New.
2455 * graphite-clast-to-gimple.h: New.
2456 * Makefile.in: Add new rule for graphite-clast-to-gimple.o.
2457 * sese.c: Modified as said above.
2460 2009-02-20 Sebastian Pop <sebastian.pop@amd.com>
2462 * graphite.c: Split scop detection to a new file.
2463 (enum gbb_type, gbb_type, get_bb_type, struct sd_region_p, sd_region,
2464 move_sd_regions, loop_affine_expr, exclude_component_ref,
2465 is_simple_operand, stmt_simple_for_scop_p, harmful_stmt_in_bb,
2466 graphite_cannot_represent_loop_niter, struct scopdet_info,
2467 scopdet_basic_block_info, build_scops_1, bb_in_sd_region,
2468 find_single_entry_edge, find_single_exit_edge,
2469 create_single_entry_edge, sd_region_without_exit,
2470 create_single_exit_edge, unmark_exit_edges, mark_exit_edges,
2471 create_sese_edges, build_graphite_scops, limit_scops, build_scops):
2472 Moved to graphite-scop-detection.c.
2474 * graphite-scop-detection.c: New.
2475 * graphite-scop-detection.h: New.
2476 * Makefile.in: Add new rule for graphite-scop-detection.o.
2478 * sese.c: Include tree-chrec.h, tree-data-ref.h, and
2479 tree-scalar-evolution.h.
2480 (nb_reductions_in_loop, graphite_loop_normal_form, sese_record_loop,
2481 build_sese_loop_nests): Moved here from graphite.c.
2482 (param_index): Renamed parameter_index_in_region.
2484 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2485 Sebastian Pop <sebastian.pop@amd.com>
2487 * gcc.dg/graphite/block-0.c: Expected to fail now.
2488 * gcc.dg/graphite/block-1.c: Same.
2489 * gcc.dg/graphite/block-5.c: Same.
2490 * gcc.dg/graphite/block-6.c: Same.
2492 2009-02-18 Tobias Grosser <grosser@fim.uni-passau.de>
2493 Sebastian Pop <sebastian.pop@amd.com>
2495 * graphite.h: Separate from graphite_bb_p the polyhedral
2496 representation in poly_bb_p and the GCC specifics in gimple_bb_p.
2497 (struct data_dependence_polyhedron, RDGE_DDP, ddp_p): Moved to
2498 graphite-data-ref.h.
2499 (struct poly_bb, PBB_SCOP, PBB_STATIC_SCHEDULE, PBB_DOMAIN,
2500 PBB_BLACK_BOX, PBB_LOOPS, pbb_nb_loops, pbb_loop_at_index,
2501 pbb_loop_index, struct scop, SCOP_BBS, SCOP_REGION, SCOP_ENTRY,
2502 SCOP_EXIT, SCOP_REGION_BBS, SCOP_DEP_GRAPH, SCOP_PARAMS,
2503 SCOP_LOOP_NEST, SCOP_PARAMS, SCOP_OLDIVS, SCOP_LIVEOUT_RENAMES,
2504 scop_nb_params): Moved to graphite-poly.h.
2505 * graphite-data-ref.c: Same.
2506 * graphite-data-ref.h: New.
2508 (pbb_compare, graphite_sort_pbbs, graphite_trans_bb_move_loop,
2509 graphite_trans_bb_strip_mine, strip_mine_profitable_p,
2510 is_interchange_valid, graphite_trans_bb_block,
2511 graphite_trans_loop_block, scop_max_loop_depth,
2512 graphite_trans_scop_block, graphite_apply_transformations,
2513 new_poly_bb, free_poly_bb, new_scop, free_scop): Moved to
2515 * graphite-poly.h: New.
2516 * graphite-poly.c: New.
2517 * Makefile.in (OBJS-common): Add graphite-poly.o.
2518 (graphite-poly.o): New rule.
2519 * tree-data-ref.h (struct data_reference): Remove unused scop field.
2522 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2523 Tobias Grosser <grosser@fim.uni-passau.de>
2525 * graphite.c: Replace gb -> gbb.
2527 * graphite-data-ref.c: Same.
2529 2009-02-18 Sebastian Pop <sebastian.pop@amd.com>
2530 Tobias Grosser <grosser@fim.uni-passau.de>
2532 * Makefile.in (OBJS-commmon): Add sese.o.
2534 (graphite.o): Add sese.h.
2535 * graphite.c (bb_in_ss_p, loop_in_sese_p,
2536 sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb,
2537 sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese):
2539 (block_before_scop): Add missing return.
2540 (new_scop, free_scop): Remove SESE data structures.
2541 (scop_record_loop, scan_tree_for_params, find_params_in_bb,
2542 find_scop_parameters, build_loop_iteration_domains,
2543 add_conditions_to_domain, register_scop_liveout_renames,
2544 copy_bb_and_scalar_dependences): Scop -> SESE.
2546 (add_conditions_to_domain): SCoP -> SESE and remove check
2547 (scop_contains_non_iv_scalar_phi_nodes): New.
2548 (build_scop_conditions_1, build_scop_conditions): Remove check for
2549 non iv scalar phi nodes.
2550 (print_scop_statistics): New.
2551 (graphite_transform_loops): Cleanup.
2553 * graphite.h: Move to sese & cleanup.
2557 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2558 Tobias Grosser <grosser@fim.uni-passau.de>
2560 * graphite.c (build_scop_conditions_1): Conditions are only
2561 at the end of a basic block.
2563 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2564 Tobias Grosser <grosser@fim.uni-passau>
2566 * graphite.h (struct graphite_bb): Remove compressed_alpha_matrix
2568 (GBB_ALPHA): Removed.
2570 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2571 Tobias Grosser <grosser@fim.uni-passau.de>
2573 * graphite-data-ref.c (graphite_test_dependence): Don't use
2574 GBB_DYNAMIC_SCHEDULE.
2575 * graphite.c (new_graphite_bb): Same.
2576 (free_graphite_bb): Same.
2577 (build_scop_dynamic_schedules): Removed.
2578 (graphite_transform_loops): Don't call it.
2579 * graphite.h (struct graphite_bb): Remove dynamic_schedule field.
2580 (GBB_DYNAMIC_SCHEDULE): Removed.
2582 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2583 Tobias Grosser <grosser@fim.uni-passau.de>
2585 * graphite.c (schedule_to_scattering): Don't use CloogMatrix.
2586 (print_graphite_bb): Same.
2587 (build_cloog_prog): Same.
2589 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2590 Tobias Grosser <grosser@fim.uni-passau.de>
2592 * graphite.c (build_cloog_prog): Don't use CloogMatrix.
2594 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2595 Tobias Grosser <grosser@fim.uni-passau.de>
2597 * graphite.c (build_scop_context): Don't use CloogMatrix.
2598 * graphite-ppl.c (new_Cloog_Domain_from_ppl_Polyhedron): New.
2599 * graphite-ppl.h (new_Cloog_Domain_from_ppl_Polyhedron): Declared.
2601 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2602 Tobias Grosser <grosser@fim.uni-passau.de>
2604 * graphite.h (struct scop): Move params, old_ivs, loops, loop_nest,
2605 liveout_renames, add_params fields...
2606 (struct sese): ... here.
2607 (SESE_PARAMS, SESE_LOOPS, SESE_LOOP_NEST, SESE_ADD_PARAMS,
2608 SESE_PARAMS, SESE_OLDIVS, SESE_LIVEOUT_RENAMES): New.
2610 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2611 Tobias Grosser <grosser@fim.uni-passau.de>
2613 * graphite.c (print_scop): Do not print the CLooG program.
2614 (new_scop, free_scop, initialize_cloog_names, build_scop_context,
2615 build_cloog_prog, gloog): Don't use SCOP_PROG.
2616 (find_transform): Renamed scop_to_clast.
2617 (print_generated_program, debug_generated_program): New.
2618 (graphite_transform_loops): Adapt to new interface.
2619 * graphite.h (struct scop): Remove program field.
2620 (SCOP_PROG): Removed.
2621 (print_generated_program, debug_generated_program): Declared.
2623 2009-02-16 Sebastian Pop <sebastian.pop@amd.com>
2625 * graphite-data-ref.c (schedule_precedes_p, schedule_same_p): New.
2626 (statement_precedes_p): Use schedule_same_p and schedule_precedes_p.
2627 * graphite.c (gbb_compare, schedule_to_scattering, print_graphite_bb,
2628 free_graphite_bb, build_scop_canonical_schedules,
2629 graphite_trans_bb_strip_mine, graphite_trans_scop_block): Static
2630 schedules are now represented using a ppl_Linear_Expression_t.
2631 * graphite.h (struct graphite_bb): Same.
2632 * graphite-ppl.c (ppl_lexico_compare_linear_expressions): New.
2633 * graphite-ppl.h (ppl_lexico_compare_linear_expressions): Declared.
2635 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2637 * graphite.c: Free local memory.
2638 * graphite-ppl.c: Same.
2640 2009-02-15 Sebastian Pop <sebastian.pop@amd.com>
2642 * graphite.c (const_column_index, get_first_matching_sign_row_index,
2643 get_lower_bound_row, get_upper_bound_row, copy_constraint,
2644 swap_constraint_variables, scale_constraint_variable): Removed.
2645 (graphite_trans_bb_strip_mine): Remove pong.
2646 * graphite-ppl.c: Include missing header files.
2647 (set_inhomogeneous, set_coef, shift_poly, ppl_strip_loop): New.
2648 * graphite-ppl.h (ppl_strip_loop): Declared.
2649 * Makefile.in (graphite-ppl.o): Adjust dependences.
2651 2009-02-14 Sebastian Pop <sebastian.pop@amd.com>
2653 * graphite.c (build_loop_iteration_domains): Remove ping pong.
2654 (build_scop_iteration_domain): Same.
2656 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2658 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2660 (add_value_to_dim, scan_tree_for_params_right_scev,
2661 scan_tree_for_params_int): New.
2662 * graphite-ppl.c (oppose_constraint): New.
2663 (insert_constraint_into_matrix): Implement missing cases.
2664 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2666 2009-02-13 Sebastian Pop <sebastian.pop@amd.com>
2668 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2669 use ppl_move_dimension.
2671 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2673 * graphite-data-ref.c: Domains are now ppl_Polyhedra_t.
2676 * graphite-ppl.c: Same.
2677 * graphite-ppl.h: Same.
2679 2009-02-12 Sebastian Pop <sebastian.pop@amd.com>
2681 Revert last 3 commits.
2683 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2685 * graphite.c (scan_tree_for_params, add_conditions_to_domain): Remove
2687 (add_value_to_dim, scan_tree_for_params_right_scev,
2688 scan_tree_for_params_int): New.
2689 * graphite-ppl.c (oppose_constraint): New.
2690 (insert_constraint_into_matrix): Implement missing cases.
2691 * graphite-ppl.h (insert_constraint_into_matrix): Declared.
2693 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2695 * graphite.c (graphite_trans_bb_move_loop): Remove unused variables.
2697 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2698 Tobias Grosser <grosser@fim.uni-passau.de>
2700 * graphite.c (graphite_trans_bb_move_loop): Remove ping pong,
2701 use ppl_move_dimension.
2702 * graphite-ppl.c (ppl_move_dimension): New.
2703 * graphite-ppl.h (ppl_move_dimension): Declared.
2705 2009-02-10 Sebastian Pop <sebastian.pop@amd.com>
2707 * graphite.c: Do not include cloog/cloog.h.
2708 (print_graphite_bb): Remove ping pong, call PPL print function.
2710 2009-02-10 Tobias Grosser <grosser@fim.uni-passau.de>
2712 * Makefile.in (OBJS-common): Add graphite-ppl.o.
2713 (graphite.o): Add dependence on graphite-ppl.h.
2714 (graphite-ppl.o): New.
2715 (graphite-data-ref.c): Ping pong between PPL data structures
2717 * graphite-ppl.c: New.
2718 * graphite-ppl.h: New.
2719 * graphite.c: Include graphite-ppl.h.
2720 (print_graphite_bb, add_conditions_to_domain, build_cloog_prog,
2721 graphite_trans_bb_move_loop, graphite_trans_bb_strip_mine):
2722 Ping pong between PPL data structures and matrices.
2723 (new_graphite_bb): Create a PPL constraint system.
2724 Call ppl_delete_Constraint_System instead of cloog_matrix_free.
2725 (build_loop_iteration_domains): Use PPL functions.
2726 * graphite.h: Include graphite-ppl.h. Fix comments.
2727 (graphite_bb): Use a ppl_Constraint_System_t instead of
2728 CloogMatrix for representing the domain.
2729 (scop): Remove static_schedule.
2730 (gbb_nb_loops): Ping pong between PPL data structures and matrices.
2732 2009-02-06 Sebastian Pop <sebastian.pop@amd.com>
2734 * graphite.c: Fix some comments.
2736 2009-02-05 Sebastian Pop <sebastian.pop@amd.com>
2739 * graphite.c (if_region_set_false_region): After moving a region
2740 in the false branch of a condition, remove the empty dummy
2742 (gloog): Remove wrong fix for PR38953.
2744 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2746 * graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use,
2747 sese_build_livein_liveouts_bb, sese_build_livein_liveouts,
2748 register_bb_in_sese, new_sese, free_sese): Moved.
2749 (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains,
2750 outermost_loop_in_scop, build_scop_iteration_domain,
2751 expand_scalar_variables_ssa_name, get_vdef_before_scop,
2752 limit_scops): Use bb_in_sese_p instead of bb_in_scop_p.
2753 Use loop_in_sese_p instead of loop_in_scop_p.
2754 (new_graphite_bb, new_scop, gloog): Do not initialize SCOP_BBS_B.
2755 (free_scop): Do not free SCOP_BBS_B.
2756 (nb_loops_around_loop_in_scop, nb_loops_around_gb,
2757 ref_nb_loops): Moved here...
2758 * graphite.h (ref_nb_loops): ... from here.
2759 (struct scop): Remove bbs_b bitmap.
2760 (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed.
2761 * testsuite/gcc.dg/graphite/scop-19.c: New
2763 2009-02-03 Tobias Grosser <grosser@fim.uni-passau.de>
2765 * graphite.c (scopdet_basic_block_info): Fix bug in scop
2768 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2770 * graphite.c (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop,
2771 eq_loop_to_cloog_loop): Remove.
2772 (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP.
2773 * graphite.h (struct scop): Remove loop2cloog_loop.
2774 (loop_domain_dim, loop_iteration_vector_dim): Remove.
2776 2009-01-30 Tobias Grosser <grosser@fim.uni-passau.de>
2778 * opts.c (decode_options): Only add graphite options to O2
2779 if we compile with graphite enabled.
2781 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2783 * Merge from mainline (r143163:143684).
2785 2009-01-26 Sebastian Pop <sebastian.pop@amd.com>
2787 * graphite.c (debug_value): Removed.
2788 * graphite.h (debug_value): Removed.
2790 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2792 * passes.c (init_optimization_passes): Do not call pass_copy_prop
2793 after graphite: pass_copy_prop does not maintain a proper loop closed
2794 SSA form. pass_copy_prop should be fixed.
2796 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2798 * graphite.c (scop_adjust_phis_for_liveouts): Fix warning.
2800 2009-01-23 Sebastian Pop <sebastian.pop@amd.com>
2802 * graphite.c (graphite_verify): Add a call to verify_loop_closed_ssa.
2803 (gloog): Split the exit of the scop when the scop exit is a loop exit.
2804 (graphite_transform_loops): Only call cleanup_tree_cfg if gloog
2807 2009-01-20 Sebastian Pop <sebastian.pop@amd.com>
2809 * graphite.c (gloog): Return true when code gen succeeded.
2810 (graphite_transform_loops): Do not call cleanup_tree_cfg if
2811 the code of the function did not changed. After cleanup_tree_cfg
2812 call rewrite_into_loop_closed_ssa to maintain the loop closed ssa
2815 2009-01-19 Sebastian Pop <sebastian.pop@amd.com>
2817 * graphite.c (stmt_simple_for_scop_p): Also handle cases when
2818 gimple_call_lhs is NULL.
2820 2009-01-16 Sebastian Pop <sebastian.pop@amd.com>
2821 Tobias Grosser <tobi.grosser@amd.com>
2823 * graphite.c (graphite_trans_scop_block): Do not block single
2826 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2827 Tobias Grosser <tobi.grosser@amd.com>
2829 * graphite.c (build_scop_canonical_schedules): Start schedules at
2832 2009-01-15 Sebastian Pop <sebastian.pop@amd.com>
2833 Tobias Grosser <tobi.grosser@amd.com>
2835 * graphite.c (compare_prefix_loops): New.
2836 (build_scop_canonical_schedules): Rewritten.
2837 (graphite_transform_loops): Move build_scop_canonical_schedules
2838 after build_scop_iteration_domain.
2840 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2841 Tobias Grosser <tobi.grosser@amd.com>
2843 * graphite.c (add_conditions_to_domain): Add the loops to
2844 the dimension of the iteration domain. Do copy the domain
2845 only when it exists.
2846 (build_scop_conditions_1): Do not call add_conditions_to_domain.
2847 (add_conditions_to_constraints): New.
2848 (can_generate_code_stmt, can_generate_code): Removed.
2849 (gloog): Do not call can_generate_code.
2850 (graphite_transform_loops): Call add_conditions_to_constraints
2851 after building the iteration domain.
2853 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2854 Tobias Grosser <tobi.grosser@amd.com>
2855 Jan Sjodin <jan.sjodin@amd.com>
2857 * graphite.c (scan_tree_for_params): On substractions negate
2858 all the coefficients of the term.
2859 (clast_to_gcc_expression_red): New. Handle reduction expressions
2860 of more than two operands.
2861 (clast_to_gcc_expression): Call clast_to_gcc_expression_red.
2862 (get_vdef_before_scop): Handle also the case of default definitions.
2864 2009-01-14 Sebastian Pop <sebastian.pop@amd.com>
2867 * graphite.c (get_vdef_before_scop, scop_adjust_vphi): New.
2868 (scop_adjust_phis_for_liveouts): Call scop_adjust_vphi.
2869 (gloog): Do not call cleanup_tree_cfg.
2870 (graphite_transform_loops): Call cleanup_tree_cfg after all
2871 scops have been code generated.
2873 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2875 * passes.c (init_optimization_passes): Schedule after
2876 graphite transforms pass_copy_prop, pass_dce_loop and pass_lim.
2878 2009-01-13 Sebastian Pop <sebastian.pop@amd.com>
2880 * graphite.c (expand_scalar_variables_stmt): Do not pass loop_p.
2882 (expand_scalar_variables_ssa_name): Do not pass loop_p. Fix comment.
2883 Set the type of an expression to the type of its assign statement.
2884 (expand_scalar_variables_expr): Do not pass loop_p.
2885 Fix comment. Stop recursion on tcc_constant or tcc_declaration.
2886 (copy_bb_and_scalar_dependences): Do not pass loop_p.
2887 (translate_clast): Update call to copy_bb_and_scalar_dependences.
2889 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2891 * graphite.c (expand_scalar_variables_ssa_name): Set the type of
2892 an expression to the gimple_expr_type of its assign statement.
2893 (expand_scalar_variables_expr): Stop recursion on tcc_constant
2896 2009-01-11 Sebastian Pop <sebastian.pop@amd.com>
2898 PR tree-optimization/38786
2899 * testsuite/gcc.dg/graphite/pr38786.c: New.
2900 * graphite.c (expand_scalar_variables_ssa_name): New, outlined from
2901 the SSA_NAME case of expand_scalar_variables_expr.
2902 (expand_scalar_variables_expr): Also gather the scalar computation
2903 used to index the memory access.
2904 (expand_scalar_variables_stmt): Pass to expand_scalar_variables_expr
2905 the gimple_stmt_iterator where it inserts new code.
2907 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2909 * testsuite/gcc.dg/graphite/block-3.c: Fix compile error on 32bit.
2911 2009-01-10 Sebastian Pop <sebastian.pop@amd.com>
2913 * opts.c (decode_options): Enable flag_graphite_identity and
2914 flag_loop_block in -O2 and above.
2916 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2918 * libjava/classpath/lib/gnu/java/awt/peer/gtk/GtkMouseInfoPeer.class:
2919 Fix merge problem: replace with the file from trunk.
2921 2009-01-08 Sebastian Pop <sebastian.pop@amd.com>
2923 * Merge from mainline (r141727:143163).
2925 2009-01-07 Sebastian Pop <sebastian.pop@amd.com>
2926 Jan Sjodin <jan.sjodin@amd.com>
2928 PR tree-optimization/38559
2929 * testsuite/gcc.dg/graphite/pr38559.c: New.
2931 * graphite.c (debug_value, copy_constraint,
2932 swap_constraint_variables, scale_constraint_variable, ): New.
2933 (get_lower_bound, get_upper_bound): Removed.
2934 (graphite_trans_bb_strip_mine): Clean up this code that works
2935 only for constant number of iterations. Fully copy upper and
2936 lower bound constraints, not only the constant part of them.
2937 * graphite.h (debug_value): Declared.
2939 2009-01-06 Jan Sjodin <jan.sjodin@amd.com>
2941 PR tree-optimization/38492
2942 PR tree-optimization/38498
2943 * tree-check.c (operator_is_linear, scev_is_linear_expression): New.
2944 * tree-chrec.h (scev_is_linear_expression): Declared.
2945 * graphite.c (graphite_cannot_represent_loop_niter): New.
2946 (scopdet_basic_block_info): Call graphite_cannot_represent_loop_niter.
2947 (graphite_loop_normal_form): Use gcc_assert.
2948 (scan_tree_for_params): Use CASE_CONVERT.
2949 (phi_node_is_iv, bb_contains_non_iv_scalar_phi_nodes): New.
2950 (build_scop_conditions_1): Call bb_contains_non_iv_scalar_phi_nodes.
2951 Use gcc_assert. Discard scops that contain unhandled cases.
2952 (build_scop_conditions): Return a boolean status for unhandled cases.
2953 (strip_mine_profitable_p): Print the loop number, not its depth.
2954 (is_interchange_valid): Pass the depth of the loop nest, don't
2955 recompute it wrongly.
2956 (graphite_trans_bb_block): Same.
2957 (graphite_trans_bb_block): Print tentative of loop blocking.
2958 (graphite_trans_scop_block): Do not print that the loop has been
2960 (graphite_transform_loops): Do not handle scops that contain condition
2963 * testsuite/gcc.dg/graphite/pr38500.c: Fixed warning as committed
2965 * testsuite/gcc.dg/graphite/block-0.c: Update test.
2966 * testsuite/gcc.dg/graphite/block-1.c: Same.
2967 * testsuite/gcc.dg/graphite/block-2.c: Remove xfail and test for
2969 * testsuite/gcc.dg/graphite/block-4.c: Remove test for strip mine.
2970 * testsuite/gcc.dg/graphite/block-3.c: New.
2971 * testsuite/gcc.dg/graphite/pr38498.c: New.
2973 2008-12-22 Harsha Jagasia <harsha.jagasia@amd.com>
2975 PR tree-optimization/38510
2976 * gcc.dg/graphite/pr38510.c: New.
2977 * graphite.c (recompute_all_dominators): Call mark_irreducible_loops.
2978 (translate_clast): Call recompute_all_dominators before
2980 (gloog): Call recompute_all_dominators before graphite_verify.
2982 2008-12-12 Sebastian Pop <sebastian.pop@amd.com>
2984 PR tree-optimization/38492
2985 * graphite.c (rename_map_elt, debug_rename_elt,
2986 debug_rename_map_1, debug_rename_map, new_rename_map_elt,
2987 rename_map_elt_info, eq_rename_map_elts,
2988 get_new_name_from_old_name, bb_in_sese_p): Moved around.
2989 (sese_find_uses_to_rename_use): Renamed sese_build_livein_liveouts_use.
2990 (sese_find_uses_to_rename_bb): Renamed sese_build_livein_liveouts_bb.
2991 (sese_build_livein_liveouts): New.
2992 (new_sese, free_sese): New.
2993 (new_scop): Call new_sese.
2994 (free_scop): Call free_sese.
2995 (rename_variables_from_edge, rename_phis_end_scop): Removed.
2996 (register_old_new_names): Renamed register_old_and_new_names.
2997 (register_scop_liveout_renames, add_loop_exit_phis,
2998 insert_loop_close_phis, struct igp,
2999 default_liveout_before_guard, add_guard_exit_phis,
3000 insert_guard_phis, copy_renames): New.
3001 (translate_clast): Call insert_loop_close_phis and insert_guard_phis.
3002 (sese_add_exit_phis_edge): Renamed scop_add_exit_phis_edge.
3003 (rewrite_into_sese_closed_ssa): Renamed scop_insert_phis_for_liveouts.
3004 (scop_adjust_phis_for_liveouts): New.
3005 (gloog): Call scop_adjust_phis_for_liveouts.
3007 * graphite.h (struct sese): Documented. Added fields liveout,
3009 (SESE_LIVEOUT, SESE_LIVEIN, SESE_LIVEIN_VER, SESE_NUM_VER): New.
3010 (new_sese, free_sese, sese_build_livein_liveouts): Declared.
3011 (struct scop): Added field liveout_renames.
3012 (SCOP_LIVEOUT_RENAMES): New.
3014 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3016 PR tree-optimization/38409
3017 * gcc.dg/graphite/pr38409.c: New.
3018 * graphite.c (nb_reductions_in_loop): Use simple_iv.
3020 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3022 * graphite.c (gcc_type_for_cloog_iv): By default return
3024 (graphite_create_new_loop): Don't fold_convert the already
3025 fold_convert-ed expression.
3027 2008-12-11 Harsha Jagasia <harsha.jagasia@amd.com>
3029 PR tree-optimization/38446
3030 * gcc.dg/graphite/pr38446.c: New.
3031 * graphite.c (register_bb_in_sese): New.
3032 (bb_in_sese_p): Check if bb belongs to sese region by explicitly
3033 looking at the bbs in the region.
3034 * graphite.h (sese): Add region_basic_blocks pointer set to
3035 structure and initialize at the time of defining new scop.
3037 2008-12-11 Tobias Grosser <grosser@fim.uni-passau.de>
3039 * graphite.c (new_graphite_bb): Initialize GBB_STATIC_SCHEDULE.
3040 (find_params_in_bb): Do not free data refs.
3041 (free_graphite_bb): Add FIXME on disabled free_data_refs.
3043 2008-12-11 Sebastian Pop <sebastian.pop@amd.com>
3045 * testsuite/gcc.dg/graphite/scop-16.c: Test only scop specific info.
3046 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3047 * testsuite/gcc.dg/graphite/block-5.c: New.
3048 * testsuite/gcc.dg/graphite/block-6.c: New.
3049 * testsuite/gcc.dg/graphite/pr37485.c: Clean dump file after.
3050 * testsuite/gcc.dg/graphite/pr37684.c: Same.
3051 * testsuite/gcc.dg/graphite/block-2.c: Same.
3053 * graphite.c (struct ivtype_map_elt): New.
3054 (debug_ivtype_elt, debug_ivtype_map_1, debug_ivtype_map,
3055 new_ivtype_map_elt, ivtype_map_elt_info, eq_ivtype_map_elts,
3056 gcc_type_for_cloog_iv): New.
3057 (loop_iv_stack_patch_for_consts): Use the type of the induction
3058 variable from the original loop, except for the automatically
3059 generated loops, i.e., in the case of a strip-mined loop, in
3060 which case there is no original loop: in that case just use
3062 (new_graphite_bb): Initialize GBB_CLOOG_IV_TYPES.
3063 (free_graphite_bb): Free GBB_CLOOG_IV_TYPES.
3064 (clast_name_to_gcc): Accept params to be NULL.
3065 (clast_to_gcc_expression): Take an extra parameter for the type.
3066 Convert to that type all the expressions built by this function.
3067 (gcc_type_for_clast_expr, gcc_type_for_clast_eq): New.
3068 (graphite_translate_clast_equation): Compute the type of the
3069 clast_equation before translating its LHS and RHS.
3070 (clast_get_body_of_loop, gcc_type_for_iv_of_clast_loop): New.
3071 (graphite_create_new_loop): Compute the type of the induction
3072 variable before translating the lower and upper bounds and before
3073 creating the induction variable.
3074 (rename_variables_from_edge, rename_phis_end_scop): New.
3075 (copy_bb_and_scalar_dependences): Call rename_phis_end_scop.
3076 (sese_add_exit_phis_edge): Do not use integer_zero_node.
3077 (find_cloog_iv_in_expr, compute_cloog_iv_types_1,
3078 compute_cloog_iv_types): New.
3079 (gloog): Call compute_cloog_iv_types before starting the
3080 translation of the clast.
3082 * graphite.h (struct graphite_bb): New field cloog_iv_types.
3083 (GBB_CLOOG_IV_TYPES): New.
3084 (debug_ivtype_map): Declared.
3085 (oldiv_for_loop): New.
3087 2008-12-10 Tobias Grosser <grosser@fim.uni-passau.de>
3090 * graphite.c (new_scop): Initialize SCOP_ADD_PARAMS.
3091 (param_index): Assert if parameter is not know after parameter
3093 (find_params_in_bb): Detect params directly in GBB_CONDITIONS.
3094 (find_scop_parameters): Mark, that we have finished parameter
3096 (graphite_transform_loops): Move condition detection before parameter
3098 * graphite.h (struct scop): Add SCOP_ADD_PARAMS.
3099 * testsuite/gfortran.dg/graphite/pr38459.f90: New.
3101 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3103 * graphite.c (graphite_transform_loops): Always call find_transform ()
3104 in ENABLE_CHECKING. So we test these code paths, even if we do not
3107 2008-12-09 Tobias Grosser <grosser@fim.uni-passau.de>
3109 * graphite.c (print_graphite_bb): Fix printing to file != dump_file.
3110 (print_scop): Ditto.
3112 2008-12-08 Tobias Grosser <grosser@fim.uni-passau.de>
3115 Fix testsuite/gfortran.dg/graphite/id-3.f90.
3116 * graphite.c (scopdet_basic_block_info): Fix bug that found some
3117 regions more than once.
3119 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3121 Fix testsuite/gfortran.dg/graphite/id-4.f90.
3122 * graphite.c (scan_tree_for_params): Do not compute the multiplicand
3125 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3127 Fix testsuite/gfortran.dg/graphite/id-1.f90.
3128 * graphite.c (gmp_cst_to_tree): Pass the type in parameter.
3129 (loop_iv_stack_patch_for_consts): Update use of gmp_cst_to_tree.
3130 (max_precision_type): New.
3131 (value_clast): Removed.
3132 (clast_to_gcc_expression): Be more careful to types of expressions.
3133 Use max_precision_type and update use of gmp_cst_to_tree.
3134 (graphite_translate_clast_equation): Use max_precision_type.
3135 (graphite_create_guard_cond_expr): Do not use integer_type_node,
3136 use the type of the condition.
3137 (graphite_create_new_loop): Do not use integer_type_node, use the
3138 max_precision_type of lb and ub.
3140 2008-12-03 Sebastian Pop <sebastian.pop@amd.com>
3142 * graphite.c (build_scops_1): Initialize open_scop.exit
3145 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3147 * testsuite/gcc.dg/graphite/pr38084.c: New.
3148 * testsuite/gfortran.dg/graphite/id-1.f90: New.
3149 * testsuite/gfortran.dg/graphite/id-2.f90: New.
3150 * testsuite/gfortran.dg/graphite/id-3.f90: New.
3151 * testsuite/gfortran.dg/graphite/id-4.f90: New.
3152 * testsuite/gfortran.dg/graphite/pr37857.f90: New.
3154 2008-12-02 Sebastian Pop <sebastian.pop@amd.com>
3155 Jan Sjodin <jan.sjodin@amd.com>
3156 Harsha Jagasia <harsha.jagasia@amd.com>
3168 * testsuite/gcc.dg/graphite/pr38073.c: New.
3169 * testsuite/gcc.dg/graphite/pr37928.c: New.
3170 * testsuite/gcc.dg/graphite/pr37883.c: New.
3171 * testsuite/gcc.dg/graphite/pr38125.c: New.
3172 * testsuite/gfortran.dg/graphite/pr38083.f90: New.
3173 * testsuite/gfortran.dg/graphite/pr37852.f90: New.
3174 * testsuite/gfortran.dg/graphite/pr37980.f90: New.
3176 * testsuite/gcc.dg/graphite/scop-18.c: Remove reduction, test for
3177 the number of detected scops. Copy exact same test for loop
3179 * testsuite/gcc.dg/graphite/block-1.c: Fix the number of expected
3180 loops to be blocked as reductions are not handled.
3181 * testsuite/gcc.dg/graphite/block-4.c: ...here. New.
3183 * tree-phinodes.c (remove_phi_nodes): New, extracted from...
3184 * tree-cfg.c (remove_phi_nodes_and_edges_for_unreachable_block):
3186 * tree-flow.h (remove_phi_nodes, canonicalize_loop_ivs): Declared.
3187 * Makefile.in (graphite.o): Depend on value-prof.h.
3188 (graphite.o-warn): Removed -Wno-error.
3189 * tree-parloops.c (canonicalize_loop_ivs): Allow reduction_list
3190 to be a NULL pointer. Call update_stmt. Return the newly created
3191 cannonical induction variable.
3193 * graphite.h (debug_rename_map): Declared. Fix some comments.
3195 * graphite.c: Reimplement the code generation from graphite to gimple.
3196 Include value-prof.h.
3197 (loop_iv_stack_get_iv): Do not return NULL for constant substitutions.
3198 (get_old_iv_from_ssa_name): Removed.
3199 (graphite_stmt_p): New.
3200 (new_graphite_bb): Test for useful statements before building a
3201 graphite statement for the basic block.
3202 (free_graphite_bb): Do not free GBB_DATA_REFS: this is a bug
3203 in free_data_ref that calls BITMAP_FREE (DR_VOPS (dr)) without
3205 (recompute_all_dominators, graphite_verify,
3206 nb_reductions_in_loop, graphite_loop_normal_form): New.
3207 (scop_record_loop): Call graphite_loop_normal_form.
3208 (build_scop_loop_nests): Iterate over all the blocks of the
3209 function instead of relying on the incomplete information from
3210 SCOP_BBS. Return the success of the operation.
3211 (find_params_in_bb): Use the data from GBB_DATA_REFS.
3212 (add_bb_domains): Removed.
3213 (build_loop_iteration_domains): Don't call add_bb_domains.
3214 Add the iteration domain only to the basic blocks that have been
3215 translated to graphite.
3216 (build_scop_conditions_1): Add constraints only if the basic
3217 block have been translated to graphite.
3218 (build_scop_data_accesses): Completely disabled until data
3219 dependence is correctly implemented.
3220 (debug_rename_elt, debug_rename_map_1, debug_rename_map): New.
3221 (remove_all_edges_1, remove_all_edges): Removed.
3222 (get_new_name_from_old_name): New.
3223 (graphite_rename_variables_in_stmt): Renamed
3224 rename_variables_in_stmt. Call get_new_name_from_old_name.
3225 Use replace_exp and update_stmt.
3226 (is_old_iv): Renamed is_iv.
3227 (expand_scalar_variables_stmt): Extra parameter for renaming map.
3228 Use replace_exp and update_stmt.
3229 (expand_scalar_variables_expr): Same. Use the map to get the
3230 new names for the renaming of induction variables and for the
3231 renaming of variables after a basic block has been copied.
3232 (expand_scalar_variables): Same.
3233 (graphite_rename_variables): Renamed rename_variables.
3234 (move_phi_nodes): Removed.
3235 (get_false_edge_from_guard_bb): New.
3236 (build_iv_mapping): Do not insert the induction variable of a
3237 loop in the renaming iv map if the basic block does not belong
3239 (register_old_new_names, graphite_copy_stmts_from_block,
3240 copy_bb_and_scalar_dependences): New.
3241 (translate_clast): Heavily reimplemented: copy basic blocks,
3242 do not move them. Finally, in call cleanup_tree_cfg in gloog.
3243 At each translation step call graphite_verify ensuring the
3244 consistency of the SSA, loops and dominators information.
3245 (collect_virtual_phis, find_vdef_for_var_in_bb,
3246 find_vdef_for_var_1, find_vdef_for_var,
3247 patch_phis_for_virtual_defs): Removed huge hack.
3248 (mark_old_loops, remove_dead_loops, skip_phi_defs,
3249 collect_scop_exit_phi_args, patch_scop_exit_phi_args,
3250 gbb_can_be_ignored, scop_remove_ignoreable_gbbs, ): Removed.
3251 (remove_sese_region, ifsese, if_region_entry, if_region_exit,
3252 if_region_get_condition_block, if_region_set_false_region,
3253 create_if_region_on_edge, move_sese_in_condition, bb_in_sese_p,
3254 sese_find_uses_to_rename_use, sese_find_uses_to_rename_bb,
3255 sese_add_exit_phis_edge, sese_add_exit_phis_var,
3256 rewrite_into_sese_closed_ssa): New.
3257 (gloog): Remove dead code. Early return if code cannot be
3258 generated. Call cleanup_tree_cfg once the scop has been code
3260 (graphite_trans_scop_block, graphite_trans_loop_block): Do not
3261 block loops with less than two loops.
3262 (graphite_apply_transformations): Remove the call to
3263 scop_remove_ignoreable_gbbs.
3264 (limit_scops): When build_scop_loop_nests fails, continue on
3265 the next scop. Fix open_scop.entry.
3266 (graphite_transform_loops): Call recompute_all_dominators: force the
3267 recomputation of correct CDI_DOMINATORS and CDI_POST_DOMINATORS.
3268 Call initialize_original_copy_tables and free_original_copy_tables
3269 to be able to copy basic blocks during code generation.
3270 When build_scop_loop_nests fails, continue on next scop.
3271 (value_clast): New union.
3272 (clast_to_gcc_expression): Fix type cast warning.
3274 2008-11-09 Sebastian Pop <sebastian.pop@amd.com>
3276 * Merge from mainline (r140838:141727).
3278 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3282 * graphite.c (scan_tree_for_params): Add POINTER_PLUS_EXPR.
3284 2008-11-05 Tobias Grosser <grosser@fim.uni-passau.de>
3288 * graphite.c (scopdet_basic_block_info): Fix loops with multiple
3289 exits and conditions.
3290 * testsuite/gcc.dg/graphite/pr37943.c: New.
3292 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3295 * graphite.c (gloog): Replace EXIT_BLOCK_PTR with scop exit.
3297 2008-10-23 Tobias Grosser <grosser@fim.uni-passau.de>
3299 * doc/invoke.texi: Fix spaces.
3301 2008-10-22 Sebastian Pop <sebastian.pop@amd.com>
3303 PR tree-optimization/37891
3304 Reverted last commit.
3305 * graphite.c (create_single_entry_edge): Set
3306 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3308 2008-10-21 Sebastian Pop <sebastian.pop@amd.com>
3309 Mitul Thakkar <mitul.thakkar@amd.com>
3311 * graphite.c (create_single_entry_edge): Set
3312 EDGE_IRREDUCIBLE_LOOP and BB_IRREDUCIBLE_LOOP.
3314 2008-10-16 Tobias Grosser <grosser@fim.uni-passau.de>
3316 * doc/invoke.texi: Add -fgraphite-identity.
3317 * graphite.c (graphite_apply_transformations): Check for
3318 -fgraphite-identity.
3319 * toplev.c (process_options): Add flag_graphite_identity.
3320 * tree-ssa-loop.c: Add flag_graphite_identity.
3322 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3324 Undo changes from 2008-10-02:
3325 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3326 operand type when copying the operand to a variable of different type.
3327 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3328 with the IV name after increment.
3330 2008-10-14 Sebastian Pop <sebastian.pop@amd.com>
3331 Harsha Jagasia <harsha.jagasia@amd.com>
3333 PR tree-optimization/37828
3334 * testsuite/gcc.dg/graphite/pr37828.c: New.
3335 * graphite.c (graphite_trans_loop_block): Do not loop block
3336 single nested loops.
3338 2008-10-09 Harsha Jagasia <harsha.jagasia@amd.com>
3339 Sebastian Pop <sebastian.pop@amd.com>
3341 * graphite.c (struct rename_map_elt, new_rename_map_elt,
3342 rename_map_elt_info, eq_rename_map_elts): New.
3343 (graphite_rename_ivs_stmt): Renamed graphite_rename_variables_in_stmt.
3344 (expand_scalar_variables_expr): Change parameters.
3345 (expand_scalar_variables_stmt): Same.
3346 (expand_scalar_variables): Same.
3347 (graphite_rename_ivs): Rename graphite_rename_variables.
3348 (build_iv_mapping): New.
3349 (translate_clast): Call build_iv_mapping.
3350 * graphite.h (gbb_p): New name.
3352 2008-10-03 Harsha Jagasia <harsha.jagasia@amd.com>
3354 PR tree-optimization/37684
3355 * gcc.dg/graphite/pr37684.c: New.
3356 * graphite.c (exclude_component_ref): New.
3357 (is_simple_operand): Call exclude_component_ref.
3359 2008-10-02 Jan Sjodin <jan.sjodin@amd.com>
3360 Harsha Jagasia <harsha.jagasia@amd.com>
3362 PR tree-optimization/37485
3363 * gcc.dg/graphite/block-2.c: New
3364 * graphite.c (gmp_cst_to_tree): Moved.
3365 (iv_stack_entry_is_constant): New.
3366 (iv_stack_entry_is_iv): New.
3367 (loop_iv_stack_push): Renamed to loop_iv_stack_push_iv.
3368 (loop_iv_stack_insert_constant): New.
3369 (loop_iv_stack_pop): Use new datatpype.
3370 (loop_iv_stack_get_iv): Same.
3371 (loop_iv_stack_get_iv_from_name): Same.
3372 (loop_iv_stack_debug): Renamed to debug_loop_iv_stack.
3373 (loop_iv_stack_patch_for_consts): New.
3374 (loop_iv_stack_remove_constants): New.
3375 (graphite_create_new_loop): Use loop_iv_stack_push_iv.
3376 (translate_clast): Call loop_iv_stack_patch_for_consts and
3377 loop_iv_stack_remove_constants.
3378 (gloog): Use new datatype. Redirect construction edge to end
3379 block to avoid accidental deletion.
3380 * graphite.h (enum iv_stack_entry_kind): New. Tag for data in
3382 (union iv_stack_entry_data): New. Data in iv stack entry.
3383 (struct iv_stack_entry): New. Datatype for iv stack entries.
3385 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3387 * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Convert
3388 operand type when copying the operand to a variable of different type.
3390 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3392 * cfgloopmanip.c (create_empty_loop_on_edge): Write exit condition
3393 with the IV name after increment.
3395 2008-10-02 Sebastian Pop <sebastian.pop@amd.com>
3397 * Merge from mainline (r140164:140838).
3399 2008-09-10 Konrad Trifunovic <konrad.trifunovic@inria.fr>
3401 * graphite-data-ref.c: New.
3402 * graphite.c (print_scop): Also dump the dependence graph.
3403 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): Moved...
3404 (new_scop): Initialize SCOP_DEP_GRAPH.
3405 (build_scop_dynamic_schedules): New.
3406 (build_access_matrix_with_af): Fixed column numbering.
3407 (graphite_transform_loops): Call build_scop_dynamic_schedules.
3408 * graphite.h: Add ifndef/define guards against multiple inclusion.
3409 (struct scop): Add dep_graph field.
3410 (SCOP_DEP_GRAPH): Defined.
3411 (ref_nb_loops): Fixed and moved to other position.
3412 (bb_in_scop_p, loop_in_scop_p, nb_loops_around_gb): ... here.
3413 (nb_loops_around_loop_in_scop): New.
3414 (graphite_dump_dependence_graph): Declared.
3415 (graphite_build_rdg_all_levels): Declared.
3416 (graphite_test_dependence): Declared.
3417 * Makefile.in (graphite-data-ref.o): New target.
3419 2008-09-09 Sebastian Pop <sebastian.pop@amd.com>
3421 * Merge from mainline (139870:140164).
3423 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3425 * Merge from mainline (138275:139870).
3426 * testsuite/gcc.dg/graphite/scop-matmult.c: XFailed as one of
3427 the commits from trunk broke the niter detection.
3429 2008-09-01 Sebastian Pop <sebastian.pop@amd.com>
3431 * graphite.c: Add more documentation. Fix formatting.
3432 (debug_loop_vec, debug_oldivs, loop_iv_stack,
3433 loop_iv_stack_debug): Moved...
3434 (schedule_to_scattering): Move before use.
3435 (dot_all_scops): Include in "#if 0" the code for system
3438 * graphite.h: (debug_loop_vec, debug_oldivs, loop_iv_stack,
3439 loop_iv_stack_debug): ...here.
3441 2008-08-29 Jan Sjodin <jan.sjodin@amd.com>
3443 * tree-phinodes.c (make_phi_node): Extern.
3444 (add_phi_node_to_bb): New.
3445 (create_phi_node): Call add_phi_node_to_bb.
3446 * tree-ssa-loop-ivopts.c (get_phi_with_result): New.
3447 (remove_statement): Handle case where stored phi was updated
3448 and is no longer the same.
3449 * graphite.c (is_parameter): New.
3451 (expand_scalar_variables_expr): New.
3452 (expand_scalar_variables_stmt): New.
3453 (expand_scalar_variables): New.
3454 (move_phi_nodes): Create new phi instead of moving old one.
3455 (translate_clast): Call expand_scalar_variables.
3456 (find_vdef_for_var_in_bb): Also scan regular definitions.
3457 (skip_phi_defs): New.
3458 (collect_scop_exit_phi_args): New.
3459 (patch_scop_exit_phi_args): New.
3460 (gloog): Patch phis after scop.
3461 * tree-flow.h: (add_phi_node_to_bb): Declared.
3462 (make_phi_node): Declared.
3464 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3466 * graphite.c (end_scop): Split the entry of the scop when it
3467 is the header of the loop in which the scop is ending.
3468 (build_scops_1, limit_scops): Update uses of end_scop.
3470 2008-08-26 Sebastian Pop <sebastian.pop@amd.com>
3472 * graphite.c (dot_all_scops_1): Do not fail on uninitialized
3473 SCOP_ENTRY or SCOP_EXIT.
3475 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3477 * graphite.c (get_construction_edge): Removed.
3478 (gloog): Construction edge is the scop entry edge.
3480 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3482 * graphite.c (can_generate_for_scop): Removed.
3483 (gloog): Do not call it.
3485 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3487 * graphite.c (new_scop): Entry of a scop is an edge.
3488 Initialize SESE region.
3489 (free_scop): Free SESE region.
3490 (build_scops_1, scopdet_bb_info): Work on edges, not on bbs.
3491 (split_difficult_bb): New, split from end_scop.
3492 (end_scop): Exit of a scop is an edge.
3493 (build_scop_bbs): Never check CDI_POST_DOMINATORS: this info is
3494 not automatically updated and thus is always wrong.
3495 * graphite.h (struct sese): New.
3498 (struct scop): New field for a SESE region. Remove entry, exit.
3499 (SCOP_ENTRY, SCOP_EXIT): Update definitions to match same
3500 semantics as before. Moved comment around.
3502 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3503 Sebastian Pop <sebastian.pop@amd.com>
3505 * graphite.c (graphite_transform_loops): Always enable gloog
3506 and find_transform when ENABLE_CHECKING.
3508 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3510 * graphite.c (graphite_transform_loops): Move pretty printer
3511 of SCOPs before doing any transform. Remove call to print_scops
3512 and dot_all_scops_1.
3514 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3516 * graphite.c (dump_gbb_conditions): Don't try to print NULL pointers.
3517 (print_graphite_bb): Same.
3519 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3521 * graphite.c (dot_all_scops_1): Cleanup.
3522 (move_scops): Fix comment.
3524 2008-08-25 Sebastian Pop <sebastian.pop@amd.com>
3526 * graphite.c (build_scop_bbs): Revert commit 139355:
3528 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3529 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3531 * graphite.c (build_scop_bbs): Factor up code.
3533 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3535 * graphite.c (gloog): Update dominator info.
3537 2008-08-25 Tobias Grosser <grosser@fim.uni-passau.de>
3539 * graphite.c (remove_cond_exprs): Do not fail on empty bbs.
3541 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3543 * graphite.c (new_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP
3545 (free_graphite_bb): Remove GBB_INDEX_TO_NUM_MAP free.
3546 (translate_clast): Correct formatting.
3547 * graphite.h (struct num_map): Removed.
3548 (struct graphite_bb): Remove num_map field.
3549 (GBB_INDEX_TO_NUM_MAP): Removed.
3551 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3553 * graphite.c (build_access_matrix_with_af): Fix comments.
3554 (build_scop_data_accesses): Same.
3556 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3558 * graphite.c (build_scop_data_accesses): Don't construct
3559 access matrices. Add a FIXME and an assert condition that
3560 should pass when the access matrices will be needed.
3562 2008-08-24 Sebastian Pop <sebastian.pop@amd.com>
3564 * tree-data-ref.c (stmt_simple_memref_p): Don't call
3566 * graphite.c (build_graphite_bb): Renamed new_graphite_bb.
3567 Moved close by free_graphite_bb.
3568 (free_graphite_bb): Call free_data_refs. Reset bb->aux.
3569 (new_scop): Move close by free_scop.
3570 (graphite_transform_loops): Avoid linear scan to reset bb->aux.
3572 2008-08-22 Jan Sjodin <jan.sjodin@amd.com>
3574 * cfgloopmanip.c (create_empty_if_region_on_edge): New.
3575 * graphite.c (clast_to_gcc_expression): Call gmp_cst_to_tree
3576 instead of recursive call.
3577 (graphite_translate_clast_equation): New.
3578 (graphite_create_guard_cond_expr): New.
3579 (graphite_create_new_guard): New.
3580 (get_stack_index_from_iv): Removed.
3581 (graphite_rename_ivs_stmt): Use gbb_loop_index.
3582 (get_true_edge_from_guard_bb): New.
3583 (translate_clast): Handle stmt_guard in clast.
3584 (get_construction_edge): Allow construction edge detection for
3585 a scope entry with multiple predecessors if one predecessor is
3586 the immediate dominator of scope entry.
3587 (can_generate_code_stmt): Enable code generation for clast_guard.
3588 (gloog): Use correct context loop. Removed check for post dominators.
3589 * cfgloop.h (create_empty_if_region_on_edge): Declared.
3591 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3593 * graphite.c (remove_dead_loops): Document better which
3596 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3598 * Makefile.in: Rename POLYLIBLIBS and POLYLIBINC to PPLLIBS
3600 (graphite.o): Also depends on pointer-set.h.
3602 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3604 * graphite.c (scop_record_loop): Fix compile warning.
3606 2008-08-21 Harsha Jagasia <harsha.jagasia@amd.com>
3607 Sebastian Pop <sebastian.pop@amd.com>
3609 * graphite.c (scop_record_loop): DECL_NAME can be NULL.
3611 2008-08-21 Sebastian Pop <sebastian.pop@amd.com>
3613 * graphite.c (build_graphite_bb): Initialize bb->aux to
3614 point to the graphite_bb_p.
3615 (graphite_bb_from_bb): Renamed gbb_from_bb; returns the
3617 (add_bb_domains): Does not use the scop parameter.
3618 (graphite_transform_loops): Clean bb->aux at the end.
3620 2008-08-20 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3621 Sebastian Pop <sebastian.pop@amd.com>
3623 * testsuite/lib/target-supports.exp
3624 (check_effective_target_fgraphite): New.
3626 * testsuite/gcc.dg/graphite/graphite.exp: Early exit when
3627 check_effective_target_fgraphite returns false.
3628 Set dg-do-what-default to compile.
3629 (scan-graphite-dump-times): Removed.
3630 * testsuite/gfortran.dg/graphite/graphite.exp: Same.
3632 * testsuite/gcc.dg/graphite/scop-0.c: Do not use "dg-do compile".
3633 Use scan-tree-dump-times instead of scan-graphite-dump-times.
3634 * testsuite/gcc.dg/graphite/scop-1.c: Same.
3635 * testsuite/gcc.dg/graphite/scop-2.c: Same.
3636 * testsuite/gcc.dg/graphite/scop-3.c: Same.
3637 * testsuite/gcc.dg/graphite/scop-4.c: Same.
3638 * testsuite/gcc.dg/graphite/scop-5.c: Same.
3639 * testsuite/gcc.dg/graphite/scop-6.c: Same.
3640 * testsuite/gcc.dg/graphite/scop-7.c: Same.
3641 * testsuite/gcc.dg/graphite/scop-8.c: Same.
3642 * testsuite/gcc.dg/graphite/scop-9.c: Same.
3643 * testsuite/gcc.dg/graphite/scop-10.c: Same.
3644 * testsuite/gcc.dg/graphite/scop-11.c: Same.
3645 * testsuite/gcc.dg/graphite/scop-12.c: Same.
3646 * testsuite/gcc.dg/graphite/scop-13.c: Same.
3647 * testsuite/gcc.dg/graphite/scop-matmult.c: Same.
3648 * testsuite/gcc.dg/graphite/scop-14.c: Same.
3649 * testsuite/gcc.dg/graphite/scop-15.c: Same.
3650 * testsuite/gcc.dg/graphite/block-0.c: Same.
3651 * testsuite/gcc.dg/graphite/scop-16.c: Same.
3652 * testsuite/gcc.dg/graphite/block-1.c: Same.
3653 * testsuite/gcc.dg/graphite/scop-17.c: Same.
3654 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3655 * testsuite/gfortran.dg/graphite/block-1.f90: Same.
3656 * testsuite/gfortran.dg/graphite/scop-1.f: Same.
3657 * testsuite/gfortran.dg/graphite/block-2.f: Same.
3659 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3661 * graphite.c: Fix some XXX comments.
3662 (build_scop_dynamic_schedules): Removed.
3664 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3666 * graphite.h (scop_max_loop_depth): Moved...
3667 * graphite.c (scop_max_loop_depth): ...here.
3668 (remove_all_edges_1): New.
3669 (remove_all_edges): Factored code.
3670 (remove_cond_exprs): Check only the last statement for
3671 a GIMPLE_COND expression.
3673 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3675 * graphite.c (scan_tree_for_params): Early return when the
3676 expression is a chrec_dont_know. Handle case NEGATE_EXPR.
3677 (find_scop_parameters): Factor out code.
3678 (graphite_trans_bb_strip_mine): Remove dead code.
3680 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3682 * graphite.c (clast_to_gcc_expression, graphite_create_new_loop,
3683 graphite_trans_bb_move_loop): Factor asserts.
3684 (gloog): Perform sanity checks only for ENABLE_CHECKING.
3685 Do not call calculate_dominance_info and estimate_bb_frequencies.
3687 2008-08-20 Jan Sjodin <jan.sjodin@amd.com>
3689 * graphite.c (create_loops_mapping, free_loops_mapping,
3690 create_loops_mapping_num, debug_loop_mapping_1,
3691 debug_loop_mapping, graphite_loops_mapping_max_loop_num,
3692 get_loop_mapping_for_num, graphite_loops_mapping_add_child,
3693 graphite_loops_mapping_add_child_num,
3694 graphite_loops_mapping_insert_child,
3695 graphite_loops_mapping_parent, get_loop_mapped_depth_for_num,
3696 get_loop_mapped_depth, split_loop_mapped_depth_for_num,
3697 loop_mapped_depth_split_loop, swap_loop_mapped_depth_for_num,
3698 create_num_from_index, get_num_from_index,
3699 swap_loop_mapped_depth): Removed.
3700 (new_scop): Do not initialize SCOP_LOOPS_MAPPING.
3701 (free_scop): Do not call free_loops_mapping.
3702 (graphite_get_new_iv_stack_index_from_old_iv): Renamed
3703 get_stack_index_from_iv. Use GBB_LOOPS instead of calling
3704 get_loop_mapped_depth.
3705 (graphite_trans_bb_move_loop): Do not update the loop mapping.
3706 (graphite_trans_bb_strip_mine): Same.
3707 * graphite.h (graphite_loops_mapping, graphite_loop_node): Removed.
3708 (struct scop): Remove field loops_mapping.
3710 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3711 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3713 * graphite.c (scop_record_loop): Factor out one level of the
3714 condition by early return.
3715 (build_scop_loop_nests): Format following FSF coding style.
3716 (build_scop_dynamic_schedules): Factor out code.
3717 (scopdet_bb_info): Reindent. Default case should not be reachable.
3719 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3720 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3722 * graphite.c (loop_affine_expr): Check for DECL_P or struct
3723 assignments that are not handled as simple operands for now.
3725 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3726 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3728 * graphite.c (build_scop_bbs): Factor up code.
3730 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3731 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3733 * graphite.c (stmt_simple_for_scop_p): Factor code out
3735 (enum gbb_type): New. Group all the GBB_* types under it.
3736 (is_loop_exit): Moved...
3737 (end_scop): Enable BB spliting.
3738 * cfgloop.c (is_loop_exit): ...here. Reimplemented.
3739 * cfgloop.h (is_loop_exit): Declared.
3741 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3743 * doc/invoke.texi: Remove strides from examples containing
3744 DO loops when the strides are equal to 1.
3746 2008-08-20 Harsha Jagasia <harsha.jagasia@amd.com>
3747 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
3749 * graphite.c (graphite_trans_scop_block): Or the result with
3750 the result from graphite_trans_loop_block.
3751 * testsuite/gcc.dg/graphite/block-1.c: New.
3752 * testsuite/gfortran.dg/graphite/block-1.f90: New.
3753 * testsuite/gfortran.dg/graphite/block-2.f: New.
3755 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3757 * graphite.c (graphite_transform_loops): Call cloog_initialize
3760 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3762 * tree-data-ref.c) (stmt_simple_memref_p): New.
3763 * tree-data-ref.h (stmt_simple_memref_p): Declared.
3764 * graphite.c (stmt_simple_memref_for_scop_p): Removed.
3765 (is_simple_operand): Call stmt_simple_memref_p.
3767 * testsuite/gcc.dg/graphite/scop-matmult.c: Updated for not
3768 using pointer arithmetic, as this is optimized by PRE and
3769 makes the code too difficult to analyze.
3771 * testsuite/gcc.dg/graphite/scop-18.c: Same.
3773 2008-08-20 Sebastian Pop <sebastian.pop@amd.com>
3775 * gdbinit.in (pgg): New.
3777 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3779 * graphite.c (graphite_trans_loop_block): Fix warning.
3781 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3783 * graphite.c (graphite_trans_loop_block): Fix my merge error.
3785 2008-08-15 Tobias Grosser <grosser@fim.uni-passau.de>
3787 * graphite.c (graphite_trans_bb_block): Remove check for
3788 flag_loop_strip_mine, flag_loop_block, flag_loop_interchange.
3789 Check if loop blocking is profitable for every loop, before applying
3791 (graphite_apply_transformations): Call graphite_trans_bb_block only,
3792 if flag_loop_block is set.
3794 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3796 * graphite.c: Add some more documentation for the loop
3799 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3801 * Makefile.in (tree-data-ref.o): Remove dependence on graphite.h.
3802 * graphite.c: Format on less than 80 columns.
3805 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3807 * cfgloopmanip.c (loopify): Use update_dominators_in_loop.
3809 2008-08-14 Sebastian Pop <sebastian.pop@amd.com>
3811 * doc/invoke.texi (floop-block, floop-strip-mine,
3812 floop-interchange): Update documentation with examples.
3814 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3816 * cfgloopmanip.c (create_empty_loop_on_edge): Don't call
3818 * graphite.c (graphite_create_new_loop): Call add_referenced_var.
3820 2008-08-13 Sebastian Pop <sebastian.pop@amd.com>
3822 * cfgloopmanip.c (create_empty_loop_on_edge): Improve documentation.
3823 Factor gcc_asserts into a single one. Use force_gimple_operand_gsi.
3824 * tree-scalar-evolution.c: Revert useless changes.
3825 * tree-phinodes.c: Same.
3828 * tree-vectorizer.h: Same.
3829 * tree-flow.h: Same.
3831 * common.opt (fgraphite): Update documentation.
3833 2008-08-12 Harsha Jagasia <harsha.jagasia@amd.com>
3835 * doc/invoke.texi (-floop-block, -floop-strip-mine,
3836 -floop-interchange): Add more text for explaining what each of these
3838 * tree-into-ssa.c (gimple_vec): Moved to...
3839 * graphite.c: Include gimple.h.
3840 (gimple_vec): Moved to...
3841 (del_loop_to_cloog_loop): Removed.
3842 (loop_affine_expr): Do not call create_data_ref when the
3843 operand is a constant.
3844 (new_scop): Use free instead of del_loop_to_cloog_loop.
3845 * Makefile.in (graphite.o): Depend on GIMPLE_H.
3846 * gimple.h (gimple_vec): ... here.
3848 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3850 * graphite.c (scopdet_bb_info): Only allow loops with known number of
3852 (build_loop_iteration_domains): Fail, if latch executions unknown.
3854 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3856 * graphite.c (add_conditions_to_domain): New.
3857 (build_scop_conditions_1): Call add_conditions_to_domain.
3858 (set_cloog_options): Allow to disable optimizations.
3860 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3862 * graphite.c (find_params_in_bb): Look for parameters in conditions.
3863 Do not use walk_dominator_tree.
3864 (find_scop_parameters): Do not use walk_dominator_tree.
3866 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3868 * graphite.c (scan_tree_for_params) Add / Subtract inequality.
3869 (idx_record_params): Adapt.
3870 * graphite.h (scop_gimple_loop_depth): New.
3872 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3874 * graphite.c (build_scop_dynamic_schedules): Remove value_init.
3875 (scan_tree_for_params): Remove value_init.
3876 (build_scop_context): Remove value_init.
3877 (build_loop_iteration_domains): Remove value_init.
3878 (schedule_to_scattering): Remove value_init.
3879 (graphite_trans_bb_strip_mine): Remove value_init.
3881 2008-08-11 Tobias Grosser <grosser@fim.uni-passau.de>
3883 * gcc/graphite.c (limit_scops): New.
3884 (graphite_transform_loops): Add limit SCoPs.
3885 * gcc/testsuite/gcc.dg/graphite/scop-0.c: Update number of SCoPs.
3886 * gcc/testsuite/gcc.dg/graphite/scop-1.c: Update number of SCoPs.
3887 * gcc/testsuite/gcc.dg/graphite/scop-10.c: Update number of SCoPs.
3888 * gcc/testsuite/gcc.dg/graphite/scop-11.c: Update number of SCoPs.
3889 * gcc/testsuite/gcc.dg/graphite/scop-12.c: Update number of SCoPs.
3890 * gcc/testsuite/gcc.dg/graphite/scop-13.c: Update number of SCoPs.
3891 * gcc/testsuite/gcc.dg/graphite/scop-14.c: Update number of SCoPs.
3892 * gcc/testsuite/gcc.dg/graphite/scop-15.c: Update number of SCoPs.
3893 * gcc/testsuite/gcc.dg/graphite/scop-16.c: Update number of SCoPs.
3894 Change loop numbers.
3895 * gcc/testsuite/gcc.dg/graphite/scop-17.c: Update number of SCoPs.