diff options
Diffstat (limited to 'gnu/llvm/docs/tutorial')
| -rw-r--r-- | gnu/llvm/docs/tutorial/BuildingAJIT1.rst | 5 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/BuildingAJIT2.rst | 7 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/BuildingAJIT3.rst | 5 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/LangImpl02.rst | 12 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/LangImpl03.rst | 2 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/LangImpl04.rst | 10 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/LangImpl05.rst | 14 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/LangImpl06.rst | 2 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/LangImpl08.rst | 2 | ||||
| -rw-r--r-- | gnu/llvm/docs/tutorial/OCamlLangImpl1.rst | 2 |
10 files changed, 38 insertions, 23 deletions
diff --git a/gnu/llvm/docs/tutorial/BuildingAJIT1.rst b/gnu/llvm/docs/tutorial/BuildingAJIT1.rst index 9d7f5047783..2b83df42fc2 100644 --- a/gnu/llvm/docs/tutorial/BuildingAJIT1.rst +++ b/gnu/llvm/docs/tutorial/BuildingAJIT1.rst @@ -8,6 +8,11 @@ Building a JIT: Starting out with KaleidoscopeJIT Chapter 1 Introduction ====================== +**Warning: This text is currently out of date due to ORC API updates.** + +**The example code has been updated and can be used. The text will be updated +once the API churn dies down.** + Welcome to Chapter 1 of the "Building an ORC-based JIT in LLVM" tutorial. This tutorial runs through the implementation of a JIT compiler using LLVM's On-Request-Compilation (ORC) APIs. It begins with a simplified version of the diff --git a/gnu/llvm/docs/tutorial/BuildingAJIT2.rst b/gnu/llvm/docs/tutorial/BuildingAJIT2.rst index f1861033cc7..15c9c3586bc 100644 --- a/gnu/llvm/docs/tutorial/BuildingAJIT2.rst +++ b/gnu/llvm/docs/tutorial/BuildingAJIT2.rst @@ -12,6 +12,11 @@ we welcome any feedback. Chapter 2 Introduction ====================== +**Warning: This text is currently out of date due to ORC API updates.** + +**The example code has been updated and can be used. The text will be updated +once the API churn dies down.** + Welcome to Chapter 2 of the "Building an ORC-based JIT in LLVM" tutorial. In `Chapter 1 <BuildingAJIT1.html>`_ of this series we examined a basic JIT class, KaleidoscopeJIT, that could take LLVM IR modules as input and produce @@ -219,7 +224,7 @@ layer interface. The interface consists of one typedef and five methods: | | emitAndFinalize. | +------------------+-----------------------------------------------------------+ | | Takes a given set of Modules and makes them "available | -| | for execution. This means that symbols in those modules | +| | for execution". This means that symbols in those modules | | | should be searchable via findSymbol and findSymbolIn, and | | | the address of the symbols should be read/writable (for | | | data symbols), or executable (for function symbols) after | diff --git a/gnu/llvm/docs/tutorial/BuildingAJIT3.rst b/gnu/llvm/docs/tutorial/BuildingAJIT3.rst index 9c4e59fe117..36ec2e707a7 100644 --- a/gnu/llvm/docs/tutorial/BuildingAJIT3.rst +++ b/gnu/llvm/docs/tutorial/BuildingAJIT3.rst @@ -12,6 +12,11 @@ we welcome any feedback. Chapter 3 Introduction ====================== +**Warning: This text is currently out of date due to ORC API updates.** + +**The example code has been updated and can be used. The text will be updated +once the API churn dies down.** + Welcome to Chapter 3 of the "Building an ORC-based JIT in LLVM" tutorial. This chapter discusses lazy JITing and shows you how to enable it by adding an ORC CompileOnDemand layer the JIT from `Chapter 2 <BuildingAJIT2.html>`_. diff --git a/gnu/llvm/docs/tutorial/LangImpl02.rst b/gnu/llvm/docs/tutorial/LangImpl02.rst index d72c8dc9add..6982e969c8a 100644 --- a/gnu/llvm/docs/tutorial/LangImpl02.rst +++ b/gnu/llvm/docs/tutorial/LangImpl02.rst @@ -20,7 +20,7 @@ Parsing <http://en.wikipedia.org/wiki/Recursive_descent_parser>`_ and `Operator-Precedence Parsing <http://en.wikipedia.org/wiki/Operator-precedence_parser>`_ to parse the Kaleidoscope language (the latter for binary expressions and -the former for everything else). Before we get to parsing though, lets +the former for everything else). Before we get to parsing though, let's talk about the output of the parser: the Abstract Syntax Tree. The Abstract Syntax Tree (AST) @@ -716,15 +716,15 @@ Intermediate Representation (IR) from the AST. Full Code Listing ================= -Here is the complete code listing for this and the previous chapter. -Note that it is fully self-contained: you don't need LLVM or any -external libraries at all for this. (Besides the C and C++ standard -libraries, of course.) To build this, just compile with: +Here is the complete code listing for our running example. Because this +uses the LLVM libraries, we need to link them in. To do this, we use the +`llvm-config <http://llvm.org/cmds/llvm-config.html>`_ tool to inform +our makefile/command line about which options to use: .. code-block:: bash # Compile - clang++ -g -O3 toy.cpp + clang++ -g -O3 toy.cpp `llvm-config --cxxflags` # Run ./a.out diff --git a/gnu/llvm/docs/tutorial/LangImpl03.rst b/gnu/llvm/docs/tutorial/LangImpl03.rst index fab2ddaf882..1f2d20f40c7 100644 --- a/gnu/llvm/docs/tutorial/LangImpl03.rst +++ b/gnu/llvm/docs/tutorial/LangImpl03.rst @@ -261,7 +261,7 @@ Function Code Generation Code generation for prototypes and functions must handle a number of details, which make their code less beautiful than expression code generation, but allows us to illustrate some important points. First, -lets talk about code generation for prototypes: they are used both for +let's talk about code generation for prototypes: they are used both for function bodies and external function declarations. The code starts with: diff --git a/gnu/llvm/docs/tutorial/LangImpl04.rst b/gnu/llvm/docs/tutorial/LangImpl04.rst index 921c4dcc21a..8927a912cc2 100644 --- a/gnu/llvm/docs/tutorial/LangImpl04.rst +++ b/gnu/llvm/docs/tutorial/LangImpl04.rst @@ -203,7 +203,7 @@ Another good source of ideas can come from looking at the passes that experiment with passes from the command line, so you can see if they do anything. -Now that we have reasonable code coming out of our front-end, lets talk +Now that we have reasonable code coming out of our front-end, let's talk about executing it! Adding a JIT Compiler @@ -335,7 +335,7 @@ Recall, however, that the module we created a few lines earlier (via ``InitializeModuleAndPassManager``) is still open and waiting for new code to be added. -With just these two changes, lets see how Kaleidoscope works now! +With just these two changes, let's see how Kaleidoscope works now! :: @@ -380,7 +380,7 @@ demonstrates very basic functionality, but can we do more? Function definitions and calls also work, but something went very wrong on that last line. The call looks valid, so what happened? As you may have guessed from -the the API a Module is a unit of allocation for the JIT, and testfunc was part +the API a Module is a unit of allocation for the JIT, and testfunc was part of the same module that contained anonymous expression. When we removed that module from the JIT to free the memory for the anonymous expression, we deleted the definition of ``testfunc`` along with it. Then, when we tried to call @@ -514,7 +514,7 @@ In HandleDefinition, we add two lines to transfer the newly defined function to the JIT and open a new module. In HandleExtern, we just need to add one line to add the prototype to FunctionProtos. -With these changes made, lets try our REPL again (I removed the dump of the +With these changes made, let's try our REPL again (I removed the dump of the anonymous functions this time, you should get the idea by now :) : :: @@ -597,7 +597,7 @@ if we add: .. code-block:: c++ - #ifdef LLVM_ON_WIN32 + #ifdef _WIN32 #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT diff --git a/gnu/llvm/docs/tutorial/LangImpl05.rst b/gnu/llvm/docs/tutorial/LangImpl05.rst index 8650892e8f8..dad24890e12 100644 --- a/gnu/llvm/docs/tutorial/LangImpl05.rst +++ b/gnu/llvm/docs/tutorial/LangImpl05.rst @@ -27,7 +27,7 @@ lexer, parser, AST, and LLVM code emitter. This example is nice, because it shows how easy it is to "grow" a language over time, incrementally extending it as new ideas are discovered. -Before we get going on "how" we add this extension, lets talk about +Before we get going on "how" we add this extension, let's talk about "what" we want. The basic idea is that we want to be able to write this sort of thing: @@ -54,7 +54,7 @@ false, the second subexpression is evaluated and returned. Since Kaleidoscope allows side-effects, this behavior is important to nail down. -Now that we know what we "want", lets break this down into its +Now that we know what we "want", let's break this down into its constituent pieces. Lexer Extensions for If/Then/Else @@ -176,7 +176,7 @@ of the if/then/else example, because this is where it starts to introduce new concepts. All of the code above has been thoroughly described in previous chapters. -To motivate the code we want to produce, lets take a look at a simple +To motivate the code we want to produce, let's take a look at a simple example. Consider: :: @@ -276,7 +276,7 @@ of using the techniques that we will describe for #1, or you can insert Phi nodes directly, if convenient. In this case, it is really easy to generate the Phi node, so we choose to do it directly. -Okay, enough of the motivation and overview, lets generate code! +Okay, enough of the motivation and overview, let's generate code! Code Generation for If/Then/Else -------------------------------- @@ -429,7 +429,7 @@ languages... ===================== Now that we know how to add basic control flow constructs to the -language, we have the tools to add more powerful things. Lets add +language, we have the tools to add more powerful things. Let's add something more aggressive, a 'for' expression: :: @@ -450,7 +450,7 @@ it executes its body expression. Because we don't have anything better to return, we'll just define the loop as always returning 0.0. In the future when we have mutable variables, it will get more useful. -As before, lets talk about the changes that we need to Kaleidoscope to +As before, let's talk about the changes that we need to Kaleidoscope to support this. Lexer Extensions for the 'for' Loop @@ -619,7 +619,7 @@ this dump is generated with optimizations disabled for clarity): } This loop contains all the same constructs we saw before: a phi node, -several expressions, and some basic blocks. Lets see how this fits +several expressions, and some basic blocks. Let's see how this fits together. Code Generation for the 'for' Loop diff --git a/gnu/llvm/docs/tutorial/LangImpl06.rst b/gnu/llvm/docs/tutorial/LangImpl06.rst index cb8ec766bb2..2a9f4c6b609 100644 --- a/gnu/llvm/docs/tutorial/LangImpl06.rst +++ b/gnu/llvm/docs/tutorial/LangImpl06.rst @@ -303,7 +303,7 @@ we need to do to "extend the grammar". Now we have useful user-defined binary operators. This builds a lot on the previous framework we built for other operators. Adding unary operators is a bit more challenging, because we don't have any framework -for it yet - lets see what it takes. +for it yet - let's see what it takes. User-defined Unary Operators ============================ diff --git a/gnu/llvm/docs/tutorial/LangImpl08.rst b/gnu/llvm/docs/tutorial/LangImpl08.rst index 96eccaebd32..da4e60f84b8 100644 --- a/gnu/llvm/docs/tutorial/LangImpl08.rst +++ b/gnu/llvm/docs/tutorial/LangImpl08.rst @@ -44,7 +44,7 @@ returns the target triple of the current machine. auto TargetTriple = sys::getDefaultTargetTriple(); -LLVM doesn't require us to to link in all the target +LLVM doesn't require us to link in all the target functionality. For example, if we're just using the JIT, we don't need the assembly printers. Similarly, if we're only targeting certain architectures, we can only link in the functionality for those diff --git a/gnu/llvm/docs/tutorial/OCamlLangImpl1.rst b/gnu/llvm/docs/tutorial/OCamlLangImpl1.rst index 9de92305a1c..3fed61d2d4e 100644 --- a/gnu/llvm/docs/tutorial/OCamlLangImpl1.rst +++ b/gnu/llvm/docs/tutorial/OCamlLangImpl1.rst @@ -193,7 +193,7 @@ as: ``Lexer.lex`` works by recursing over a ``char Stream.t`` to read characters one at a time from the standard input. It eats them as it -recognizes them and stores them in in a ``Token.token`` variant. The +recognizes them and stores them in a ``Token.token`` variant. The first thing that it has to do is ignore whitespace between tokens. This is accomplished with the recursive call above. |
