Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-27 Thread Roman Gareev
Can you explain why you believe it is hard/impossible to generate a test case without reduction? I don't believe this. I only know that all the test cases considered by me have the same problem. Could you please explain what is 'reduction'? I've found out that, according to the comment of the

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-27 Thread Tobias Grosser
On 27/07/2014 08:12, Roman Gareev wrote: Can you explain why you believe it is hard/impossible to generate a test case without reduction? I don't believe this. I only know that all the test cases considered by me have the same problem. Could you please explain what is 'reduction'? I've found

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-27 Thread Roman Gareev
Thank you! I've attached patches with a test case (it is located in patch1.txt), which generates the following ISL AST: for (int c1 = 0; c1 = 49; c1 += 1) { if (c1 = 24) S_4(c1); S_5(c1); } I think that it doesn't contain reduction and doesn't yield several bbs. I've also checked that

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-27 Thread Tobias Grosser
On 27/07/2014 12:48, Roman Gareev wrote: Thank you! I've attached patches with a test case (it is located in patch1.txt), which generates the following ISL AST: for (int c1 = 0; c1 = 49; c1 += 1) { if (c1 = 24) S_4(c1); S_5(c1); } I think that it doesn't contain reduction and

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Roman Gareev
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

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Tobias Grosser
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

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Tobias Grosser
On 24/07/2014 12:09, Roman Gareev wrote: I've attached the patch, which contains generation of Gimple code from isl_ast_node_if. However, I've found out a problem. When I'm trying to generate Gimple code from, for example, the following ISL AST: { for (int c1 = 0; c1 = 49; c1 += 1) {

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Roman Gareev
Any reason you don't use isl_id_for_pbb() to create this isl_id? Yes, it is redundant. I've used isl_id_for_pbb() in the improved version. Otherwise, the patch looks good to me. You can commit it if the graphite tests still pass and you add an appropriate ChangeLog entry. I haven't found

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Tobias Grosser
On 26/07/2014 11:53, Roman Gareev wrote: Any reason you don't use isl_id_for_pbb() to create this isl_id? Yes, it is redundant. I've used isl_id_for_pbb() in the improved version. Otherwise, the patch looks good to me. You can commit it if the graphite tests still pass and you add an

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Roman Gareev
I've tried to compile your example and had the similar problem. It generates the following ISL AST { for (int c1 = 0; c1 = 49; c1 += 1) { S_6(c1); if (c1 = 48) { S_3(c1); S_9(c1); if (c1 = 24) S_4(c1); S_5(c1); } } S_7(); } where S_9 has

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Tobias Grosser
On 26/07/2014 14:59, Roman Gareev wrote: I've tried to compile your example and had the similar problem. It generates the following ISL AST { for (int c1 = 0; c1 = 49; c1 += 1) { S_6(c1); if (c1 = 48) { S_3(c1); S_9(c1); if (c1 = 24) S_4(c1);

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Roman Gareev
What do you mean by wrong answer? Is there still a bug in the code generation or the AST is just more complex as expected. I mean that the value of res is wrong. I think it is because of the wrong id of pbb-domain and pbb-transformed inherited from S_3 by S_9 (It was correct for S_3, but it is

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Tobias Grosser
On 26/07/2014 15:48, Roman Gareev wrote: What do you mean by wrong answer? Is there still a bug in the code generation or the AST is just more complex as expected. I mean that the value of res is wrong. I think it is because of the wrong id of pbb-domain and pbb-transformed inherited from S_3

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Roman Gareev
I would still add a test case which does not contain a reduction (+=) and where graphite is not duplicating pbbs. Help for what? I was looking to create a simple test case. Is there still an open bug? Sorry, I thought, we should add this test case to be able to test graphite without patch

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-26 Thread Tobias Grosser
On 26/07/2014 16:16, Roman Gareev wrote: I would still add a test case which does not contain a reduction (+=) and where graphite is not duplicating pbbs. Help for what? I was looking to create a simple test case. Is there still an open bug? Sorry, I thought, we should add this test case to

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-25 Thread Roman Gareev
I have no idea. Is the Gimple basic block of S_3 never set, or is it set and deleted on the way? I think, that it is deleted on the way. I've found out, that the Gimple basic block will be set, if we add the following code to the generate_isl_schedule: bb_schedule = isl_map_set_tuple_id

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-25 Thread Tobias Grosser
On 25/07/2014 13:20, Roman Gareev wrote: I have no idea. Is the Gimple basic block of S_3 never set, or is it set and deleted on the way? I think, that it is deleted on the way. I've found out, that the Gimple basic block will be set, if we add the following code to the generate_isl_schedule:

[GSoC] generation of Gimple code from isl_ast_node_if

2014-07-24 Thread Roman Gareev
I've attached the patch, which contains generation of Gimple code from isl_ast_node_if. However, I've found out a problem. When I'm trying to generate Gimple code from, for example, the following ISL AST: { for (int c1 = 0; c1 = 49; c1 += 1) { S_6(c1); if (c1 = 48) { S_3(c1);

Re: [GSoC] generation of Gimple code from isl_ast_node_if

2014-07-24 Thread Tobias Grosser
On 24/07/2014 12:09, Roman Gareev wrote: I've attached the patch, which contains generation of Gimple code from isl_ast_node_if. Nice. However, I've found out a problem. When I'm trying to generate Gimple code from, for example, the following ISL AST: { for (int c1 = 0; c1 = 49; c1 += 1)