Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-29 Thread Jakub Jelinek
On Sat, Apr 29, 2017 at 10:43:52PM +0200, Steven Bosscher wrote: > On Wed, Apr 26, 2017 at 1:25 PM, Jakub Jelinek wrote: > > Or shall we just: > > --- gcc/alias.c 2017-04-25 15:51:31.072923325 +0200 > > +++ gcc/alias.c 2017-04-26 13:23:55.595048464 +0200 > > @@ -3221,6 +3221,8 @@ memory_modified_in

Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-29 Thread Steven Bosscher
On Wed, Apr 26, 2017 at 1:25 PM, Jakub Jelinek wrote: > Or shall we just: > --- gcc/alias.c 2017-04-25 15:51:31.072923325 +0200 > +++ gcc/alias.c 2017-04-26 13:23:55.595048464 +0200 > @@ -3221,6 +3221,8 @@ memory_modified_in_insn_p (const_rtx mem > { >if (!INSN_P (insn)) > return false; >

Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-29 Thread Jakub Jelinek
On Fri, Apr 28, 2017 at 12:32:47PM -0600, Jeff Law wrote: > On 04/26/2017 05:25 AM, Jakub Jelinek wrote: > > On Tue, Apr 25, 2017 at 09:31:00PM +0200, Jakub Jelinek wrote: > > > This patch let us search for x's setter earlier in the bb. > > > During testing I found that modified_in_p/modified_in_be

Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-28 Thread Jeff Law
On 04/26/2017 05:25 AM, Jakub Jelinek wrote: On Tue, Apr 25, 2017 at 09:31:00PM +0200, Jakub Jelinek wrote: This patch let us search for x's setter earlier in the bb. During testing I found that modified_in_p/modified_in_between_p don't actually take into account calls that could change MEMs, so

Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-28 Thread Jeff Law
On 04/25/2017 01:31 PM, Jakub Jelinek wrote: Hi! The following patch is a partial fix for PR80491, an improvement for if-conversion if there is empty else_bb. What we do right now is in that case we only look at the immediately preceeding (non-debug/non-note) instruction before cond_earliest an

Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-26 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 09:31:00PM +0200, Jakub Jelinek wrote: > This patch let us search for x's setter earlier in the bb. > During testing I found that modified_in_p/modified_in_between_p don't > actually take into account calls that could change MEMs, so the patch > handles that too. Or shall w

[PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-25 Thread Jakub Jelinek
Hi! The following patch is a partial fix for PR80491, an improvement for if-conversion if there is empty else_bb. What we do right now is in that case we only look at the immediately preceeding (non-debug/non-note) instruction before cond_earliest and if it is not the set of x, we just turn it in