EEVblog Electronics Community Forum
Products => Computers => Programming => Topic started by: 0db on September 09, 2020, 01:13:04 am
-
Oil Runtime Compiler
Orc (Oil Runtime Compiler) is a just-in-time compiler implemented as a library and set of associated tools for compiling and executing simple programs that operate on arrays of data. Orc is unlike other general-purpose JIT engines: the Orc bytecode and language is designed so that it can be readily converted into SIMD instructions. This translates to interesting language features and limitations: Orc has built-in capability for SIMD-friendly operations such as shuffling, saturated addition and subtraction, but only works on arrays of data. This makes Orc good for applications such as audio processing, array math, and signal analysis & image processing.
The “code” is currently an intermediate form that is roughly a platform-agnostic assembly language that understands variables and simple arrays. It’s an intermediate form in the sense that it’s currently only stored as a list of structs — there isn’t a parser yet.
The Orc language is an assembly-like language,The Orc tools then convert this into an intermediate form (as C source code) that includes the bytecode, functions for automatically calling the compiled bytecode from C, and backup functions (in C) that are used when Orc is not available or unable to compile the bytecode into efficient SIMD code. Orc generates code optimized for the specific processor that is running, using instruction sets that are available.ORC will include the compiler support for speculative multi-threading
Since Orc creates backup functions, you can optionally use many Orc-using libraries and applications without actually having the Orc library — this is useful for transitioning an application into using Orc. However, when Orc is disabled, the application is unable to use the SIMD code generated by Orc.
Additional opcode sets can be created and registered in a manner similar to how the liborc-float and liborc-pixel libraries. In order to make full use of new opcode sets, one must also define rules for translating these opcodes into target code. The example libraries do this by registering rule sets for various targets (mainly SSE) for their opcode sets. Orc provides low-level API for generating target code. Not all possible target instructions can be generated with the target API, so developers may need to modify and add functions to the main Orc library as necessary to generate target code.
I am compiling Firefox and I have just found this interesting compiler as dependency :D
Unfortunately I cannot find examples of real applications.
-
I hadn't heard of it either. Looks interesting (sort-of-functional language), very highly abstracted, so it is rather interesting in that it can compile to SIMD machine code.
Here (orc.csres.utexas.edu) (http://orc.csres.utexas.edu/) is the Orc language main page for those interested.
-
Here (orc.csres.utexas.edu) (http://orc.csres.utexas.edu/) is the Orc language main page for those interested.
That is a different orc. The oil runtime compiler, and related liboil, can be found at https://github.com/GStreamer/orc
-
Here (orc.csres.utexas.edu) (http://orc.csres.utexas.edu/) is the Orc language main page for those interested.
That is a different orc. The oil runtime compiler, and related liboil, can be found at https://github.com/GStreamer/orc (https://github.com/GStreamer/orc)
What the fuck?
(You're absolutely right, coppice; thanks for the correction.)
Eww. One more reason to stay away from GStreamer folks. (One more group of developers who are completely unable to understand modularity, and instead insist on reinventing their own wheel and keeping everything inside their own framework.)