Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-12-02 Thread James Greenhalgh
On Wed, Nov 30, 2016 at 02:07:58PM +, Kyrill Tkachov wrote: > > On 29/11/16 20:29, Segher Boessenkool wrote: > >Hi James, Kyrill, > > > >On Tue, Nov 29, 2016 at 10:57:33AM +, James Greenhalgh wrote: > >>>+static sbitmap > >>>+aarch64_components_for_bb (basic_block bb) > >>>+{ > >>>+ bitma

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-30 Thread Kyrill Tkachov
On 29/11/16 20:29, Segher Boessenkool wrote: Hi James, Kyrill, On Tue, Nov 29, 2016 at 10:57:33AM +, James Greenhalgh wrote: +static sbitmap +aarch64_components_for_bb (basic_block bb) +{ + bitmap in = DF_LIVE_IN (bb); + bitmap gen = &DF_LIVE_BB_INFO (bb)->gen; + bitmap kill = &DF_LIVE_

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-29 Thread Segher Boessenkool
Hi James, Kyrill, On Tue, Nov 29, 2016 at 10:57:33AM +, James Greenhalgh wrote: > > +static sbitmap > > +aarch64_components_for_bb (basic_block bb) > > +{ > > + bitmap in = DF_LIVE_IN (bb); > > + bitmap gen = &DF_LIVE_BB_INFO (bb)->gen; > > + bitmap kill = &DF_LIVE_BB_INFO (bb)->kill; > > +

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-29 Thread James Greenhalgh
On Tue, Nov 29, 2016 at 11:32:41AM +, Kyrill Tkachov wrote: > >>+ > >>+/* Implement TARGET_SHRINK_WRAP_COMPONENTS_FOR_BB. */ > >>+ > >>+static sbitmap > >>+aarch64_components_for_bb (basic_block bb) > >>+{ > >>+ bitmap in = DF_LIVE_IN (bb); > >>+ bitmap gen = &DF_LIVE_BB_INFO (bb)->gen; >

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-29 Thread Kyrill Tkachov
On 29/11/16 11:18, Kyrill Tkachov wrote: Hi James, On 29/11/16 10:57, James Greenhalgh wrote: On Mon, Nov 14, 2016 at 02:25:28PM +, Kyrill Tkachov wrote: On 11/11/16 15:31, Kyrill Tkachov wrote: On 11/11/16 10:17, Kyrill Tkachov wrote: On 10/11/16 23:39, Segher Boessenkool wrote: On Th

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-29 Thread Kyrill Tkachov
Hi James, On 29/11/16 10:57, James Greenhalgh wrote: On Mon, Nov 14, 2016 at 02:25:28PM +, Kyrill Tkachov wrote: On 11/11/16 15:31, Kyrill Tkachov wrote: On 11/11/16 10:17, Kyrill Tkachov wrote: On 10/11/16 23:39, Segher Boessenkool wrote: On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-29 Thread James Greenhalgh
On Mon, Nov 14, 2016 at 02:25:28PM +, Kyrill Tkachov wrote: > > On 11/11/16 15:31, Kyrill Tkachov wrote: > > > >On 11/11/16 10:17, Kyrill Tkachov wrote: > >> > >>On 10/11/16 23:39, Segher Boessenkool wrote: > >>>On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew Pinski wrote: > On Thu, Nov 1

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-22 Thread Kyrill Tkachov
On 18/11/16 12:50, Segher Boessenkool wrote: On Fri, Nov 18, 2016 at 09:29:13AM +, Kyrill Tkachov wrote: So your COMPONENTS_FOR_BB returns both components in a pair whenever one of those is needed? That should work afaics. I mean I still want to have one component per register and since e

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-18 Thread Segher Boessenkool
On Fri, Nov 18, 2016 at 09:29:13AM +, Kyrill Tkachov wrote: > >So your COMPONENTS_FOR_BB returns both components in a pair whenever one > >of those is needed? That should work afaics. > > I mean I still want to have one component per register and since > emit_{prologue,epilogue}_components kn

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-18 Thread Kyrill Tkachov
On 17/11/16 17:45, Segher Boessenkool wrote: On Thu, Nov 17, 2016 at 04:50:46PM +, Kyrill Tkachov wrote: Is loading/storing a pair as cheap as loading/storing a single register? In that case you could shrink-wrap per pair of registers instead. I suppose it can vary by microarchitecture. Fo

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Segher Boessenkool
On Thu, Nov 17, 2016 at 04:50:46PM +, Kyrill Tkachov wrote: > >>Is loading/storing a pair as cheap as loading/storing a single register? > >>In that case you could shrink-wrap per pair of registers instead. > > > >I suppose it can vary by microarchitecture. For the purposes of codegen > >I'd s

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Kyrill Tkachov
On 17/11/16 14:55, Kyrill Tkachov wrote: On 17/11/16 14:44, Segher Boessenkool wrote: Hi Kyrill, On Thu, Nov 17, 2016 at 02:22:08PM +, Kyrill Tkachov wrote: I ran SPEC2006 on a Cortex-A72. Overall scores were neutral but there were some interesting swings. 458.sjeng +1.45% 471.omnetp

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Kyrill Tkachov
On 17/11/16 15:01, Segher Boessenkool wrote: On Thu, Nov 17, 2016 at 02:55:20PM +, Kyrill Tkachov wrote: Overall, there's a slight improvement in SPECINT, even with the gobmk regression and a slightly larger improvement on SPECFP due to povray. And that is for only the "normal" GPRs, not L

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Segher Boessenkool
On Thu, Nov 17, 2016 at 02:55:20PM +, Kyrill Tkachov wrote: > >>Overall, there's a slight improvement in SPECINT, even with the gobmk > >>regression and a slightly larger improvement > >>on SPECFP due to povray. > >And that is for only the "normal" GPRs, not LR or FP yet, right? > > This patch

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Kyrill Tkachov
On 17/11/16 14:44, Segher Boessenkool wrote: Hi Kyrill, On Thu, Nov 17, 2016 at 02:22:08PM +, Kyrill Tkachov wrote: I ran SPEC2006 on a Cortex-A72. Overall scores were neutral but there were some interesting swings. 458.sjeng +1.45% 471.omnetpp +2.19% 445.gobmk -2.01% On SPECFP:

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Segher Boessenkool
Hi Kyrill, On Thu, Nov 17, 2016 at 02:22:08PM +, Kyrill Tkachov wrote: > >>I ran SPEC2006 on a Cortex-A72. Overall scores were neutral but there > >>were > >>some interesting swings. > >>458.sjeng +1.45% > >>471.omnetpp +2.19% > >>445.gobmk -2.01% > >> >

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-17 Thread Kyrill Tkachov
On 14/11/16 14:25, Kyrill Tkachov wrote: On 11/11/16 15:31, Kyrill Tkachov wrote: On 11/11/16 10:17, Kyrill Tkachov wrote: On 10/11/16 23:39, Segher Boessenkool wrote: On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew Pinski wrote: On Thu, Nov 10, 2016 at 6:25 AM, Kyrill Tkachov I ran SPE

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-14 Thread Kyrill Tkachov
On 11/11/16 15:31, Kyrill Tkachov wrote: On 11/11/16 10:17, Kyrill Tkachov wrote: On 10/11/16 23:39, Segher Boessenkool wrote: On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew Pinski wrote: On Thu, Nov 10, 2016 at 6:25 AM, Kyrill Tkachov I ran SPEC2006 on a Cortex-A72. Overall scores were

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-11 Thread Kyrill Tkachov
On 11/11/16 10:17, Kyrill Tkachov wrote: On 10/11/16 23:39, Segher Boessenkool wrote: On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew Pinski wrote: On Thu, Nov 10, 2016 at 6:25 AM, Kyrill Tkachov I ran SPEC2006 on a Cortex-A72. Overall scores were neutral but there were some interesting swi

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-11 Thread Kyrill Tkachov
On 10/11/16 23:39, Segher Boessenkool wrote: On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew Pinski wrote: On Thu, Nov 10, 2016 at 6:25 AM, Kyrill Tkachov I ran SPEC2006 on a Cortex-A72. Overall scores were neutral but there were some interesting swings. 458.sjeng +1.45% 471.omnetpp +2.

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-10 Thread Segher Boessenkool
On Thu, Nov 10, 2016 at 02:42:24PM -0800, Andrew Pinski wrote: > On Thu, Nov 10, 2016 at 6:25 AM, Kyrill Tkachov > > I ran SPEC2006 on a Cortex-A72. Overall scores were neutral but there were > > some interesting swings. > > 458.sjeng +1.45% > > 471.omnetpp +2.19% > > 445.gobmk -2.01% > >

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-10 Thread Andrew Pinski
On Thu, Nov 10, 2016 at 6:25 AM, Kyrill Tkachov wrote: > Hi all, > > This patch implements the new separate shrink-wrapping hooks for aarch64. > In separate shrink wrapping (as I understand it) we consider each register > save/restore as > a 'component' that can be performed independently of the o

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-10 Thread Kyrill Tkachov
On 10/11/16 16:26, Segher Boessenkool wrote: Hi! Hi, Great to see this. Just a few comments... On Thu, Nov 10, 2016 at 02:25:47PM +, Kyrill Tkachov wrote: +/* Implement TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS. */ + +static sbitmap +aarch64_get_separate_components (void) +{ + /* C

Re: [PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-10 Thread Segher Boessenkool
Hi! Great to see this. Just a few comments... On Thu, Nov 10, 2016 at 02:25:47PM +, Kyrill Tkachov wrote: > +/* Implement TARGET_SHRINK_WRAP_GET_SEPARATE_COMPONENTS. */ > + > +static sbitmap > +aarch64_get_separate_components (void) > +{ > + /* Calls to alloca further extend the stack fram

[PATCH][AArch64] Separate shrink wrapping hooks implementation

2016-11-10 Thread Kyrill Tkachov
Hi all, This patch implements the new separate shrink-wrapping hooks for aarch64. In separate shrink wrapping (as I understand it) we consider each register save/restore as a 'component' that can be performed independently of the other save/restores in the prologue/epilogue and can be moved out