qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on


From: Aurelien Jarno
Subject: Re: [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on startup
Date: Fri, 10 Apr 2009 17:31:26 +0200
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Paul Brook a écrit :
> On Friday 10 April 2009, Aurelien Jarno wrote:
>> On Fri, Apr 10, 2009 at 03:44:55PM +0100, Paul Brook wrote:
>>> On Friday 10 April 2009, Aurelien Jarno wrote:
>>>> +    assert(size != TCG_MAX_TEMPS * sizeof(tcg_target_long));
>>> Shouldn't this be >= ?
>> When I wrote that, I thought that the two sizes have to match, 
> 
> In that case I think the assert is completely wrong. You're asserting that 
> the 
> two values are not equal. IIRC there's bits in the TCG headers that disable 
> asserts by default - I've been bitten by this before.

Correct.

>> but you are right, the frame size can actually be bigger.
>> Any other comment?
> 
> What were you benchmarking? Translation speed or execution speed?
> I'd guess that your new code speeds up the translator, but makes the 
> resulting 
> code less cache friendly.

Execution speed, that is compilation of a small software in
qemu-system-mips64. I haven't try to do find which parts of QEMU goes
faster, but I agree with your hypothesis.

> Maybe if I see your subsequent optimization it might make more sense, though 
> I'm suspicious of tcg-target doing register allocation/spilling itself.

I am trying to fix the following comment from Fabrice (tcg.c)

/* XXX: for load/store we could do that only for the slow path
   (i.e. when a memory callback is called) */

The idea is not to do register allocation/spilling in tcg-target.c, but
to save registers containing TCG globals to memory in the slow path only
and without touching the TCGTemp structure. That's why it has to be done
in tcg-target.c

I currenty only have an hackish patch that does not fully work. I guess
the best is to resent the current patch along with the slow path
optimization one when it works.

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




reply via email to

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