Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-14 Thread Segher Boessenkool
On Mon, Sep 12, 2016 at 10:49:46AM -0600, Jeff Law wrote: > On 09/09/2016 02:56 PM, Segher Boessenkool wrote: > >On Fri, Sep 09, 2016 at 12:57:32PM -0600, Jeff Law wrote: > >>I think the lack of test coverage is something we'll want to address. > > > >Building and running the compiler, the various

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-12 Thread Jeff Law
On 09/09/2016 02:56 PM, Segher Boessenkool wrote: On Fri, Sep 09, 2016 at 12:57:32PM -0600, Jeff Law wrote: I think the lack of test coverage is something we'll want to address. Building and running the compiler, the various target libraries, and the testsuite is more than enough coverage for

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-12 Thread Bernd Schmidt
On 09/09/2016 10:56 PM, Segher Boessenkool wrote: On Fri, Sep 09, 2016 at 12:57:32PM -0600, Jeff Law wrote: I think the lack of test coverage is something we'll want to address. Building and running the compiler, the various target libraries, and the testsuite is more than enough coverage for

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Fri, Sep 09, 2016 at 12:57:32PM -0600, Jeff Law wrote: > I think the lack of test coverage is something we'll want to address. Building and running the compiler, the various target libraries, and the testsuite is more than enough coverage for correctness in my opinion -- I cannot make up anythi

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Fri, Sep 09, 2016 at 12:19:03PM -0600, Jeff Law wrote: > >>Does this impact the compile time computation complexity issue that was > >>raised elsewhere? > > > >I'm not sure what you mean here either, sorry. It is all O(NM) with N > >the number of BBs and M the number of components (and assuming

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 08/26/2016 07:03 AM, Bernd Schmidt wrote: On 08/01/2016 03:42 AM, Segher Boessenkool wrote: This is the second version. Concern was renamed to component, and all other comments were addressed (I hope). Not really, I'm afraid. There still seems to be no detailed explanation of the algorithm

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 09/09/2016 09:40 AM, Segher Boessenkool wrote: So I think sticking with this as a design decision makes sense -- does it impact the issue around running a particular component's prologue more than once? I don't follow, sorry; could you rephrase? Nevermind -- my question has been resolved.

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 09/09/2016 10:57 AM, Segher Boessenkool wrote: On Fri, Sep 09, 2016 at 10:48:30AM -0600, Jeff Law wrote: and even allows them to be executed more than once, if that is cheaper. This is the part that I'm still struggling with. The usual example: 1 |\ | \ | 2 | / |/ 3 |\ | \ | 4 | / |/ 5

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 09/09/2016 10:49 AM, Segher Boessenkool wrote: On Fri, Sep 09, 2016 at 09:59:03AM -0600, Jeff Law wrote: On 09/09/2016 09:17 AM, Segher Boessenkool wrote: On Thu, Sep 08, 2016 at 10:41:37AM -0600, Jeff Law wrote: So can you expand on the malloc example a bit -- I'm pretty sure I understand

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Fri, Sep 09, 2016 at 10:48:30AM -0600, Jeff Law wrote: > and even allows them to be executed more than once, if that is > >cheaper. > This is the part that I'm still struggling with. The usual example: 1 |\ | \ | 2 | / |/ 3 |\ | \ | 4 | / |/ 5 where 2 and 4 need a certain prologue component

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Fri, Sep 09, 2016 at 09:59:03AM -0600, Jeff Law wrote: > On 09/09/2016 09:17 AM, Segher Boessenkool wrote: > >On Thu, Sep 08, 2016 at 10:41:37AM -0600, Jeff Law wrote: > >>So can you expand on the malloc example a bit -- I'm pretty sure I > >>understand what you're trying to do, but a concrete e

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 09/09/2016 09:28 AM, Segher Boessenkool wrote: Segher's code essentially allows individual components of the prologue to sink to different points within the function rather than forcing the prologue to be sunk as an atomic unit. It also allows prologue an epilogue components to be placed in

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 09/09/2016 09:17 AM, Segher Boessenkool wrote: On Thu, Sep 08, 2016 at 10:41:37AM -0600, Jeff Law wrote: So can you expand on the malloc example a bit -- I'm pretty sure I understand what you're trying to do, but a concrete example may help Bernd and be useful for archival purposes. Sure, b

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Fri, Sep 09, 2016 at 09:26:39AM -0600, Jeff Law wrote: > >>I think one of the questions (and I haven't looked through the whole > >>thread yet to see if it's answered) is why the basic shrink-wrapping > >>algorithm can't be applied to each of the prologue components -- though > >>you may have an

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Thu, Sep 08, 2016 at 10:58:13AM -0600, Jeff Law wrote: > >And that comment puzzles me. Surely prologue and epilogue are executed > >only once currently, so how does frequency come into it? Again - please > >provide an example. > Right, they're executed once currently. But the prologue could be

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Jeff Law
On 09/09/2016 12:19 AM, Segher Boessenkool wrote: Thanks for looking at the patches Jeff. On Thu, Sep 08, 2016 at 10:28:59AM -0600, Jeff Law wrote: Right. Essentially Segher's patch introduces the concept of prologue components that are independent of each other and which can be shrink-wrapped

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-09 Thread Segher Boessenkool
On Thu, Sep 08, 2016 at 10:41:37AM -0600, Jeff Law wrote: > So can you expand on the malloc example a bit -- I'm pretty sure I > understand what you're trying to do, but a concrete example may help > Bernd and be useful for archival purposes. Sure, but it's big (which is the problem :-) ) > I a

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Segher Boessenkool
Thanks for looking at the patches Jeff. On Thu, Sep 08, 2016 at 10:28:59AM -0600, Jeff Law wrote: > Right. Essentially Segher's patch introduces the concept of prologue > components that are independent of each other and which can be > shrink-wrapped separately. The degree of independence is h

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Jeff Law
On 08/26/2016 09:03 AM, Bernd Schmidt wrote: On 08/26/2016 04:50 PM, Segher Boessenkool wrote: The head comment starts with +/* Separate shrink-wrapping + + Instead of putting all of the prologue and epilogue in one spot, we + can put parts of it in places where those components are execute

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Jeff Law
On 08/26/2016 10:27 AM, Segher Boessenkool wrote: On Fri, Aug 26, 2016 at 05:03:34PM +0200, Bernd Schmidt wrote: On 08/26/2016 04:50 PM, Segher Boessenkool wrote: The head comment starts with +/* Separate shrink-wrapping + + Instead of putting all of the prologue and epilogue in one spot, we

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Jeff Law
On 08/30/2016 06:31 AM, Michael Matz wrote: Hi, On Fri, 26 Aug 2016, Bernd Schmidt wrote: And that comment puzzles me. Surely prologue and epilogue are executed only once currently, so how does frequency come into it? Again - please provide an example. int some_global; int foo (void) { if

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-30 Thread Michael Matz
Hi, On Fri, 26 Aug 2016, Bernd Schmidt wrote: > And that comment puzzles me. Surely prologue and epilogue are executed only > once currently, so how does frequency come into it? Again - please provide an > example. int some_global; int foo (void) { if (!some_global) { call_this(); call

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Segher Boessenkool
On Fri, Aug 26, 2016 at 05:03:34PM +0200, Bernd Schmidt wrote: > On 08/26/2016 04:50 PM, Segher Boessenkool wrote: > >The head comment starts with > > > >+/* Separate shrink-wrapping > >+ > >+ Instead of putting all of the prologue and epilogue in one spot, we > >+ can put parts of it in places

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Bernd Schmidt
On 08/26/2016 04:50 PM, Segher Boessenkool wrote: The head comment starts with +/* Separate shrink-wrapping + + Instead of putting all of the prologue and epilogue in one spot, we + can put parts of it in places where those components are executed less + frequently. and that is the long a

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Segher Boessenkool
Hi Bernd, On Fri, Aug 26, 2016 at 03:03:43PM +0200, Bernd Schmidt wrote: > Not really, I'm afraid. There still seems to be no detailed explanation > of the algorithm. Instead, there is a vague outline Did you read the description of 8/9? If you think any of that needs to be in the code, please

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Bernd Schmidt
On 08/26/2016 03:48 PM, David Malcolm wrote: I'm nervous about the build_random_cfg function: randomness in selftests seems like a double-edged sword. On the one hand, we can use it to fuzz-test an optimization to rapidly gain a lot of coverage. On the other hand, does every host generate the s

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread David Malcolm
On Fri, 2016-08-26 at 15:03 +0200, Bernd Schmidt wrote: > On 08/01/2016 03:42 AM, Segher Boessenkool wrote: > > This is the second version. Concern was renamed to component, and > > all > > other comments were addressed (I hope). > > Not really, I'm afraid. There still seems to be no detailed > e

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-26 Thread Bernd Schmidt
On 08/01/2016 03:42 AM, Segher Boessenkool wrote: This is the second version. Concern was renamed to component, and all other comments were addressed (I hope). Not really, I'm afraid. There still seems to be no detailed explanation of the algorithm. Instead, there is a vague outline (which sh

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-24 Thread Segher Boessenkool
Ping x2. On Wed, Aug 03, 2016 at 07:05:34PM -0500, Segher Boessenkool wrote: > Ping. > > > Segher > > > On Mon, Aug 01, 2016 at 01:42:37AM +, Segher Boessenkool wrote: > > This is the second version. Concern was renamed to component, and all > > other comments were addressed (I hope). It

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-08-03 Thread Segher Boessenkool
Ping. Segher On Mon, Aug 01, 2016 at 01:42:37AM +, Segher Boessenkool wrote: > This is the second version. Concern was renamed to component, and all > other comments were addressed (I hope). It still uses only two bitmaps > for the component placement, but now they are called needs_compon

[PATCH v2 0/9] Separate shrink-wrapping

2016-07-31 Thread Segher Boessenkool
This is the second version. Concern was renamed to component, and all other comments were addressed (I hope). It still uses only two bitmaps for the component placement, but now they are called needs_components and has_components, which hopefully is easier to follow. The "can this prologue be mo