• Home
  • Raw
  • Download

Lines Matching refs:JIT

2 Kaleidoscope: Adding JIT and Optimizer Support
15 language, and adding JIT compiler support. These additions will
217 Adding a JIT Compiler
223 the code to an assembly file (.s) for some target, or you can JIT
227 In this section, we'll add JIT compiler support to our interpreter. The
235 the current native target and declare and initialize the JIT. This is
268 We also need to setup the data layout for the JIT:
281 The KaleidoscopeJIT class is a simple JIT built specifically for these
286 ``addModule`` adds an LLVM IR module to the JIT, making its functions
301 // JIT the module containing the anonymous expression, keeping a handle so
306 // Search the JIT for the __anon_expr symbol.
315 // Delete the anonymous expression module from the JIT.
320 the top-level expression to the JIT. We do this by calling addModule, which
322 handle that can be used to remove the module from the JIT later. Once the module
323 has been added to the JIT it can no longer be modified, so we also open a new
326 Once we've added the module to the JIT we need to get a pointer to the final
327 generated code. We do this by calling the JIT's findSymbol method, and passing
334 computed double. Because the LLVM JIT compiler matches the native platform ABI,
336 that type and call it directly. This means, there is no difference between JIT
341 remove the module from the JIT when we're done to free the associated memory.
391 the API a Module is a unit of allocation for the JIT, and testfunc was part
393 module from the JIT to free the memory for the anonymous expression, we deleted
395 testfunc a second time, the JIT could no longer find it.
398 module from the rest of the function definitions. The JIT will happily resolve
400 has a prototype, and is added to the JIT before it is called. By putting the
407 JIT more than once (unlike a module where every function must have a unique
522 the JIT and open a new module. In HandleExtern, we just need to add one line to
584 Whoa, how does the JIT know about sin and cos? The answer is surprisingly
587 it searches all the modules that have already been added to the JIT, from the
589 found inside the JIT, it falls back to calling "``dlsym("sin")``" on the
590 Kaleidoscope process itself. Since "``sin``" is defined within the JIT's
599 symbols available to JIT'd code), to dynamic code generation based on symbol
629 This completes the JIT and optimizer chapter of the Kaleidoscope
631 programming language, optimize and JIT compile it in a user-driven way.
640 the LLVM JIT and optimizer. To build this example, use: