Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-04 Thread Richard Biener
On Thu, Nov 3, 2016 at 4:46 PM, Segher Boessenkool wrote: > On Thu, Nov 03, 2016 at 09:29:07AM +0100, Richard Biener wrote: >> On Wed, Nov 2, 2016 at 4:27 PM, Segher Boessenkool >> wrote: >> > On Wed, Nov 02, 2016 at 02:51:41PM +0100,

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-03 Thread Segher Boessenkool
On Thu, Nov 03, 2016 at 09:29:07AM +0100, Richard Biener wrote: > On Wed, Nov 2, 2016 at 4:27 PM, Segher Boessenkool > wrote: > > On Wed, Nov 02, 2016 at 02:51:41PM +0100, Richard Biener wrote: > >> >> I don't believe it needs a cleanup on every iteration. One cleanup

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-03 Thread Richard Biener
On Wed, Nov 2, 2016 at 4:27 PM, Segher Boessenkool wrote: > On Wed, Nov 02, 2016 at 02:51:41PM +0100, Richard Biener wrote: >> >> I don't believe it needs a cleanup on every iteration. One cleanup at >> >> the end should work fine. >> > >> > But as the comment there

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-02 Thread Segher Boessenkool
On Wed, Nov 02, 2016 at 02:51:41PM +0100, Richard Biener wrote: > >> I don't believe it needs a cleanup on every iteration. One cleanup at > >> the end should work fine. > > > > But as the comment there says: > > > > /* Merge the duplicated blocks into predecessors, when possible. */ > >

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-02 Thread Richard Biener
On Wed, Nov 2, 2016 at 2:40 PM, Segher Boessenkool wrote: > On Wed, Nov 02, 2016 at 11:39:20AM +0100, Steven Bosscher wrote: >> On Wed, Nov 2, 2016 at 10:02 AM, Richard Biener >> wrote: >> > On Mon, Oct 31, 2016 at 4:35 PM, Segher

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-02 Thread Segher Boessenkool
On Wed, Nov 02, 2016 at 11:39:20AM +0100, Steven Bosscher wrote: > On Wed, Nov 2, 2016 at 10:02 AM, Richard Biener > wrote: > > On Mon, Oct 31, 2016 at 4:35 PM, Segher Boessenkool wrote: > >> On Mon, Oct 31, 2016 at 04:09:48PM +0100, Steven Bosscher wrote: > >>> On

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-02 Thread Steven Bosscher
On Wed, Nov 2, 2016 at 10:02 AM, Richard Biener wrote: > On Mon, Oct 31, 2016 at 4:35 PM, Segher Boessenkool wrote: >> On Mon, Oct 31, 2016 at 04:09:48PM +0100, Steven Bosscher wrote: >>> On Sun, Oct 30, 2016 at 8:10 PM, Segher Boessenkool wrote: >>> > +

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-11-02 Thread Richard Biener
On Mon, Oct 31, 2016 at 4:35 PM, Segher Boessenkool wrote: > On Mon, Oct 31, 2016 at 04:09:48PM +0100, Steven Bosscher wrote: >> On Sun, Oct 30, 2016 at 8:10 PM, Segher Boessenkool wrote: >> > This patch solves this problem by simply running the >> >

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-10-31 Thread Segher Boessenkool
On Mon, Oct 31, 2016 at 04:09:48PM +0100, Steven Bosscher wrote: > On Sun, Oct 30, 2016 at 8:10 PM, Segher Boessenkool wrote: > > This patch solves this problem by simply running the > > duplicate_computed_gotos > > pass again, as long as it does any work. The patch looks much bigger than > > it

Re: [PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-10-31 Thread Steven Bosscher
On Sun, Oct 30, 2016 at 8:10 PM, Segher Boessenkool wrote: > This patch solves this problem by simply running the duplicate_computed_gotos > pass again, as long as it does any work. The patch looks much bigger than > it is, because I factored out two routines to simplify the control flow. It's

[PATCH] bb-reorder: Improve compgotos pass (PR71785)

2016-10-30 Thread Segher Boessenkool
For code like the testcase in PR71785 GCC factors all the indirect branches to a single dispatcher that then everything jumps to. This is because having many indirect branches with each many jump targets does not scale in large parts of the compiler. Very late in the pass pipeline (right before