This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC][6/6]Avoid aggressive predcom for high register pressure cases
- From: Jeff Law <law at redhat dot com>
- To: Bin Cheng <Bin dot Cheng at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: nd <nd at arm dot com>
- Date: Tue, 27 Jun 2017 11:48:04 -0600
- Subject: Re: [PATCH GCC][6/6]Avoid aggressive predcom for high register pressure cases
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=law at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com C2566C04D292
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C2566C04D292
- References: <VI1PR0802MB21768DFC345A827D62447F9BE7E20@VI1PR0802MB2176.eurprd08.prod.outlook.com>
On 05/12/2017 05:28 AM, Bin Cheng wrote:
> Hi,
> Aggressive precom could result in larger number loop carried variables, causes high
> register pressure and spilling. One example is the hot loop of 436.cactusADM, in
> which >25 loop carried variables are introduced for the vectorized version loop,
> depending on the vector factor. This patch computes loop register pressure on tree
> ssa using previously introduced interface. It uses the information to prune chains
> with simple heuristic. For example, combined and zero-length chains are always
> allowed; other chains are allowed under register cost; and loop unrolling is forced
> off if register pressure is high. With this patch, the benchmark can be obvious
> improved on AArch64.
>
> Bootstrap and test on x86_64 and AArch64, is it OK?
>
> Thanks,
> bin
> 2017-05-10 Bin Cheng <bin.cheng@arm.com>
>
> * tree-predcom.c (stor-layout.h, tree-ssa-regpressure.h): New header
> files.
> (prune_chains): New function.
> (tree_predictive_commoning_loop): Call compute_loop_reg_pressure to
> compute reg pressure. Prune chains based on reg pressure. Force
> to not unroll if reg pressure is high.
>
SO obviously this will be dependent on the whole set of earlier patches
and may need some tweaking if those change. The most concerning part is
exposing register classes to this code. If we could avoid that it would
be good.
BUt I'm on board with the idea of using an estimated register pressure
to tune this stuff a bit.
jeff