qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH v0 0/8] Improve register allocator


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [RFC][PATCH v0 0/8] Improve register allocator
Date: Mon, 23 May 2011 23:22:41 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, May 23, 2011 at 06:40:46PM +0400, Kirill Batuzov wrote:
> This series improves register allocator by keeping track of temp's and
> register's live ranges, doing better spill choice and spilling early unneeded
> globals.
> 
> The patches do need testing and performance evaluation before they will be
> ready for final review.  I decided to preliminary post them because it seems
> other people are working on the same thing and I'd like to avoid unnecessary
> work duplication if possible.

Thanks for this patch series. Your approach to solve this issue is
really different than mine. Instead I added more state to the dead/live
states, and use them to mark some input deads even for global, and mark
some output arguments to be synced. This informations are then used
directly in the tcg_reg_alloc_* functions to make better usage of the
available registers. On the other hand my patch series only tries to
really lower the number of spills and doesn't try to make better spill
choices.

I guess it would be a good idea that I continue with this approach (I
basically just have to fix a few cases were some regs are wrongly copied
back to memory), so that we can more easily compare the two approaches.
Your last patch is anyway interesting, having some statistics is always
something interesting.

In any case I really think we need a better register allocator before we
can do any serious optimization passes like constant or copy propagation,
otherwise we end up with a lot of register in use for no real reason.

> Kirill Batuzov (8):
>   Compute additional liveness information for register allocator.
>   Propagate REG_NEXT_USE value through process of register allocation.
>   Do better spill choice.
>   Calculate NEXT_CALL liveness information.
>   Track call-clobbered uses of registers
>   Spill globals early if their next use is in call.
>   Spill globals early if their next use is at the BB end.
>   Add spill count profiling.
> 
>  tcg/tcg.c |  245 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>  tcg/tcg.h |   12 +++
>  2 files changed, 248 insertions(+), 9 deletions(-)
> 
> -- 
> 1.7.4.1
> 
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]