Replica’s approach is to build around an existing C compiler with a help of

  • a source to source compiler for high level language features

  • convey platform specific metadata passing through the commercial quality back-end

  • platform and configuration specific machine code translator for the Replica architecture

  • virtual instruction-level parallelism (VILP) optimization to optimize execution of low-level parallelism even though there seems not to exist one

The compilation process is depicted in Figure 1. The implementation uses ANTLRv3 & Scala, LLVM, and a custom VILP optimizer as these technologies, respectively.

The Replica language is first compiled into a baseline language, which is ordinary C enriched with parallel programming primitives in the form of macros and annotations for storage specifiers. Although Replica is not fully compatible with C, the compatibility can be achieved at link time by mixing the baseline language version of the application with ordinary C code. Inline assembler can also be mixed in this phase.


Fig. 1. The Replica compilation tool chain.