[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Register VM WIP
From: |
David Kastrup |
Subject: |
Re: Register VM WIP |
Date: |
Wed, 16 May 2012 16:00:37 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Mark H Weaver <address@hidden> writes:
> I certainly agree that we should have a generous number of registers,
> but I suspect that the sweet spot for a VM is 256, because it enables
> more compact dispatching code in the VM, and yet is more than enough to
> allow a decent register allocator to generate good code.
>
> That's my educated guess anyway. Feel free to prove me wrong :)
The counterproof will usually be done by benchmarking, and will even
differ between different processors sharing the same instruction set.
I see two ways out:
a) pick the register size individually for each function, as small as
possible without spillage. Which makes the whole indistinguishable from
a stack-based VM.
b) don't generate the final bytecode until the code is actually being run.
That means that _if_ code is precompiled, it will be precompiled into
either stack-based VM or some other representation better suited to
compile into code for a certain amount of registers. Of course, the
threshold to picking actual registers of the available processor and
compiling native code is then not all too large.
--
David Kastrup
- Register VM WIP, Andy Wingo, 2012/05/11
- Re: Register VM WIP, Stefan Israelsson Tampe, 2012/05/11
- Re: Register VM WIP, Ludovic Courtès, 2012/05/14
- Re: Register VM WIP, Andrew Gwozdziewycz, 2012/05/14
- Re: Register VM WIP, Andy Wingo, 2012/05/15
- Re: Register VM WIP, Noah Lavine, 2012/05/15
- Re: Register VM WIP, Mark H Weaver, 2012/05/16
- Re: Register VM WIP, Andy Wingo, 2012/05/16
- Re: Register VM WIP, Mark H Weaver, 2012/05/16
- Re: Register VM WIP,
David Kastrup <=
- Re: Register VM WIP, Noah Lavine, 2012/05/16
- Re: Register VM WIP, Andy Wingo, 2012/05/16
- Re: Register VM WIP, Ludovic Courtès, 2012/05/16
- Re: Register VM WIP, Andy Wingo, 2012/05/16
- Re: Register VM WIP, Mark H Weaver, 2012/05/16
- Re: Register VM WIP, Andy Wingo, 2012/05/16
- Re: Register VM WIP, Noah Lavine, 2012/05/16
- Re: Register VM WIP, Andy Wingo, 2012/05/16
Re: Register VM WIP, Andy Wingo, 2012/05/15