Grant Report - MoarVM JIT Compiler Expression Backend - May 2019

No Comments

Bart reports the latest progress:

  • Fixed a few windows-specific bugs (the ABI that we have to compile to is different between Windows and POSIX)
  • Assigned a permissible-register set to live ranges, which makes it possible to combine values with distinct register requirements (relevant for generalized register requirements)
  • Ensured that when a value is spilled to make place for another, the released register is actually one that the new value can use.

In other words, a bunch of register allocator work. Floating point support is close to being finished.

He adds that he plans to render the expression Intermediate Representation tree in a linear format:

Aside from that, I've been planning my next move - which I intend to be a refactor to transform the 'expression' IR tree into a linear format. This has the following advantages:

  • The (relative) order of instructions in code is reified - that makes it possible to write a transform that changes this order.
  • And it also makes it possible to assert that we don't write an invalid order (this was the problem I reported on a few months back)
  • It becomes easier to write fragments that span multiple basic blocks. This should improve code generation (can keep values live longer).
  • The 'linearizing' conversion can be done in Perl, which is altogether easier to work with.

Most parts of the existing JIT are, fortunately, barely affected by this change. The main advantage of the current structure is that it is fairly trivial to manipulate. I'm still investigating how best to implement the linear IR so that manipulation remains easy and cheap. (Unfortunately, using a pointer-and-structure based system is fairly expensive because a single MoarVM opcode expands to a multitude of expression operators).

MAJ

Leave a comment

About TPF

The Perl Foundation - supporting the Perl community since 2000. Find out more at www.perlfoundation.org.

About this Entry

This page contains a single entry by Mark A Jensen published on June 7, 2019 1:59 AM.

Maintaining the Perl 5 Core (Dave Mitchell): Grant Report for May 2019 was the previous entry in this blog.

Maintaining Perl 5 (Tony Cook): April 2019 Grant Report is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID
Powered by Movable Type 6.2.2