[llvm-commits] [llvm] r43723 - in /llvm/trunk/docs/tutorial: LangImpl1.html LangImpl2.html LangImpl3.html LangImpl4.html LangImpl5.html LangImpl6.html LangImpl7.html
Chris Lattner
sabre at nondot.org
Mon Nov 5 11:07:01 PST 2007
Author: lattner
Date: Mon Nov 5 13:06:59 2007
New Revision: 43723
URL: http://llvm.org/viewvc/llvm-project?rev=43723&view=rev
Log:
add table of contents to each chapter.
Modified:
llvm/trunk/docs/tutorial/LangImpl1.html
llvm/trunk/docs/tutorial/LangImpl2.html
llvm/trunk/docs/tutorial/LangImpl3.html
llvm/trunk/docs/tutorial/LangImpl4.html
llvm/trunk/docs/tutorial/LangImpl5.html
llvm/trunk/docs/tutorial/LangImpl6.html
llvm/trunk/docs/tutorial/LangImpl7.html
Modified: llvm/trunk/docs/tutorial/LangImpl1.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl1.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl1.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl1.html Mon Nov 5 13:06:59 2007
@@ -13,6 +13,16 @@
<div class="doc_title">Kaleidoscope: The basic language, with its lexer</div>
+<ul>
+<li>Chapter 1
+ <ol>
+ <li><a href="#intro">Tutorial Introduction</a></li>
+ <li><a href="#language">The Basic Language</a></li>
+ <li><a href="#lexer">The Lexer</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
@@ -32,7 +42,7 @@
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="language">The basic language</a></div>
+<div class="doc_section"><a name="language">The Basic Language</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
@@ -99,7 +109,7 @@
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="language">The Lexer</a></div>
+<div class="doc_section"><a name="lexer">The Lexer</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
Modified: llvm/trunk/docs/tutorial/LangImpl2.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl2.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl2.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl2.html Mon Nov 5 13:06:59 2007
@@ -13,18 +13,34 @@
<div class="doc_title">Kaleidoscope: Implementing a Parser and AST</div>
+<ul>
+<li>Chapter 2
+ <ol>
+ <li><a href="#intro">Chapter 2 Introduction</a></li>
+ <li><a href="#ast">The Abstract Syntax Tree (AST)</a></li>
+ <li><a href="#parserbasics">Parser Basics</a></li>
+ <li><a href="#parserprimexprs">Basic Expression Parsing</a></li>
+ <li><a href="#parserbinops">Binary Expression Parsing</a></li>
+ <li><a href="#parsertop">Parsing the Rest</a></li>
+ <li><a href="#driver">The Driver</a></li>
+ <li><a href="#conclusions">Conclusions</a></li>
+ <li><a href="#code">Full Code Listing</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="intro">Part 2 Introduction</a></div>
+<div class="doc_section"><a name="intro">Chapter 2 Introduction</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
-<p>Welcome to part 2 of the "<a href="index.html">Implementing a language with
-LLVM</a>" tutorial. This chapter shows you how to use the <a
+<p>Welcome to Chapter 2 of the "<a href="index.html">Implementing a language
+with LLVM</a>" tutorial. This chapter shows you how to use the <a
href="LangImpl1.html">Lexer built in Chapter 1</a> to build a full <a
href="http://en.wikipedia.org/wiki/Parsing">parser</a> for
our Kaleidoscope language and build an <a
@@ -725,7 +741,7 @@
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="code">Conclusions and the Full Code</a></div>
+<div class="doc_section"><a name="conclusions">Conclusions</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
Modified: llvm/trunk/docs/tutorial/LangImpl3.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl3.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl3.html Mon Nov 5 13:06:59 2007
@@ -13,18 +13,31 @@
<div class="doc_title">Kaleidoscope: Code generation to LLVM IR</div>
+<ul>
+<li>Chapter 3
+ <ol>
+ <li><a href="#intro">Chapter 3 Introduction</a></li>
+ <li><a href="#basics">Code Generation setup</a></li>
+ <li><a href="#exprs">Expression Code Generation</a></li>
+ <li><a href="#funcs">Function Code Generation</a></li>
+ <li><a href="#driver">Driver Changes and Closing Thoughts</a></li>
+ <li><a href="#code">Full Code Listing</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="intro">Part 3 Introduction</a></div>
+<div class="doc_section"><a name="intro">Chapter 3 Introduction</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
-<p>Welcome to part 3 of the "<a href="index.html">Implementing a language with
-LLVM</a>" tutorial. This chapter shows you how to transform the <a
+<p>Welcome to Chapter 3 of the "<a href="index.html">Implementing a language
+with LLVM</a>" tutorial. This chapter shows you how to transform the <a
href="LangImpl2.html">Abstract Syntax Tree built in Chapter 2</a> into LLVM IR.
This will teach you a little bit about how LLVM does things, as well as
demonstrate how easy it is to use. It's much more work to build a lexer and
Modified: llvm/trunk/docs/tutorial/LangImpl4.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl4.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl4.html Mon Nov 5 13:06:59 2007
@@ -13,21 +13,34 @@
<div class="doc_title">Kaleidoscope: Adding JIT and Optimizer Support</div>
+<ul>
+<li>Chapter 4
+ <ol>
+ <li><a href="#intro">Chapter 4 Introduction</a></li>
+ <li><a href="#trivialconstfold">Trivial Constant Folding</a></li>
+ <li><a href="#optimizerpasses">LLVM Optimization Passes</a></li>
+ <li><a href="#jit">Adding a JIT Compiler</a></li>
+ <li><a href="#code">Full Code Listing</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="intro">Part 4 Introduction</a></div>
+<div class="doc_section"><a name="intro">Chapter 4 Introduction</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
-<p>Welcome to part 4 of the "<a href="index.html">Implementing a language with
-LLVM</a>" tutorial. Parts 1-3 described the implementation of a simple language
-and included support for generating LLVM IR. This chapter describes two new
-techniques: adding optimizer support to your language, and adding JIT compiler
-support. This shows how to get nice efficient code for your language.</p>
+<p>Welcome to Chapter 4 of the "<a href="index.html">Implementing a language
+with LLVM</a>" tutorial. Parts 1-3 described the implementation of a simple
+language and included support for generating LLVM IR. This chapter describes
+two new techniques: adding optimizer support to your language, and adding JIT
+compiler support. This shows how to get nice efficient code for your
+language.</p>
</div>
Modified: llvm/trunk/docs/tutorial/LangImpl5.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl5.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl5.html Mon Nov 5 13:06:59 2007
@@ -13,18 +13,45 @@
<div class="doc_title">Kaleidoscope: Extending the Language: Control Flow</div>
+<ul>
+<li>Chapter 5
+ <ol>
+ <li><a href="#intro">Chapter 5 Introduction</a></li>
+ <li><a href="#ifthen">If/Then/Else</a>
+ <ol>
+ <li><a href="#iflexer">Lexer Extensions</a></li>
+ <li><a href="#ifast">AST Extensions</a></li>
+ <li><a href="#ifparser">Parser Extensions</a></li>
+ <li><a href="#ifir">LLVM IR</a></li>
+ <li><a href="#ifcodegen">Code Generation</a></li>
+ </ol>
+ </li>
+ <li><a href="#for">'for' Loop Expression</a>
+ <ol>
+ <li><a href="#forlexer">Lexer Extensions</a></li>
+ <li><a href="#forast">AST Extensions</a></li>
+ <li><a href="#forparser">Parser Extensions</a></li>
+ <li><a href="#forir">LLVM IR</a></li>
+ <li><a href="#forcodegen">Code Generation</a></li>
+ </ol>
+ </li>
+ <li><a href="#code">Full Code Listing</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="intro">Part 5 Introduction</a></div>
+<div class="doc_section"><a name="intro">Chapter 5 Introduction</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
-<p>Welcome to Part 5 of the "<a href="index.html">Implementing a language with
-LLVM</a>" tutorial. Parts 1-4 described the implementation of the simple
+<p>Welcome to Chapter 5 of the "<a href="index.html">Implementing a language
+with LLVM</a>" tutorial. Parts 1-4 described the implementation of the simple
Kaleidoscope language and included support for generating LLVM IR, following by
optimizations and a JIT compiler. Unfortunately, as presented, Kaleidoscope is
mostly useless: it has no control flow other than call and return. This means
@@ -116,7 +143,7 @@
<!-- ======================================================================= -->
<div class="doc_subsubsection"><a name="ifast">AST Extensions for
- If/Then/Else </a></div>
+ If/Then/Else</a></div>
<!-- ======================================================================= -->
<div class="doc_text">
@@ -142,7 +169,7 @@
<!-- ======================================================================= -->
<div class="doc_subsubsection"><a name="ifparser">Parser Extensions for
-If/Then/Else </a></div>
+If/Then/Else</a></div>
<!-- ======================================================================= -->
<div class="doc_text">
Modified: llvm/trunk/docs/tutorial/LangImpl6.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl6.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl6.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl6.html Mon Nov 5 13:06:59 2007
@@ -13,18 +13,31 @@
<div class="doc_title">Kaleidoscope: Extending the Language: User-defined Operators</div>
+<ul>
+<li>Chapter 6
+ <ol>
+ <li><a href="#intro">Chapter 6 Introduction</a></li>
+ <li><a href="#idea">User-defined Operators: the Idea</a></li>
+ <li><a href="#binary">User-defined Binary Operators</a></li>
+ <li><a href="#unary">User-defined Unary Operators</a></li>
+ <li><a href="#example">Kicking the Tires</a></li>
+ <li><a href="#code">Full Code Listing</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="intro">Part 6 Introduction</a></div>
+<div class="doc_section"><a name="intro">Chapter 6 Introduction</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
-<p>Welcome to Part 6 of the "<a href="index.html">Implementing a language with
-LLVM</a>" tutorial. At this point in our tutorial, we now have a fully
+<p>Welcome to Chapter 6 of the "<a href="index.html">Implementing a language
+with LLVM</a>" tutorial. At this point in our tutorial, we now have a fully
functional language that is fairly minimal, but also useful. One big problem
with it though is that it doesn't have many useful operators (like division,
logical negation, or even any comparisons other than less-than.</p>
Modified: llvm/trunk/docs/tutorial/LangImpl7.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=43723&r1=43722&r2=43723&view=diff
==============================================================================
--- llvm/trunk/docs/tutorial/LangImpl7.html (original)
+++ llvm/trunk/docs/tutorial/LangImpl7.html Mon Nov 5 13:06:59 2007
@@ -14,19 +14,35 @@
<div class="doc_title">Kaleidoscope: Extending the Language: Mutable Variables</div>
+<ul>
+<li>Chapter 7
+ <ol>
+ <li><a href="#intro">Chapter 7 Introduction</a></li>
+ <li><a href="#why">Why is this a hard problem?</a></li>
+ <li><a href="#memory">Memory in LLVM</a></li>
+ <li><a href="#kalvars">Mutable Variables in Kaleidoscope</a></li>
+ <li><a href="#adjustments">Adjusting Existing Variables for
+ Mutation</a></li>
+ <li><a href="#assignment">New Assignment Operator</a></li>
+ <li><a href="#localvars">User-defined Local Variables</a></li>
+ <li><a href="#code">Full Code Listing</a></li>
+ </ol>
+</li>
+</ul>
+
<div class="doc_author">
<p>Written by <a href="mailto:sabre at nondot.org">Chris Lattner</a></p>
</div>
<!-- *********************************************************************** -->
-<div class="doc_section"><a name="intro">Part 7 Introduction</a></div>
+<div class="doc_section"><a name="intro">Chapter 7 Introduction</a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
-<p>Welcome to Part 7 of the "<a href="index.html">Implementing a language with
-LLVM</a>" tutorial. In parts 1 through 6, we've built a very respectable,
-albeit simple, <a
+<p>Welcome to Chapter 7 of the "<a href="index.html">Implementing a language
+with LLVM</a>" tutorial. In chapters 1 through 6, we've built a very
+respectable, albeit simple, <a
href="http://en.wikipedia.org/wiki/Functional_programming">functional
programming language</a>. In our journey, we learned some parsing techniques,
how to build and represent an AST, how to build LLVM IR, and how to optimize
More information about the llvm-commits
mailing list