Re: [PATCH 2/3] Extended if-conversion

2015-01-14 Thread Richard Biener
On Wed, Jan 14, 2015 at 2:14 PM, Yuri Rumyantsev wrote: > Richard, > > I did all changes proposed by you and add couple tests. > Bootstrap, including aggressive one proposed by you, and regression > testing did not show any new failures. > > Is it OK for trunk? +++ b/gcc/testsuite/gcc.dg/vect/vec

Re: [PATCH 2/3] Extended if-conversion

2015-01-14 Thread Yuri Rumyantsev
Richard, I did all changes proposed by you and add couple tests. Bootstrap, including aggressive one proposed by you, and regression testing did not show any new failures. Is it OK for trunk? ChangeLog: 2015-01-14 Yuri Rumyantsev * tree-if-conv.c: Include hash-map.h. (aggressive_if_conv): N

Re: [PATCH 2/3] Extended if-conversion

2015-01-09 Thread Richard Biener
On Mon, Dec 22, 2014 at 3:39 PM, Yuri Rumyantsev wrote: > Richard, > > I changed algorithm for bool pattern repair. > It turned out that ifcvt_local_dce phaase is required since for > test-case I sent you in previous mail vectorization is not performed > without dead code elimination: > > For the

Re: [PATCH 2/3] Extended if-conversion

2014-12-22 Thread Yuri Rumyantsev
Richard, I changed algorithm for bool pattern repair. It turned out that ifcvt_local_dce phaase is required since for test-case I sent you in previous mail vectorization is not performed without dead code elimination: For the loop #pragma omp simd safelen(8) for (i=0; i<512; i++) { float

Re: [PATCH 2/3] Extended if-conversion

2014-12-19 Thread Richard Biener
On Thu, Dec 18, 2014 at 2:45 PM, Yuri Rumyantsev wrote: > Richard, > > I am sending you full patch (~1000 lines) but if you need only patch.1 > and patch.2 will let me know and i'll send you reduced patch. > > Below are few comments regarding your remarks for patch.3. > > 1. I deleted sub-phase if

Re: [PATCH 2/3] Extended if-conversion

2014-12-18 Thread Yuri Rumyantsev
Richard, I am sending you full patch (~1000 lines) but if you need only patch.1 and patch.2 will let me know and i'll send you reduced patch. Below are few comments regarding your remarks for patch.3. 1. I deleted sub-phase ifcvt_local_dce since I did not find test-case when dead code eliminatio

Re: [PATCH 2/3] Extended if-conversion

2014-12-17 Thread Richard Biener
On Tue, Dec 16, 2014 at 4:15 PM, Yuri Rumyantsev wrote: > Hi Richard, > > Here is updated patch which includes > (1) split critical edges for aggressive if conversion. > (2) delete all stuff related to support of critical edge predication. > (3) only one function - predicate_scalar_phi performs pr

Re: [PATCH 2/3] Extended if-conversion

2014-12-16 Thread Yuri Rumyantsev
Hi Richard, Here is updated patch which includes (1) split critical edges for aggressive if conversion. (2) delete all stuff related to support of critical edge predication. (3) only one function - predicate_scalar_phi performs predication. (4) function find_phi_replacement_condition was deleted s

Re: [PATCH 2/3] Extended if-conversion

2014-12-11 Thread Richard Biener
On Wed, Dec 10, 2014 at 4:22 PM, Yuri Rumyantsev wrote: > Richard, > > Thanks for your reply! > > I didn't understand your point: > > Well, I don't mind splitting all critical edges unconditionally > > but you do it unconditionally in proposed patch. I don't mind means I am fine with it. > Also

Re: [PATCH 2/3] Extended if-conversion

2014-12-10 Thread Yuri Rumyantsev
Richard, Thanks for your reply! I didn't understand your point: Well, I don't mind splitting all critical edges unconditionally but you do it unconditionally in proposed patch. Also I assume that call of split_critical_edges() can break ssa. For example, we can split headers of loops, loop exit

Re: [PATCH 2/3] Extended if-conversion

2014-12-10 Thread Richard Biener
On Wed, Dec 10, 2014 at 11:54 AM, Yuri Rumyantsev wrote: > Richard, > > Sorry that I forgot to delete debug dump from my fix. > I have few questions about your comments. > > 1. You wrote : >> You also still have two functions for PHI predication. And the >> new extended variant doesn't commonize

Re: [PATCH 2/3] Extended if-conversion

2014-12-10 Thread Yuri Rumyantsev
Richard, Sorry that I forgot to delete debug dump from my fix. I have few questions about your comments. 1. You wrote : > You also still have two functions for PHI predication. And the > new extended variant doesn't commonize the 2-args and general > path Did you mean that I must combine predic

Re: [PATCH 2/3] Extended if-conversion

2014-12-09 Thread Richard Biener
On Tue, Dec 9, 2014 at 2:11 PM, Yuri Rumyantsev wrote: > Richard, > > Here is updated patch2 with the following changes: > 1. Delete functions phi_has_two_different_args and find_insertion_point. > 2. Use only one function for extended predication - > predicate_extended_scalar_phi. > 3. Save gsi

Re: [PATCH 2/3] Extended if-conversion

2014-12-09 Thread Yuri Rumyantsev
Richard, Here is updated patch2 with the following changes: 1. Delete functions phi_has_two_different_args and find_insertion_point. 2. Use only one function for extended predication - predicate_extended_scalar_phi. 3. Save gsi before insertion of predicate computations for basic blocks if it has

Re: [PATCH 2/3] Extended if-conversion

2014-12-04 Thread Richard Biener
On Thu, Dec 4, 2014 at 2:15 PM, Yuri Rumyantsev wrote: > Richard, > > I did simple change by saving gsi iterator for each bb that has > critical edges by adding additional field to bb_predicate_s: > > typedef struct bb_predicate_s { > > /* The condition under which this basic block is executed.

Re: [PATCH 2/3] Extended if-conversion

2014-12-04 Thread Yuri Rumyantsev
Richard, I did simple change by saving gsi iterator for each bb that has critical edges by adding additional field to bb_predicate_s: typedef struct bb_predicate_s { /* The condition under which this basic block is executed. */ tree predicate; /* PREDICATE is gimplified, and the sequence

Re: [PATCH 2/3] Extended if-conversion

2014-12-04 Thread Richard Biener
On Tue, Dec 2, 2014 at 4:28 PM, Yuri Rumyantsev wrote: > Thanks Richard for your quick reply! > > 1. I agree that we can combine predicate_extended_ and > predicate_arbitrary_ to one function as you proposed. > 2. What is your opinion about using more simple decision about > insertion point - if b

Re: [PATCH 2/3] Extended if-conversion

2014-12-02 Thread Yuri Rumyantsev
Thanks Richard for your quick reply! 1. I agree that we can combine predicate_extended_ and predicate_arbitrary_ to one function as you proposed. 2. What is your opinion about using more simple decision about insertion point - if bb has use of phi result insert phi predication before it and at the

Re: [PATCH 2/3] Extended if-conversion

2014-12-02 Thread Richard Biener
On Mon, Dec 1, 2014 at 4:53 PM, Yuri Rumyantsev wrote: > Hi Richard, > > I resend you patch1 and patch2 with minor changes: > 1. I renamed flag_force_vectorize to aggressive_if_conv. > 2. Use static cast for the first argument of gimple_phi_arg_edge. > I also very sorry that I sent you bad patch.

Re: [PATCH 2/3] Extended if-conversion

2014-12-01 Thread Yuri Rumyantsev
Hi Richard, I resend you patch1 and patch2 with minor changes: 1. I renamed flag_force_vectorize to aggressive_if_conv. 2. Use static cast for the first argument of gimple_phi_arg_edge. I also very sorry that I sent you bad patch. Now let me answer on your questions related to second patch. 1. Wh

Re: [PATCH 2/3] Extended if-conversion

2014-11-28 Thread Richard Biener
On Wed, Nov 12, 2014 at 2:35 PM, Yuri Rumyantsev wrote: > Hi All, > > Here is the second patch related to extended predication. > Few comments which explain a main goal of design. > > 1. I don't want to insert any critical edge splitting since it may > lead to less efficient binaries. > 2. One spe

[PATCH 2/3] Extended if-conversion

2014-11-12 Thread Yuri Rumyantsev
Hi All, Here is the second patch related to extended predication. Few comments which explain a main goal of design. 1. I don't want to insert any critical edge splitting since it may lead to less efficient binaries. 2. One special case of extended PHI node predication was introduced when #argumen