Recently in Grants Category

It has been a while since the last grant report. However, Timo has made good progress. Read more about snapshot summary updates and new frontend graphs at: Progressing with progress.

While a number of intended deliverables for Bart's grant remain unmet, he's made significant contributions to the expression backend and has identified unexpected roadblocks to the remaining tasks (as outlined in previous reports) that should yield to additional preparatory work.

In light of this, the Grants Committee will be considering Bart's report below and voting on a payment for the currently accomplished work of 50% of the original amount requested. The Grants Committee will consider a revised proposal for the remainder of the work via the usual proposal process.

Comments are welcome, as always.

MAJ

Report for grant project _MoarVM JIT Compiler Expression Backend Maturation_

Bart Wiegmans, September 12, 2019

This is an intermediate report after the first major deliverable of the grant project has been merged and released to the perl community.

This project aims to improve and mature the new 'expression' JIT backend for MoarVM by the following deliverables:

  • Floating point support in the expression JIT backend.

  • Code quality improvements (optimizations) based on expression-tree rewriting optimizer, specifically:

    • Completing the work on the jit-expr-optimizer branch, including several common optimizations.

    • Implement optimizations in the register allocator.

  • Replaced specialized code in the legacy JIT with portable expression tree structures, specifically:

    • Invocation of subroutines

    • Optimization guards

    • NativeCall invocations

  • Improved handling of irregular instructions by the register allocator.

The first of those deliverables, floating point support, has been merged into the MoarVM main tree. I learned that this was a considerable larger challenge than initially anticipated. Aside from the necessary DynASM changes, changes were needed in:

  • The expression template precompiler (specifically a type system)

  • The register allocator (this was expected), including an improved register representation

  • Compilation of boolean operators (floating point comparisons set a different set of CPU flags than do integer comparisons, to handle NaN correctly)

Along with floating point support, improvements to register allocation algorithm have also been merged and released. I've researched in using a somewhat different algorithm (reverse linear scan allocation) but have deprioritized it. This is an interesting algorithm that I expect to do better than the current 'regular' linear scan algorithm in many cases, but unlike the current algorithm it isn't fully general. Handling irregular register requirements has been put on hold until I make a final decision.

Merging floating point supports has unblocked progress on subroutine and nativecall invocations. The limiting factor currently is that I don't have a good testcase for the nativecall case.

The implementation of (de)optimization guards in the expression JIT is currently in progress and nearing completion.

The expression optimization work has stumbled on a roadblock described in one of my earlier reports - the current IR does not reify the order of operations, which is instead handled in a later phase (during instruction selection). This means that it is nearly impossible to safely implement optimizations since an optimization may accidentally move the write of a value after a read of it. The good news is that removing that roadblock should also enable the expression JIT to operate on larger segments of a method.

In summary, I've currently finished:

  • Floating point support

  • Register allocator improvements

Currently in progress:

  • Subroutine and NativeCall invocations

  • Deoptimization guards

Unblocked but not yet started:

  • Handling irregular instructions

Currently blocked:

  • Expression optimizer

The Grants Committee is accepting grant proposals all the time. We evaluate them every two months and another round is here!

Update for Revitalize blogs.perl.org

We've had several changes in the GC staffing since this grant began; I'm taking over as the Grant Manager.

Grant Proposals Jul/Aug 2019

1 Comment

The Grants Committee has received no grant proposals for the July/August 2019 round.

The community may submit proposals at any time, and the Committee will review them every two months. The next round will start in September 2019.

Bart gave me this interim report on his JIT compiler expression backend grant:

  • [Floating point support] is essentially complete. Bart is currently finishing floating point support in conditional expressions. This is surprisingly nontrivial, he indicates, because of NaN, and because of condition code differences between floating point and integer comparisons.

  • [Improved handling of irregular instructions] is nearing completion. Bart says it turned out to have a whole lot of overlap with the floating point support. He is currently reevaluating his initial strategy (refactoring the support for C calls which already has the ability to move values in registers as needed)

  • Bart continues to work on an internal refactor of the intermediate representation (IR) structure, prior to completing optimization work, since, he says, "the current tree form makes rewriting modification really cheap, and I'd like to preserve that property even as I add a strict order of evaluation."

  • He is also pursuing development of a consistent testing system for this work.

MAJ

TPF Grants Committee: Nadim Khemir

No Comments

I am pleased to announce that the TPF Grants Committee has a new volunteer Grant Manager, Nadim ibn Hamouda ibn Othman El Khemir.

About TPF

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

About this Archive

This page is an archive of recent entries in the Grants category.

Conferences is the previous category.

GSoC is the next category.

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