diff --git a/docs/tutorial/JITTutorial1.html b/docs/tutorial/JITTutorial1.html index e280d927aca..5228982ead8 100644 --- a/docs/tutorial/JITTutorial1.html +++ b/docs/tutorial/JITTutorial1.html @@ -90,9 +90,16 @@ int main(int argc, char**argv) {
The second segment runs the LLVM module verifier on our newly created module. While this probably isn’t really necessary for a simple module like this one, it’s always a good idea, especially if you’re generating LLVM IR based on some input. The verifier will print an error message if your LLVM module is malformed in any way.
-Finally, we instantiate an LLVM PassManager
and run the PrintModulePass
on our module. LLVM uses an explicit pass infrastructure to manage optimizations and various other things. A PassManager
, as should be obvious from its name, manages passes: it is responsible for scheduling them, invoking them, and insuring the proper disposal after we’re done with them. For this example, we’re just using a trivial pass that prints out our module in textual form.
Finally, we instantiate an LLVM PassManager
and run
+the PrintModulePass
on our module. LLVM uses an explicit pass
+infrastructure to manage optimizations and various other things.
+A PassManager
, as should be obvious from its name, manages passes:
+it is responsible for scheduling them, invoking them, and ensuring the proper
+disposal after we’re done with them. For this example, we’re just using a
+trivial pass that prints out our module in textual form.
Now onto the interesting part: creating and populating a module. Here’s the first chunk of our makeLLVMModule()
:
Now onto the interesting part: creating and populating a module. Here’s the
+first chunk of our makeLLVMModule()
:
@@ -122,7 +129,9 @@ Module* makeLLVMModule() {You'll notice that
getOrInsertFunction()
doesn't actually return aFunction*
. This is becausegetOrInsertFunction()
will return a cast of the existing function if the function already existed with a different prototype. Since we know that there's not already amul_add
function, we can safely just castc
to aFunction*
. -In addition, we set the calling convention for our new function to be the C calling convention. This isn’t strictly necessary, but it insures that our new function will interoperate properly with C code, which is a good thing.
+In addition, we set the calling convention for our new function to be the C +calling convention. This isn’t strictly necessary, but it ensures that our new +function will interoperate properly with C code, which is a good thing.