1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

Some improvements based on feedback from Anders.

llvm-svn: 43203
This commit is contained in:
Owen Anderson 2007-10-20 06:12:33 +00:00
parent 96b48922ca
commit 980bb805ec

View File

@ -44,7 +44,7 @@ entry:
</pre>
</div>
<p>Before going any further in this tutorial, you should look through the <a href="../LangRef.html">LLVM Language Reference Manual</a> and convince yourself that the above LLVM IR is actually equivalent to the original function. Once youre satisfied with that, lets move on to actually generating it programmatically!</p>
<p>If you're unsure what the above code says, skim through the <a href="../LangRef.html">LLVM Language Reference Manual</a> and convince yourself that the above LLVM IR is actually equivalent to the original function. Once youre satisfied with that, lets move on to actually generating it programmatically!</p>
<p>... STUFF ABOUT HEADERS ... </p>
@ -76,7 +76,7 @@ int main(int argc, char**argv) {
<p>Finally, we instantiate an LLVM <code>PassManager</code> and run the <code>PrintModulePass</code> on our module. LLVM uses an explicit pass infrastructure to manage optimizations and various other things. A <code>PassManager</code>, as should be obvious from its name, manages passes: it is responsible for scheduling them, invoking them, and insuring the proper disposal after were done with them. For this example, were just using a trivial pass that prints out our module in textual form.</p>
<p>Now onto the interesting part: creating a populating a module. Heres the first chunk of our <code>createLLVMModule()</code>:</p>
<p>Now onto the interesting part: creating a populating a module. Heres the first chunk of our <code>makeLLVMModule()</code>:</p>
<div class="doc_code">
<pre>