Skip to content

Releases: vnmakarov/mir

MIR version 1.0.0

27 May 12:25
Compare
Choose a tag to compare

I am glad to announce the release of MIR version 1.0.0.

This release is based on the bbv branch, which has been in use by
some people for some time. Branch bbv became master. The
previous branch master became v0_master.

Here are the major changes compared to the previous
version, 0.2.0:

  • Major rewriting of the optimization pipeline of the MIR-generator:
    • This results in better-generated code, which yields a 14% average performance improvement and
      a 16% geometric mean improvement on a set of benchmarks found in the c-benchmarks directory.
  • Introduction of experimental support for lazy basic block versioning, which can be utilized
    to implement a better JIT for dynamic programming languages:
    • Machine code for basic blocks can now be generated lazily upon their first execution.
    • Lazy basic block generation assumes lazy generation of functions.
  • New features on the MIR and C level:
    • MIR instructions to take and use address of MIR variables to simplify code generation of MIR code
    • MIR and C variables bound to machine registers.
    • Implementation of a new C builtin __builtin_expect
    • MIR instructions and corresponding builtins in C related to integer overflow.
    • Indirect jumps in MIR and labels as values in C.
    • MIR instructions and corresponding builtins in C to implement call ABI based on jumps.
    • Properties for basic block versioning.
  • Removed features:
    • The PPC64BE target has been removed as the last big-endian CPU (power7) became too old.
      MIR now supports only PPC64LE (little-endian).
    • Parallel generation of functions has been removed as it does not integrate well with lazy function
      and bbv code generation. Lazy function generation and lazy basic block generation work
      at practically the same speed.
      • Users can implement parallel generation using different contexts if desired.
      • This also means that the MIR-generator API has changed slightly,
        hence the change in the MIR API version was upgraded from 0 to 1.
      • The c2m driver still supports parallel parsing of different C files.

MIR version 0.1.2 released

13 Jan 13:49
Compare
Choose a tag to compare

New version (0.1.2) of MIR has been released

Major changes from v0.1.1 to v0.1.2:

  • Numerous bugs were fixed
  • Shared library is now built and installed beside the static library
  • MIR was ported to musl-based Linux systems, e.g. alpine Linux
  • Generator was improved
    • Register allocator was significantly sped up
    • Alloca code generation was improved (alloca insn consolidation)
  • No red zone x86_64 ABI is now supported
  • Generator debug info were enhanced and improved
  • Documentation in Chinese was added

MIR version v0.1.1

20 Dec 17:27
Compare
Choose a tag to compare

This release fixes problems and bugs found so far in v0.1.0 release.

The first release of MIR project

12 Aug 15:42
Compare
Choose a tag to compare

Hello, everyone. I'd like to announce the very first release of MIR code.

MIR is the light-weight JIT compiler with very fast start up time. It can generate code for the following platforms:

  • x86-64 Linux
  • x86-64 MacOS
  • aarch64 Linux
  • aarch64 (M1) MacOS
  • ppc64 big endian Linux
  • ppc64 little endian Linux
  • s390x Linux
  • RISCV Linux. Minimal requirement is I64 (64-bit integer support), M (integer multiplication and division), F and D (single and double precision IEEE FP numbers)

x86-64 Windows is not officially supported yet although some people already successfully use MIR on this platform.

You can generate machine code in memory from Medium Internal Representation or/and C code.

The JIT compiler is designed to work in multi-threaded environment and can generate machine code for different MIR functions and/or C files in parallel.

The generated code should work with code generated by other compilers (e.g. GCC/Clang) as a lot of efforts were spent to achieve target C ABI compatibility (argument passing, memory layout, etc).

The part of release is a standalone C11 compiler/interpreter c2m. It permits to use C as a scripting language.

The more details about the release can be found on https://github.com/vnmakarov/mir/tree/v_0_1

I would like to thank numerous people who are interested in the project, provided invaluable feedback and pull requests, tried the code before any release, and were patient in waiting the promised release.

The project work will continue. The future development directions are

  • improvement in generated code and compilation speed
  • support of speculation/deoptimization on MIR and C code level which is important for JITs of dynamic programming languages
  • more platforms support
  • more interoperability with other compiler IRs