This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH GCC][6/6]Avoid aggressive predcom for high register pressure cases


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]