LLVM-based compiler for R code (experimental)
Latest commit 837790a Jul 27, 2016 @duncantl checking the Rffi invocation mechanism works. Really belongs in Rllvm…
… but this is slightly different
Failed to load latest commit information.
Notes updates for some documentation/notes Jul 10, 2014
Paper remove browser calls Jun 29, 2013
docs/Paper updates to getBuiltInRoutines, etc. Jun 21, 2014
examples extra files Jun 15, 2014
explorations ... Jul 26, 2016
inst/examples rename example fun. Feb 16, 2015
man update docs Feb 19, 2015
src generate warnings or errors via the va_raiseStructureError and for th… Jul 6, 2014
tests checking the Rffi invocation mechanism works. Really belongs in Rllvm… Jul 27, 2016
.gitignore added some support for SEXP type, making a vectorized function Apr 29, 2013
Changes.xml added r namespace Jul 11, 2014
CompileExamples about to change getType here to use Rllvm's getType or change its name Apr 15, 2013
DESCRIPTION add function to create compiler and allow the caller of compileFuncti… Sep 4, 2015
LICENSE extra files Jun 15, 2014
NAMESPACE export functions for creating 2D Type descriptions Jul 26, 2016
Python type inference in Todo Apr 15, 2013
README.md updates for some documentation/notes Jul 10, 2014
Todo.xml updates Jul 27, 2016
convolve.c working on structs and R functions as function pointers May 3, 2013
convolveCTest.R working on structs and R functions as function pointers May 3, 2013
guessType.R file not used yet Aug 13, 2012
load.R Added basic subset handling; fixed issue with getting types of StoreI… Feb 28, 2011
test.R fixed the conflicts. For now removed the unary handling in compile.de… Feb 12, 2011
testLoopIfs.R support for .integerLiterals Jul 11, 2014
vectorize.R vectorizing fns Apr 28, 2013
vince_test.R Added return type checking, which adds final cast instruction when ne… Feb 27, 2011
walk.R About to pull from Vince after a long while Mar 16, 2011



RLLVMCompile is an experimental R compiler that uses LLVM through RLLVM, currently being developed by Duncan Temple Lang.


The goal of this is to provide an R programmer-level framework for compiling R-like code. This is different from building a compiler that requires changing the code for the interpreter or developing an different implementation of R, i.e. separate from GNU R. The idea is that we can translate R-like code to LLVM instructions, create those instructions using the Rllvm package and then generate native/compiled code and invoke it from the R session, serialize it for use in other sessions or even applications (e.g. JavaScript, Python).

We might compile the same code in different ways for different contexts. As a result, a single one-size-fits-all approach to compiling R is probably too restrictive. Furthermore, we want to be able to explore new approaches easily w/o having to recompile all of R or learn a new compilation framework tha is specific to R.

One of the strengths of LLVM is that it embeddable and extensible and provides a user-level API. A compiler for R should also do the same. We have learned that a centralized code source that requires a core group to make all "official" and "distributed" changes limits innovation (but does improve stability).


Vince Buffalo and I started this package several years ago (late 2010) after the development of the Rllvm package. Unfortunately, I had other committments (the book XML and Web Technologies with R, and another "Data Science in R: A Case Studies Approach to Computational Reasoning and Problem Solving"). I am now getting back to this project and hope to push it forward quite a bit by early 2015.