Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-10-10 Thread Segher Boessenkool
On Mon, Oct 10, 2016 at 03:21:31PM -0600, Jeff Law wrote: > On 09/30/2016 04:34 AM, Segher Boessenkool wrote: > >[ whoops, message too big, resending with the attachment compressed ] > > > >On Tue, Sep 27, 2016 at 03:14:51PM -0600, Jeff Law wrote: > >>With transposition issue addressed, the only bl

Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-10-10 Thread Jeff Law
On 09/30/2016 04:34 AM, Segher Boessenkool wrote: [ whoops, message too big, resending with the attachment compressed ] On Tue, Sep 27, 2016 at 03:14:51PM -0600, Jeff Law wrote: With transposition issue addressed, the only blocker I see are some simple testcases we can add to the suite. They d

Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-09-30 Thread Segher Boessenkool
[ whoops, message too big, resending with the attachment compressed ] On Tue, Sep 27, 2016 at 03:14:51PM -0600, Jeff Law wrote: > With transposition issue addressed, the only blocker I see are some > simple testcases we can add to the suite. They don't have to be real > extensive. And one moti

Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-09-30 Thread Segher Boessenkool
On Tue, Sep 27, 2016 at 03:14:51PM -0600, Jeff Law wrote: > With transposition issue addressed, the only blocker I see are some > simple testcases we can add to the suite. They don't have to be real > extensive. And one motivating example for the list archives, ideally > the glibc malloc case.

Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-09-28 Thread Jeff Law
On 09/28/2016 03:04 AM, Segher Boessenkool wrote: +static void +place_prologue_for_one_component (unsigned int which, basic_block head) +{ + /* The block we are currently dealing with. */ + basic_block bb = head; + /* Is this the first time we visit this block, i.e. have we just gone +

Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-09-28 Thread Segher Boessenkool
On Tue, Sep 27, 2016 at 03:14:51PM -0600, Jeff Law wrote: > On 09/23/2016 02:21 AM, Segher Boessenkool wrote: > >--- a/gcc/function.c > >+++ b/gcc/function.c > >@@ -5920,9 +5920,7 @@ thread_prologue_and_epilogue_insns (void) > > edge entry_edge = single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun));

Re: [PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-09-27 Thread Jeff Law
On 09/23/2016 02:21 AM, Segher Boessenkool wrote: Deciding what blocks should run with a certain component active so that the total cost of executing the prologues (and epilogues) is optimal, is not a computationally feasible problem. Instead, for each basic block, we estimate the cost of puttin

[PATCH 4/5] shrink-wrap: Shrink-wrapping for separate components

2016-09-23 Thread Segher Boessenkool
This is the main substance of this patch series. Instead of doing all of the prologue and epilogue in one spot, it often is better to do components of it at different places, so that they are executed less frequently. What exactly is a component is completely up to the target; this code treats it