Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Bernd Schmidt
On 10/26/2016 07:27 PM, Segher Boessenkool wrote: On Wed, Oct 26, 2016 at 03:13:06PM +0200, Bernd Schmidt wrote: On 10/26/2016 03:05 PM, Segher Boessenkool wrote: 2) We do not necessarily have all notes yet, if the port lets dwarf2cfi create notes by itself. Most (or even all?) ports do. Hmm

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Segher Boessenkool
On Wed, Oct 26, 2016 at 03:13:06PM +0200, Bernd Schmidt wrote: > On 10/26/2016 03:05 PM, Segher Boessenkool wrote: > >2) We do not necessarily have all notes yet, if the port lets dwarf2cfi > >create notes by itself. Most (or even all?) ports do. > > Hmm. Are you recording the insns in prologue_c

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Segher Boessenkool
On Wed, Oct 26, 2016 at 03:13:06PM +0200, Bernd Schmidt wrote: > On 10/26/2016 03:05 PM, Segher Boessenkool wrote: > >2) We do not necessarily have all notes yet, if the port lets dwarf2cfi > >create notes by itself. Most (or even all?) ports do. > > Hmm. Are you recording the insns in prologue_c

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Bernd Schmidt
On 10/26/2016 03:05 PM, Segher Boessenkool wrote: 2) We do not necessarily have all notes yet, if the port lets dwarf2cfi create notes by itself. Most (or even all?) ports do. Hmm. Are you recording the insns in prologue_contains etc.? You could add dependencies for a prologue insn following

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Segher Boessenkool
On Wed, Oct 26, 2016 at 02:30:04PM +0200, Bernd Schmidt wrote: > On 10/26/2016 01:19 PM, Segher Boessenkool wrote: > >Separate shrink-wrapping creates this not-all-that-smart code because > >the profile is quite messed up, and spread_components isn't super smart > >to begin with. I'll have a patch

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Bernd Schmidt
On 10/26/2016 01:19 PM, Segher Boessenkool wrote: Separate shrink-wrapping creates this not-all-that-smart code because the profile is quite messed up, and spread_components isn't super smart to begin with. I'll have a patch for that soon, but even with it (and also without separate shrink-wrapp

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Segher Boessenkool
On Wed, Oct 26, 2016 at 12:48:54PM +0200, Bernd Schmidt wrote: > On 10/25/2016 06:57 PM, Segher Boessenkool wrote: > >This patch makes scheduling not reorder any RTX_FRAME_RELATED_P insns > >(relative to each other), to fix PR78029. I originally was a bit worried > >that this would degrade code qu

Re: [PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-26 Thread Bernd Schmidt
On 10/25/2016 06:57 PM, Segher Boessenkool wrote: This patch makes scheduling not reorder any RTX_FRAME_RELATED_P insns (relative to each other), to fix PR78029. I originally was a bit worried that this would degrade code quality, but it seems to even improve it: more other insns are scheduled b

[PATCH] sched: Do not reorder RTX_FRAME_RELATED_P insns (PR78029)

2016-10-25 Thread Segher Boessenkool
This patch makes scheduling not reorder any RTX_FRAME_RELATED_P insns (relative to each other), to fix PR78029. I originally was a bit worried that this would degrade code quality, but it seems to even improve it: more other insns are scheduled between the prologue insns. The problem in PR78029: