Power up the OrcJIT
authorLuke Lau <luke_lau@icloud.com>
Sun, 2 Jun 2019 18:25:26 +0000 (19:25 +0100)
committerLuke Lau <luke_lau@icloud.com>
Mon, 3 Jun 2019 23:15:37 +0000 (00:15 +0100)
commit61265b69ce5b6ec9ed6889fce8f7bbe32bb31973
tree578065800dec1befa71ba8fba609d26b72726f35
parentb380cc6f6b84c17af96be39f42b879f86f41c468
Power up the OrcJIT

We're going to be derivating from the Kaleidoscope tutorial, by using
the newer OrcJIT framework rather than MCJIT.
OrcJIT allows for lazy, On Request Compliation, and is built up of
different layers for linking, compiling, etc.

We start it off by creating a new execution session which will hold all
of our layers, followed by a symbol resolver which we won't need (yet).
We then create the linking and compilation layers, and then a ModuleKey:
something that llvm-hs uses to keep track of modules across each
invocation of withModule.

There's a lot of things to keep track of so I've added a small data type
to hold them all.
Main.hs