109467b48Spatrick//===----------------------------------------------------------------------===/
209467b48Spatrick//                          Kaleidoscope with MCJIT
309467b48Spatrick//===----------------------------------------------------------------------===//
409467b48Spatrick
5*73471bf0SpatrickThe files in this directory are meant to accompany the third blog in a series of
609467b48Spatrickthree blog posts that describe the process of porting the Kaleidoscope tutorial
709467b48Spatrickto use the MCJIT execution engine instead of the older JIT engine.
809467b48Spatrick
9*73471bf0SpatrickThe link of blog post-
10*73471bf0Spatrickhttps://blog.llvm.org/posts/2013-08-02-object-caching-with-kaleidoscope/
1109467b48Spatrick
1209467b48SpatrickThe source code in this directory demonstrates the third version of the
1309467b48Spatrickprogram, now modified to accept an input IR file on the command line and,
1409467b48Spatrickoptionally, to use a basic caching mechanism to store generated object images.
1509467b48Spatrick
1609467b48SpatrickThe toy-jit.cpp file contains a version of the original JIT-based source code
1709467b48Spatrickthat has been modified to support the input IR file command line option.
1809467b48Spatrick
19*73471bf0SpatrickTo build the program you will need to have 'clang++' and 'llvm-config' in your
20*73471bf0Spatrickpath. If you attempt to build using the LLVM 3.3 release, some minor
21*73471bf0Spatrickmodifications will be required.
2209467b48Spatrick
2309467b48SpatrickThis directory also contains a Python script that may be used to generate random
2409467b48Spatrickinput for the program and test scripts to capture data for rough performance
2509467b48Spatrickcomparisons.  Another Python script will split generated input files into
2609467b48Spatrickdefinitions and function calls for the purpose of testing the IR input and
2709467b48Spatrickcaching facilities.
28