Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-11-07 Thread Yuri Rumyantsev
Richard, Did you have a chance to look at it? Thanks. Yuri. 2014-10-24 14:21 GMT+04:00 Yuri Rumyantsev : > Richard, > > Patch containing new core related to extended predication is attached. > Here is few comments which explain a main goal of design. > > 1. I don't want to insert any critical ed

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-24 Thread Yuri Rumyantsev
Richard, Patch containing new core related to extended predication is attached. Here is 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 (I remember some performance issue when we designed lazy cod

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-24 Thread Richard Biener
On Tue, Oct 21, 2014 at 4:34 PM, Yuri Rumyantsev wrote: > Richard, > > In my initial design I did such splitting but before start real > if-conversion but I decided to not perform it since code size for > if-converted loop is growing (number of phi nodes is increased). It is > worth noting also th

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Yuri Rumyantsev
Richard, In my initial design I did such splitting but before start real if-conversion but I decided to not perform it since code size for if-converted loop is growing (number of phi nodes is increased). It is worth noting also that for phi with #nodes > 2 we need to get all predicates (except one

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Richard Biener
On Tue, Oct 21, 2014 at 4:09 PM, Richard Biener wrote: > On Tue, Oct 21, 2014 at 3:58 PM, Yuri Rumyantsev wrote: >> Richard, >> >> I saw the sources of these functions, but I can't understand why I >> should use something else? Note that all predicate computations are >> located in basic blocks (

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Richard Biener
On Tue, Oct 21, 2014 at 3:58 PM, Yuri Rumyantsev wrote: > Richard, > > I saw the sources of these functions, but I can't understand why I > should use something else? Note that all predicate computations are > located in basic blocks ( by design of if-conv) and there is special > function that put

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Yuri Rumyantsev
Richard, I saw the sources of these functions, but I can't understand why I should use something else? Note that all predicate computations are located in basic blocks ( by design of if-conv) and there is special function that put these computations in bb (insert_gimplified_predicates). Edge conta

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Richard Biener
On Tue, Oct 21, 2014 at 3:20 PM, Yuri Rumyantsev wrote: > Richard, > > Yes, This patch does not make sense since phi node predication for bb > with critical incoming edges only performs another function which is > absent (predicate_extended_scalar_phi). > > BTW I see that commit_edge_insertions()

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Yuri Rumyantsev
Richard, Yes, This patch does not make sense since phi node predication for bb with critical incoming edges only performs another function which is absent (predicate_extended_scalar_phi). BTW I see that commit_edge_insertions() is used for rtx instructions only but you propose to use it for tree

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Richard Biener
On Tue, Oct 21, 2014 at 2:25 PM, Yuri Rumyantsev wrote: > Richard, > > I did some changes in patch and ChangeLog to mark that support for > if-convert of blocks with only critical incoming edges will be added > in the future (more precise in patch.4). But the same reasoning applies to this versio

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-21 Thread Yuri Rumyantsev
Richard, I did some changes in patch and ChangeLog to mark that support for if-convert of blocks with only critical incoming edges will be added in the future (more precise in patch.4). Could you please review it. Thanks. ChangeLog: 2014-10-21 Yuri Rumyantsev (flag_force_vectorize): New va

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-20 Thread Yuri Rumyantsev
Richard, Thanks for your answer! In current implementation phi node conversion assume that one of incoming edge to bb containing given phi has at least one non-critical edge and choose it to insert predicated code. But if we choose critical edge we need to determine insert point and insertion dir

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-20 Thread Richard Biener
On Fri, Oct 17, 2014 at 4:09 PM, Yuri Rumyantsev wrote: > Richard, > > I reworked the patch as you proposed, but I didn't understand what > did you mean by: > >>So please rework the patch so critical edges are always handled >>correctly. > > In current patch flag_force_vectorize is used (1) to rej

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-17 Thread Yuri Rumyantsev
Richard, I reworked the patch as you proposed, but I didn't understand what did you mean by: >So please rework the patch so critical edges are always handled >correctly. In current patch flag_force_vectorize is used (1) to reject phi nodes with more than 2 arguments; (2) to reject basic blocks w

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-17 Thread Richard Biener
On Thu, Oct 16, 2014 at 5:42 PM, Yuri Rumyantsev wrote: > Richard, > > Here is reduced patch as you requested. All your remarks have been fixed. > Could you please look at it ( I have already sent the patch with > changes in add_to_predicate_list for review). + if (dump_file && (dump_

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-16 Thread Yuri Rumyantsev
Richard, Here is reduced patch as you requested. All your remarks have been fixed. Could you please look at it ( I have already sent the patch with changes in add_to_predicate_list for review). Thanks. Yuri. ChangeLog 2014-10-16 Yuri Rumyantsev (flag_force_vectorize): New variable. (edge_pred

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-15 Thread Richard Biener
On Mon, Oct 13, 2014 at 11:38 AM, Yuri Rumyantsev wrote: > Richard, > > Here is updated patch (part1) for extended if conversion. > > Second part of patch will be sent later. Ok, I'm starting to look at this. I'd still like you to split things up more. static inline void add_to_predicate_list

Re: [PATCH,1/2] Extended if-conversion for loops marked with pragma omp simd.

2014-10-13 Thread Yuri Rumyantsev
Richard, Here is updated patch (part1) for extended if conversion. Second part of patch will be sent later. Changelog. 2014-10-13 Yuri Rumyantsev * tree-if-conv.c (cgraph.h): Add include file to detect function clone. (flag_force_vectorize): New variable. (edge_predicate): New function. (se