This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation
- From: "Wilco Dijkstra" <wdijkstr at arm dot com>
- To: "'Richard Henderson'" <rth at redhat dot com>
- Cc: "'GCC Patches'" <gcc-patches at gcc dot gnu dot org>, "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>, "Marcus Shawcroft" <Marcus dot Shawcroft at arm dot com>, <dje dot gcc at gmail dot com>
- Date: Tue, 25 Aug 2015 15:19:27 +0100
- Subject: RE: [PATCH ppc64,aarch64,alpha 00/15] Improve backend constant generation
- Authentication-results: sourceware.org; auth=none
- References: <A610E03AD50BFC4D95529A36D37FA55E7B006D6780 at GEORGE dot Emea dot Arm dot com> <005301d0d517$ddd8a030$9989e090$ at com> <55CB6F9A dot 30207 at redhat dot com>
> 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 to cache the
> > expansions, and (b) the high repetition rate means a single-entry cache
> > has a 90% hitrate. We already have a patch for this and could collect stats
> > comparing the approaches. If a single-entry cache can provide a similar
> > benefit as caching all immediates then my preference would be to keep things
> > simple and just cache the last query.
>
> Interesting. That's already more detailed investigation than I'd done. I had
> no idea the queries were so clustered. I assumed that the queries would be
> scattered across various passes, and so the various constants across the
> function would get checked in sequence.
>
> I would be very interested in seeing those stats when you've done.
Caching improves average buildtime by 0.1-0.2% - your patch seems to be slightly
faster than caching just 1 query, so that suggests caching a few entries would be
beneficial.
However looking at the immediates that are generated by the loops, it's feasible
to avoid linear/quadratic search loops altogether. So I think a generic immediate
caching scheme won't be useful for AArch64.
Wilco