Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-20 Thread Kenneth Zadeck
yes On 03/20/2011 08:44 AM, Jakub Jelinek wrote: On Sat, Mar 19, 2011 at 09:42:26AM -0400, Kenneth Zadeck wrote: i think that this is the right way to go.my view is not just what the code currently does, but also from the perspective of the way i want this to work as the back ends evolve.

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-20 Thread Jakub Jelinek
On Sat, Mar 19, 2011 at 09:42:26AM -0400, Kenneth Zadeck wrote: > i think that this is the right way to go.my view is not just > what the code currently does, but also from the perspective of the > way i want this to work as the back ends evolve. Here is the updated patch, bootstrapped/regtest

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-19 Thread Kenneth Zadeck
On 03/19/2011 09:01 AM, Jakub Jelinek wrote: On Sat, Mar 19, 2011 at 08:48:55AM -0400, Kenneth Zadeck wrote: i think that there are two separate questions here: 1) should your original patch go in as you did it, or should it go in with the last "return false" be an abort? bool df_get_bb_dirt

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-19 Thread Jakub Jelinek
On Sat, Mar 19, 2011 at 08:48:55AM -0400, Kenneth Zadeck wrote: > i think that there are two separate questions here: > > 1) should your original patch go in as you did it, or should it go > in with the last "return false" be an abort? bool df_get_bb_dirty (basic_block bb) { return bitmap_bit_p

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-19 Thread Kenneth Zadeck
On 03/19/2011 08:15 AM, Jakub Jelinek wrote: On Sat, Mar 19, 2011 at 08:08:48AM -0400, Kenneth Zadeck wrote: On 03/19/2011 05:19 AM, Paolo Bonzini wrote: On Fri, Mar 18, 2011 at 19:18, Kenneth Zadeck wrote: yes, but i think that the reason this is a pr is that it seems to be needed for cor

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-19 Thread Jakub Jelinek
On Sat, Mar 19, 2011 at 08:08:48AM -0400, Kenneth Zadeck wrote: > > On 03/19/2011 05:19 AM, Paolo Bonzini wrote: > >On Fri, Mar 18, 2011 at 19:18, Kenneth Zadeck > >wrote: > >>yes, but i think that the reason this is a pr is that it seems to be needed > >>for correctness. > >Note that df_get_bb_

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-19 Thread Kenneth Zadeck
On 03/19/2011 05:19 AM, Paolo Bonzini wrote: On Fri, Mar 18, 2011 at 19:18, Kenneth Zadeck wrote: yes, but i think that the reason this is a pr is that it seems to be needed for correctness. Note that df_get_bb_dirty is defaulting to "return false", not "abort". This is what tricked crossjum

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-19 Thread Paolo Bonzini
On Fri, Mar 18, 2011 at 19:18, Kenneth Zadeck wrote: > yes, but i think that the reason this is a pr is that it seems to be needed > for correctness. Note that df_get_bb_dirty is defaulting to "return false", not "abort". This is what tricked crossjumping and caused the bug. If I can get hold o

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Kenneth Zadeck
i see your point.I had forgotten that crossjumping is not really a pass, it is more of an infectious agent. On 03/18/2011 01:45 PM, Paolo Bonzini wrote: On Fri, Mar 18, 2011 at 17:31, Jakub Jelinek wrote: On Fri, Mar 18, 2011 at 12:23:11PM -0400, Kenneth Zadeck wrote: I believe that this

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Jakub Jelinek
On Fri, Mar 18, 2011 at 06:45:57PM +0100, Paolo Bonzini wrote: > > Is the live problem so much more useful for crossjumping than lr problem? > > All it wants to prove is if it can safely move a couple of instructions > > across some other instructions, and the live_union bitmap that is computed > >

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Paolo Bonzini
On Fri, Mar 18, 2011 at 17:31, Jakub Jelinek wrote: > On Fri, Mar 18, 2011 at 12:23:11PM -0400, Kenneth Zadeck wrote: >> I believe that this is not the right way to go. >> >> if someone specifies -fcrossjumping, then the pass should turn on >> live for the duration of the pass just as ifcvt does.

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Kenneth Zadeck
I could be happy with both patches. On 03/18/2011 12:25 PM, Paolo Bonzini wrote: On Fri, Mar 18, 2011 at 17:23, Kenneth Zadeck wrote: I believe that this is not the right way to go. if someone specifies -fcrossjumping, then the pass should turn on live for the duration of the pass just as ifc

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Michael Matz
Hi, On Fri, 18 Mar 2011, Kenneth Zadeck wrote: > I believe that this is not the right way to go. > > if someone specifies -fcrossjumping, then the pass should turn on live for the > duration of the pass just as ifcvt does.If they ask for crossjumping you > should give them crossjumping and n

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Paolo Bonzini
On Fri, Mar 18, 2011 at 17:23, Kenneth Zadeck wrote: > I believe that this is not the right way to go. > > if someone specifies -fcrossjumping, then the pass should turn on live for > the duration of the pass just as ifcvt does.    If they ask for crossjumping > you should give them crossjumping a

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Jakub Jelinek
On Fri, Mar 18, 2011 at 12:23:11PM -0400, Kenneth Zadeck wrote: > I believe that this is not the right way to go. > > if someone specifies -fcrossjumping, then the pass should turn on > live for the duration of the pass just as ifcvt does.If they ask > for crossjumping you should give them cro

Re: [PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Kenneth Zadeck
I believe that this is not the right way to go. if someone specifies -fcrossjumping, then the pass should turn on live for the duration of the pass just as ifcvt does.If they ask for crossjumping you should give them crossjumping and not some crippled version of it. kenny On 03/18/201

[PATCH] Fix -fcrossjumping at -O1 (PR rtl-optimization/48156)

2011-03-18 Thread Jakub Jelinek
Hi! The testcase below is miscompiled on x86_64-linux. The problem is that try_head_merge_bb uses df_get_bb_dirty to see if it can use df_get_live_out () info (through simulate_backwards_to_point) reliably, but as at -O1 the live problem isn't computed, only lr problem, df_get_live_out () returns