develooper Front page | perl.perl6.internals | Postings from October 2002

Re: Of mops and microops

Thread Previous | Thread Next
Dan Sugalski
October 28, 2002 13:31
Re: Of mops and microops
Message ID:
At 7:09 PM +0100 10/27/02, Leopold Toetsch wrote:
>So the I-register access is substituted by access to 3 global integers.
>Now, how would these globals be loaded? When are these »arg« OPs inserted?
>Currently the register optimizer in jit.c does something very
>similar: Setting up register access for the most used parrot
>registers in one execution block + load and store add block

This is definitely a Clever Thing, and one I've pondered on and off.
It will definitely speed up some things, as there's less bytecode to
chew through, there's more of a chance for optimization by the C
compiler when parrot's being built, and generally more opportunity to

I'm currently leaning against it only because it doesn't ultimately
help the JIT. What we have now is wildly cool and damn useful (and
has anyone heard from Daniel lately, BTW?) but there's room for more

Specifically, since the interpreter struct address is fixed, the
bytecode is fixed at JIT time, and the JIT is allowed to make
interpreter-private JITted versions of bytecode, it means that the
JIT already has license to take things a step beyond what you're
looking for--since the registers are at a fixed address and the
bytecode is fixed, the JIT can produce a stream of executable code
that directly addresses data, which is what the micro-ops are meant
to do.

Now, on the other hand it *does* speed up the interpreter, so it's
definitely not an idea to discard. But if we're going to (and I'd
still like to hold off) I think we're better off with a few special
versions of ops that target one or twi registers directly, perhaps
register 0 and 1, rather than have a separate set of special-purpose

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai                         have teddy bears and even
                                       teddy bears get drunk

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About