This is the mail archive of the
mailing list for the GCC project.
Re: [GSoC] generation of Gimple code from isl_ast_node_if
- From: Tobias Grosser <tobias at grosser dot es>
- To: Roman Gareev <gareevroman at gmail dot com>
- Cc: Mircea Namolaru <mircea dot namolaru at inria dot fr>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 26 Jul 2014 11:10:26 +0200
- Subject: Re: [GSoC] generation of Gimple code from isl_ast_node_if
- Authentication-results: sourceware.org; auth=none
- References: <CABGF_gfK8dqg1WnWODOf0TjmDGpk4_609oKiiBhSq5giE=c-kw at mail dot gmail dot com> <53D0E24B dot 2090101 at grosser dot es> <CABGF_gcOuPFw4ji2H8Rrch_OahjD=d_a16qUR1qkH6H9-xnFRw at mail dot gmail dot com> <53D23FC4 dot 7020607 at grosser dot es> <CABGF_gcBMpPKAHqbN53mVcKvAv32oETnu69nX8rvZjjCViVf3Q at mail dot gmail dot com>
On 26/07/2014 10:59, Roman Gareev wrote:
If I'm not mistaken, the reason of this bug is incorrect creation of a
poly_bb_p for basic_block from the existing pbb in new_pbb_from_pbb
(It is located in graphite-sese-to-poly.c). I think, that we should
set a new id of pbb1->domain (instead of using the id of the pbb),
which contains pointer to the pbb1.
I found out this after dumping of an index of pbb in the user
statement S_3. Its index is 9. It is created in
rewrite_reduction_out_of_ssa using new_pbb_from_pbb and the pbb with
index 3. After that the user statement S_3 is removed in
build_scop_drs, but the id of the pbb->domain and the
pbb->transformed point to the old pbb with index 3.
Interesting. I was not even aware that we did statement splitting for
reductions. Very nice analysis.
I've attached the patch, which may fix this.
Cheers, Roman Gareev.
--- gcc/graphite-sese-to-poly.c (revision 212995)
+++ gcc/graphite-sese-to-poly.c (working copy)
@@ -2044,6 +2044,10 @@
pbb1->domain = isl_set_copy (pbb->domain);
+ char name;
+ snprintf (name, sizeof (name), "S_%d", pbb_index (pbb1));
+ pbb1->domain = isl_set_set_tuple_id (pbb1->domain,
+ isl_id_alloc (scop->ctx, name, pbb1));
Any reason you don't use isl_id_for_pbb() to create this isl_id?
Otherwise, the patch looks good to me. You can commit it if the graphite
tests still pass and you add an appropriate ChangeLog entry.