Skip to content
Orc - Optimized Inner Loop Runtime Compiler
Branch: master
Clone or download
Xavier Claessens and tp-m Meson: Do not always generate static library
Since Meson 0.46.0 'default_library' can be set to 'both' when user
wants both shared and static libraries.
Latest commit ae14127 Apr 12, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc gtk-doc: get rid of templates Apr 25, 2018
examples meson: add option to disable orc-test library Oct 6, 2018
m4 Add support for ppc64le Jan 28, 2019
orc-test Add pkg-config file for orc-test library Mar 5, 2019
orc Meson: Do not always generate static library Apr 18, 2019
testsuite meson: add options to disable benchmarks, examples, tools Oct 3, 2018
tools meson: Make orcc detectable from other subprojects Jan 30, 2019
.gitignore doc: update from entropywave locations to gstreamer Oct 20, 2015
.gitlab-ci.yml ci: add minimal ci Jan 2, 2019
COPYING remove bits about motovec code in liboil Jul 2, 2009 Add pkg-config file for orc-test library Mar 5, 2019
README doc: update from entropywave locations to gstreamer Oct 20, 2015
RELEASE Release 0.4.29 Apr 14, 2019
ROADMAP Add roadmap Jul 5, 2008
TODO update release docs Jul 13, 2010 autogen: Honor NOCONFIGURE=1 Jun 23, 2014 Back to development Apr 15, 2019
gtk-doc.make gtk-doc: get rid of templates Apr 25, 2018 Back to development Apr 15, 2019
meson_options.txt meson: add option to disable orc-test library Oct 6, 2018 Add pkg-config file for orc-test library Mar 5, 2019 pkgconfig: add orc-test path to the -uninstalled .pc file Aug 25, 2016
orc.m4 Add orc.m4 Oct 3, 2011 Link to pthreads library Aug 18, 2012


ORC - The Oil Runtime Compiler

(and OIL stands for Optimized Inner Loops)

Orc is the sucessor to Liboil - The Library of Optimized Inner Loops.

Orc is a library and set of tools for compiling and executing
very simple programs that operate on arrays of data.  The "language"
is a generic assembly language that represents many of the features
available in SIMD architectures, including saturated addition and
subtraction, and many arithmetic operations.

At this point, developers interested in using Orc should look at the
examples and try out a few Orc programs in an experimental branch
of their own projects.  And provide feedback on how it works.  There
will likely be some major changes in ease of use from a developer's
perspective over the next few releases.

The 0.4 series of Orc releases will be API and ABI compatible, and
will be incompatible with the 0.5 series when it comes out.


 - Users can create, compile, and run simple programs that use the
   vector extensions of the CPU, all directly from an application.

 - Users can compile Orc programs to assembly source code to be
   compiled and used without linking against the Orc library.

 - The generic assembly language can be extended by an application
   by adding new opcodes.

 - An application can add rules for converting existing or new opcodes
   to binary code for a specific target.

 - Current targets: SSE, MMX, MIPS, Altivec, NEON, and TI C64x+.
   (The c64x target only produces source code.)

 - Programs can optionally be emulated, which is useful for testing, or
   if no rules are available to convert Orc opcodes to executable code.

More information:

  Web           :
  Download      :
  Documentation :

Questions and Answers:

 - Q: Why not let gcc vectorize my code?

   A: Two reasons: first, since Orc's assembly language is much more
   restrictive than C, Orc can generate better code than gcc, and
   second, Orc can generate code for functions you define at runtime.
   Many algorithms require gluing together several stages of operations,
   and if each stage has several options, the total amount of code to
   cover all combinations could be inconveniently large.

 - Q: Why not use compiler intrinsics for SIMD code?

   A: Compiler intrinsics only work for one target, and need to be
   hand written.  Plus, some compilers are very picky about source
   code that uses intrinsics, and will silently produce slow code.
   And, of course, you can't compile intrinsics at runtime.

 - Q: How big is the Orc library?

   A: For embedded users, the --enable-backend configure option can
   be used to disable irrelvant targets.  Compiled with only one target
   (SSE), the library size is about 150 kB uncompressed, or 48 kB
   compressed.  The goal was to keep the uncompressed size under
   about 100 kB (but that failed!).  A typical build with all targets
   and the full ABI is around 350 kB.

Caveats (Known Bugs):

 - ?

Future directions (Possibly outdated):

 - Addition of more complex loop control and array structures.

 - Addition of an option to compile the Orc library with only the
   runtime features for a single target, e.g., for embedded systems.
 - Addition of rewrite rules, which convert an instruction that cannot
   be converted to binary code into a series of instructions that can.
   This is necessary since assembly instructions on most targets do
   not cover all the features of the Orc assembly language.
You can’t perform that action at this time.