Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-27 Thread Eric Botcazou
> Because reorder_insns doesn't handle the case of moving a barrier into a > middle of basic block. Right, I should have read the audit trail. :-) The patch is OK then, but add a ??? note at the end of the comment saying that the proper thing to do here is probably not to run cleanup_barrier fo

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-27 Thread Jakub Jelinek
On Tue, Jan 27, 2015 at 09:25:32AM +0100, Eric Botcazou wrote: > > Yes, they do, that is why it crashed during final. > > OK. Why wouldn't it work to call reorder_insns instead of reorder_insns_nobb? Because reorder_insns doesn't handle the case of moving a barrier into a middle of basic block.

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-27 Thread Eric Botcazou
> Yes, they do, that is why it crashed during final. OK. Why wouldn't it work to call reorder_insns instead of reorder_insns_nobb? -- Eric Botcazou

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Jeff Law
On 01/26/15 06:34, Jakub Jelinek wrote: On Mon, Jan 26, 2015 at 01:11:01PM +0100, Richard Biener wrote: I agree that freeing the cfg and immediately computing it again doesn't make sense, but I just don't see this patch being incompatible with that. I wonder if handing over pass pipeline contr

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Jakub Jelinek
On Mon, Jan 26, 2015 at 01:11:01PM +0100, Richard Biener wrote: > > I agree that freeing the cfg and immediately computing it again doesn't make > > sense, but I just don't see this patch being incompatible with that. > > I wonder if handing over pass pipeline control to targets at > machine_reorg

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Richard Biener
On Mon, Jan 26, 2015 at 12:47 PM, Jakub Jelinek wrote: > On Mon, Jan 26, 2015 at 12:35:30PM +0100, Steven Bosscher wrote: >> On Mon, Jan 26, 2015 at 10:11 AM, Jakub Jelinek wrote: >> > On Mon, Jan 26, 2015 at 10:06:05AM +0100, Eric Botcazou wrote: >> >> > While the cleanup_barriers runs after clea

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Jakub Jelinek
On Mon, Jan 26, 2015 at 12:35:30PM +0100, Steven Bosscher wrote: > On Mon, Jan 26, 2015 at 10:11 AM, Jakub Jelinek wrote: > > On Mon, Jan 26, 2015 at 10:06:05AM +0100, Eric Botcazou wrote: > >> > While the cleanup_barriers runs after cleaning up BLOCK_FOR_INSNs, > >> > some targets like i?86/x86_64

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Steven Bosscher
On Mon, Jan 26, 2015 at 10:11 AM, Jakub Jelinek wrote: > On Mon, Jan 26, 2015 at 10:06:05AM +0100, Eric Botcazou wrote: >> > While the cleanup_barriers runs after cleaning up BLOCK_FOR_INSNs, >> > some targets like i?86/x86_64 choose to populate it again during machine >> > reorg and some target do

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Jakub Jelinek
On Mon, Jan 26, 2015 at 10:11:00AM +0100, Jakub Jelinek wrote: > On Mon, Jan 26, 2015 at 10:06:05AM +0100, Eric Botcazou wrote: > > > While the cleanup_barriers runs after cleaning up BLOCK_FOR_INSNs, > > > some targets like i?86/x86_64 choose to populate it again during machine > > > reorg and som

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Jakub Jelinek
On Mon, Jan 26, 2015 at 10:06:05AM +0100, Eric Botcazou wrote: > > While the cleanup_barriers runs after cleaning up BLOCK_FOR_INSNs, > > some targets like i?86/x86_64 choose to populate it again during machine > > reorg and some target don't free it at the end of machine reorg. > > This patch upda

Re: [PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-26 Thread Eric Botcazou
> While the cleanup_barriers runs after cleaning up BLOCK_FOR_INSNs, > some targets like i?86/x86_64 choose to populate it again during machine > reorg and some target don't free it at the end of machine reorg. > This patch updates cleanup_barrier pass, so that it adjusts basic block > boundaries a

[PATCH] Update BBs in cleanup_barriers pass (PR rtl-optimization/61058)

2015-01-22 Thread Jakub Jelinek
Hi! While the cleanup_barriers runs after cleaning up BLOCK_FOR_INSNs, some targets like i?86/x86_64 choose to populate it again during machine reorg and some target don't free it at the end of machine reorg. This patch updates cleanup_barrier pass, so that it adjusts basic block boundaries and BL