Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-20 Thread Segher Boessenkool
On Wed, Jul 20, 2016 at 01:23:44PM +0200, Bernd Schmidt wrote: > >>>But you need the profile to make even reasonably good decisions. > >> > >>I'm not worried about making cost decisions: as far as I'm concerned > >>it's perfectly fine for that. I'm worried about correctness - you can't > >>validly

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-20 Thread Bernd Schmidt
On 07/19/2016 05:35 PM, Segher Boessenkool wrote: On Tue, Jul 19, 2016 at 04:49:26PM +0200, Bernd Schmidt wrote: But you need the profile to make even reasonably good decisions. I'm not worried about making cost decisions: as far as I'm concerned it's perfectly fine for that. I'm worried abo

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-19 Thread Segher Boessenkool
On Tue, Jul 19, 2016 at 04:49:26PM +0200, Bernd Schmidt wrote: > >But you need the profile to make even reasonably good decisions. > > I'm not worried about making cost decisions: as far as I'm concerned > it's perfectly fine for that. I'm worried about correctness - you can't > validly save reg

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-19 Thread Bernd Schmidt
On 07/19/2016 04:46 PM, Segher Boessenkool wrote: But you need the profile to make even reasonably good decisions. I'm not worried about making cost decisions: as far as I'm concerned it's perfectly fine for that. I'm worried about correctness - you can't validly save registers inside a loop

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-19 Thread Segher Boessenkool
On Mon, Jul 18, 2016 at 07:03:04PM +0200, Bernd Schmidt wrote: > >>>+ /* The frequency of executing the prologue for this BB and all BBs > >>>+ dominated by it. */ > >>>+ gcov_type cost; > >> > >>Is this frequency consideration the only thing that attempts to prevent > >>placing prologue ins

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-18 Thread Bernd Schmidt
On 07/18/2016 06:34 PM, Segher Boessenkool wrote: + /* The frequency of executing the prologue for this BB and all BBs + dominated by it. */ + gcov_type cost; Is this frequency consideration the only thing that attempts to prevent placing prologue insns into loops? Yes. The algorith

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-18 Thread Segher Boessenkool
Hi Bernd, Thanks for the review. On Fri, Jul 15, 2016 at 02:42:24PM +0200, Bernd Schmidt wrote: > I still have misgivings about all the changes needed to the following > passes, but I guess there's no choice but to live with it. So, I'm > trying to look at this patch, but I'm finding it fairly

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate concerns

2016-07-15 Thread Bernd Schmidt
I still have misgivings about all the changes needed to the following passes, but I guess there's no choice but to live with it. So, I'm trying to look at this patch, but I'm finding it fairly impenetrable and underdocumented. + /* The concerns for which we want a prologue placed on this BB.