• Home
  • Raw
  • Download

Lines Matching refs:we

9 change frequently.** Nonetheless we invite you to try it out as it stands, and
10 we welcome any feedback.
16 `Chapter 1 <BuildingAJIT1.html>`_ of this series we examined a basic JIT
22 In this layer we'll learn more about the ORC layer concept by using a new layer,
31 in short: to optimize a Module we create an llvm::FunctionPassManager
36 added to it. In this Chapter we will make optimization a phase of our JIT
39 important benefit: When we begin lazily compiling code (i.e. deferring
44 To add optimization support to our JIT we will take the KaleidoscopeJIT from
79 but after the CompileLayer we introduce a typedef for our optimization function.
80 In this case we use a std::function (a handy wrapper for "function-like" things)
82 our optimization function typedef in place we can declare our OptimizeLayer,
85 To initialize our OptimizeLayer we pass it a reference to the CompileLayer
86 below (standard practice for layers), and we initialize the OptimizeFunction
87 using a lambda that calls out to an "optimizeModule" function that we will
121 Next we need to replace references to 'CompileLayer' with references to
123 addModule we need to be careful to replace both references: the findSymbol call
147 At the bottom of our JIT we add a private method to do the actual optimization:
157 the transformed module on to the CompileLayer below. Of course, we could have
250 | | IRTransformLayer we just pass the query on to the layer |
258 | findSymbolIn | we just pass this query on to the layer below. In our |
259 | | REPL we use this method to search for functions |
260 | | representing top-level expressions, since we know exactly |
261 | | where we'll find them: in the top-level expression module |
262 | | we just added. |
276 operations we identified in Chapter 1. Conforming to the layer concept allows
292 soon as it's typed in. If we were to make the transform layer lazy (but not
293 change things otherwise) we could defer optimization until the first time we
295 then check out the answer below [1]_). In the next chapter, however we'll
298 interesting: the lazier we are, the quicker we can start executing the first
299 function, but the more often we'll have to pause to compile newly encountered
300 functions. If we only code-gen lazily, but optimize eagerly, we'll have a slow
302 function just passes through code-gen. If we both optimize and code-gen lazily
303 we can start executing the first function more quickly, but we'll have longer
305 executed. Things become even more interesting if we consider interproceedural
308 providing composable layers we leave the decisions to the person implementing
331 .. [1] When we add our top-level expression to the JIT, any calls to functions
332 that we defined earlier will appear to the ObjectLinkingLayer as
334 that we defined in addModuleSet, which in turn calls findSymbol on the