[llvm-dev] Simplistic Backend

Christian Reitwiessner via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 17 04:59:08 PST 2016


I'm working on a project that aims to do very cheap verification of
generic computations on blockchains (specifically Ethereum).
For that, I would like to compile complex code (think of hash functions
or key derivation functions) into a very simplistic architecture for
which it is trivial to write an interpreter.
An architecture like TinyRAM [1] would be ideal, i.e. it has the usual
arithmetic and logical operations on registers, conditional jumps and
memory read- and write access only via specific instructions (although
this is not too important).
Is there an llvm backend that comes close to that? If not, how hard is
it to implement such a backend?
Oh and by the way, brainfuck might also be a suitable architecture :-)


[1]: http://www.scipr-lab.org/doc/TinyRAM-spec-0.991.pdf

More information about the llvm-dev mailing list