Re: [PATCH] Unswitching outer loops.

2015-10-09 Thread H.J. Lu
On Wed, Oct 7, 2015 at 2:53 AM, Yuri Rumyantsev wrote: > Richard, > > I've fixed adding virtual phi argument and add check on irreducible basic > block. > New patch is attached. > > I checked it for bootstrap and regression testing, no new failures. > > ChangeLog: >

Re: [PATCH] Unswitching outer loops.

2015-10-08 Thread Richard Biener
On Wed, Oct 7, 2015 at 5:26 PM, Yuri Rumyantsev wrote: > Richard, > > I noticed that 'gimple' type was changed and send you updated patch. Ok. Thanks, Richard. > Thanks. > Yuri. > > 2015-10-07 12:53 GMT+03:00 Yuri Rumyantsev : >> Richard, >> >> I've

Re: [PATCH] Unswitching outer loops.

2015-10-07 Thread Yuri Rumyantsev
Richard, I've fixed adding virtual phi argument and add check on irreducible basic block. New patch is attached. I checked it for bootstrap and regression testing, no new failures. ChangeLog: 2015-10-07 Yuri Rumyantsev * tree-ssa-loop-unswitch.c: Include

Re: [PATCH] Unswitching outer loops.

2015-10-07 Thread Yuri Rumyantsev
Richard, I noticed that 'gimple' type was changed and send you updated patch. Thanks. Yuri. 2015-10-07 12:53 GMT+03:00 Yuri Rumyantsev : > Richard, > > I've fixed adding virtual phi argument and add check on irreducible basic > block. > New patch is attached. > > I checked

Re: [PATCH] Unswitching outer loops.

2015-10-06 Thread Richard Biener
On Mon, Oct 5, 2015 at 3:13 PM, Yuri Rumyantsev wrote: > Thanks Richard. > I'd like to answer on your last comment related to using of exit edge > argument for edge that skips loop. > Let's consider the following test-case: > > #include > #define N 32 > float *foo(int

Re: [PATCH] Unswitching outer loops.

2015-10-06 Thread Richard Biener
On Tue, Oct 6, 2015 at 1:41 PM, Yuri Rumyantsev wrote: > Richard, > > Here is updated patch which reflects almost all your remarks: > 1. Use ordinary get_loop_body. > 2. Delete useless asserts. > 3. Use check on iterated loop instead of finite_loop_p. > 4. Do not update CFG by

Re: [PATCH] Unswitching outer loops.

2015-10-06 Thread Yuri Rumyantsev
Richard, Here is updated patch which reflects almost all your remarks: 1. Use ordinary get_loop_body. 2. Delete useless asserts. 3. Use check on iterated loop instead of finite_loop_p. 4. Do not update CFG by adjusting the CONDs condition to always true/false. 5. Add couple tests. ChangeLog:

Re: [PATCH] Unswitching outer loops.

2015-10-05 Thread Yuri Rumyantsev
Thanks Richard. I'd like to answer on your last comment related to using of exit edge argument for edge that skips loop. Let's consider the following test-case: #include #define N 32 float *foo(int ustride, int size, float *src) { float *buffer, *p; int i, k; if (!src) return NULL;

Re: [PATCH] Unswitching outer loops.

2015-10-05 Thread Richard Biener
On Wed, Sep 30, 2015 at 12:46 PM, Yuri Rumyantsev wrote: > Hi Richard, > > I re-designed outer loop unswitching using basic idea of 23855 patch - > hoist invariant guard if loop is empty without guard. Note that this > was added to loop unswitching pass with simple

Re: [PATCH] Unswitching outer loops.

2015-09-30 Thread Yuri Rumyantsev
Hi Richard, I re-designed outer loop unswitching using basic idea of 23855 patch - hoist invariant guard if loop is empty without guard. Note that this was added to loop unswitching pass with simple modifications - using another loop iterator etc. Bootstrap and regression testing did not show

Re: [PATCH] Unswitching outer loops.

2015-08-03 Thread Richard Biener
On Fri, Jul 31, 2015 at 1:17 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Hi Richard, I learned your updated patch for 23825 and it is more general in comparison with my. I'd like to propose you a compromise - let's consider my patch only for force-vectorize outer loop only to allow

Re: [PATCH] Unswitching outer loops.

2015-07-31 Thread Jeff Law
On 07/31/2015 05:17 AM, Yuri Rumyantsev wrote: Hi Richard, I learned your updated patch for 23825 and it is more general in comparison with my. I'd like to propose you a compromise - let's consider my patch only for force-vectorize outer loop only to allow outer-loop vecctorization. Note that

Re: [PATCH] Unswitching outer loops.

2015-07-31 Thread Yuri Rumyantsev
Hi Richard, I learned your updated patch for 23825 and it is more general in comparison with my. I'd like to propose you a compromise - let's consider my patch only for force-vectorize outer loop only to allow outer-loop vecctorization. Note that your approach will not hoist invariant guards if

Re: [PATCH] Unswitching outer loops.

2015-07-28 Thread Richard Biener
On Thu, Jul 23, 2015 at 4:45 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Hi Richard, I checked that both test-cases from 23855 are sucessfully unswitched by proposed patch. I understand that it does not catch deeper loop nest as for (i=0; i10; i++) for (j=0;jn;j++) for

Re: [PATCH] Unswitching outer loops.

2015-07-23 Thread Yuri Rumyantsev
Hi Richard, I checked that both test-cases from 23855 are sucessfully unswitched by proposed patch. I understand that it does not catch deeper loop nest as for (i=0; i10; i++) for (j=0;jn;j++) for (k=0;k20;k++) ... but duplication of middle-loop does not look reasonable. Here

Re: [PATCH] Unswitching outer loops.

2015-07-14 Thread Richard Biener
On Fri, Jul 10, 2015 at 12:02 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Hi All, Here is presented simple transformation which tries to hoist out of outer-loop a check on zero trip count for inner-loop. This is very restricted transformation since it accepts outer-loops with very simple

[PATCH] Unswitching outer loops.

2015-07-10 Thread Yuri Rumyantsev
Hi All, Here is presented simple transformation which tries to hoist out of outer-loop a check on zero trip count for inner-loop. This is very restricted transformation since it accepts outer-loops with very simple cfg, as for example: acc = 0; for (i = 1; i = m; i++) { for (j = 0; j