Home | History | Annotate | only in /external/llvm/examples/Kaleidoscope/Orc/fully_lazy
Up to higher level directory
NameDateSize
CMakeLists.txt21-Oct-2016173
Makefile21-Oct-2016398
README.txt21-Oct-20161.3K
toy.cpp21-Oct-201643.6K

README.txt

      1 //===----------------------------------------------------------------------===/
      2 //                 Kaleidoscope with Orc - Lazy IRGen Version
      3 //===----------------------------------------------------------------------===//
      4 
      5 This version of Kaleidoscope with Orc demonstrates fully lazy IR-generation.
      6 Building on the lazy-irgen version of the tutorial, this version injects JIT
      7 callbacks to defer the bulk of IR-generation and code-generation of functions until
      8 they are first called.
      9 
     10 When a function definition is entered, a JIT callback is created and a stub
     11 function is built that will call the body of the function indirectly. The body of
     12 the function is *not* IRGen'd at this point. Instead, the function pointer for
     13 the indirect call is initialized to point at the JIT callback, and the compile
     14 action for the callback is initialized with a lambda that IRGens the body of the
     15 function and adds it to the JIT. The function pointer is updated by the JIT
     16 callback's update action to point at the newly emitted function body, so future
     17 calls to the stub will go straight to the body, not through the JIT.
     18 
     19 This directory contains a Makefile that allows the code to be built in a
     20 standalone manner, independent of the larger LLVM build infrastructure. To build
     21 the program you will need to have 'clang++' and 'llvm-config' in your path.
     22