From: Luke Lau Date: Sun, 2 Jun 2019 18:25:26 +0000 (+0100) Subject: Power up the OrcJIT X-Git-Url: https://git.lukelau.me/?p=kaleidoscope-hs.git;a=commitdiff_plain;h=2fd7e4f3686c3b977881f995ec12b8dd60e72254;hp=2fd7e4f3686c3b977881f995ec12b8dd60e72254 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. ---