RE: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-25 Thread Wilco Dijkstra
> Richard Henderson wrote: > On 08/12/2015 08:59 AM, Wilco Dijkstra wrote: > > I looked at the statistics of AArch64 immediate generation a while ago. > > The interesting thing is ~95% of calls are queries, and the same query is on > > average repeated 10 times in a row. So (a) it is not important

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-13 Thread David Edelsohn
On Wed, Aug 12, 2015 at 11:10 PM, Segher Boessenkool wrote: > On Wed, Aug 12, 2015 at 03:31:48AM -0500, Segher Boessenkool wrote: >> > * This is the only platform for which I bothered collecting any sort >> > of performance data: >> > >> > As best I can tell, there is a 9% improvement in

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Segher Boessenkool
On Wed, Aug 12, 2015 at 04:59:27PM +0100, Wilco Dijkstra wrote: > However it also creates new dependencies that may not be desirable > (such as hash table size, algorithm used etc). > > > Some notes about ppc64 in particular: > > > > * Constants aren't split until quite late, preventing all hop

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Segher Boessenkool
On Wed, Aug 12, 2015 at 03:31:48AM -0500, Segher Boessenkool wrote: > > * This is the only platform for which I bothered collecting any sort > > of performance data: > > > > As best I can tell, there is a 9% improvement in bootstrap speed > > for ppc64. That is, 10 minutes off the o

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Segher Boessenkool
On Wed, Aug 12, 2015 at 08:32:46AM -0700, Richard Henderson wrote: > On 08/12/2015 01:31 AM, Segher Boessenkool wrote: > > Is there something that makes the cache not get too big? Do we > > care, anyway? > > No, nothing ever reduces the size of the cache. I doubt we care, but I > haven't > inst

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Richard Henderson
On 08/12/2015 08:59 AM, Wilco Dijkstra wrote: > I looked at the statistics of AArch64 immediate generation a while ago. > The interesting thing is ~95% of calls are queries, and the same query is on > average repeated 10 times in a row. So (a) it is not important to cache the > expansions, and (

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Wilco Dijkstra
Richard Henderson wrote: > However, the way that aarch64 and alpha have done it hasn't > been ideal, in that there's a fairly costly search that must > be done every time. I've thought before about changing this > so that we would be able to cache results, akin to how we do > it in expmed.c for mu

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Richard Henderson
On 08/12/2015 01:32 AM, Richard Earnshaw wrote: > How do we clear the cache, and when? For example, on ARM, switching > between ARM and Thumb state means we need to generate potentially > radically different sequences? We can do such splitting at function > boundaries now. At present I never cle

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Richard Henderson
On 08/12/2015 01:31 AM, Segher Boessenkool wrote: > Is there something that makes the cache not get too big? Do we > care, anyway? No, nothing ever reduces the size of the cache. I doubt we care, but I haven't instrumented to see how big it grows. My intuition says the most important thing abou

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Richard Earnshaw
On 12/08/15 09:43, Richard Earnshaw wrote: > On 12/08/15 09:32, Richard Earnshaw wrote: >> On 12/08/15 02:11, Richard Henderson wrote: >>> I'm somewhat surprised that the operands to the logicals aren't >>> visible at rtl generation time, given all the work done in gimple. >>> And faili

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Richard Earnshaw
On 12/08/15 09:32, Richard Earnshaw wrote: > On 12/08/15 02:11, Richard Henderson wrote: >> Something last week had me looking at ppc64 code generation, >> and some of what I saw was fairly bad. Fixing it wasn't going >> to be easy, due to the fact that the logic for generating >> constants wasn't

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Richard Earnshaw
On 12/08/15 02:11, Richard Henderson wrote: > Something last week had me looking at ppc64 code generation, > and some of what I saw was fairly bad. Fixing it wasn't going > to be easy, due to the fact that the logic for generating > constants wasn't contained within a single function. > > Better

Re: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-12 Thread Segher Boessenkool
Hi! This looks really nice. I'll try it out soon :-) Some comments now... On Tue, Aug 11, 2015 at 06:11:29PM -0700, Richard Henderson wrote: > However, the way that aarch64 and alpha have done it hasn't > been ideal, in that there's a fairly costly search that must > be done every time. I've

[PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation

2015-08-11 Thread Richard Henderson
Something last week had me looking at ppc64 code generation, and some of what I saw was fairly bad. Fixing it wasn't going to be easy, due to the fact that the logic for generating constants wasn't contained within a single function. Better is the way that aarch64 and alpha have done it in the pa