summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/CMake.html4
-rw-r--r--docs/CommandGuide/FileCheck.pod186
-rw-r--r--docs/CommandGuide/index.html4
-rw-r--r--docs/GettingStarted.html3
-rw-r--r--docs/LangRef.html18
-rw-r--r--docs/ProgrammersManual.html20
-rw-r--r--docs/ReleaseNotes.html6
7 files changed, 223 insertions, 18 deletions
diff --git a/docs/CMake.html b/docs/CMake.html
index 25f4710..d83e3ad 100644
--- a/docs/CMake.html
+++ b/docs/CMake.html
@@ -209,7 +209,7 @@
<dt><b>CMAKE_BUILD_TYPE</b>:STRING</dt>
<dd>Sets the build type for <i>make</i> based generators. Possible
- values are Release, Debug, RelWithDebInfo and MiniSizeRel. On
+ values are Release, Debug, RelWithDebInfo and MinSizeRel. On
systems like Visual Studio the user sets the build type with the IDE
settings.</dd>
@@ -260,7 +260,7 @@
<dd>Build with threads support, if available. Defaults to ON.</dd>
<dt><b>LLVM_ENABLE_ASSERTIONS</b>:BOOL</dt>
- <dd>Enables code assertions. Defaults to ON if and only if
+ <dd>Enables code assertions. Defaults to OFF if and only if
CMAKE_BUILD_TYPE is <i>Release</i>.</dd>
<dt><b>LLVM_ENABLE_PIC</b>:BOOL</dt>
diff --git a/docs/CommandGuide/FileCheck.pod b/docs/CommandGuide/FileCheck.pod
index 539f66f..d3f640d 100644
--- a/docs/CommandGuide/FileCheck.pod
+++ b/docs/CommandGuide/FileCheck.pod
@@ -21,9 +21,6 @@ for matching multiple different inputs in one file in a specific order.
The I<match-filename> file specifies the file that contains the patterns to
match. The file to verify is always read from standard input.
-The input and output of B<FileCheck> is beyond the scope of this short
-introduction. Please see the I<TestingGuide> page in the LLVM documentation.
-
=head1 OPTIONS
=over
@@ -58,6 +55,189 @@ If B<FileCheck> verifies that the file matches the expected contents, it exits
with 0. Otherwise, if not, or if an error occurs, it will exit with a non-zero
value.
+=head1 TUTORIAL
+
+FileCheck is typically used from LLVM regression tests, being invoked on the RUN
+line of the test. A simple example of using FileCheck from a RUN line looks
+like this:
+
+ ; RUN: llvm-as < %s | llc -march=x86-64 | FileCheck %s
+
+This syntax says to pipe the current file ("%s") into llvm-as, pipe that into
+llc, then pipe the output of llc into FileCheck. This means that FileCheck will
+be verifying its standard input (the llc output) against the filename argument
+specified (the original .ll file specified by "%s"). To see how this works,
+lets look at the rest of the .ll file (after the RUN line):
+
+ define void @sub1(i32* %p, i32 %v) {
+ entry:
+ ; <b>CHECK: sub1:</b>
+ ; <b>CHECK: subl</b>
+ %0 = tail call i32 @llvm.atomic.load.sub.i32.p0i32(i32* %p, i32 %v)
+ ret void
+ }
+
+ define void @inc4(i64* %p) {
+ entry:
+ ; <b>CHECK: inc4:</b>
+ ; <b>CHECK: incq</b>
+ %0 = tail call i64 @llvm.atomic.load.add.i64.p0i64(i64* %p, i64 1)
+ ret void
+ }
+
+Here you can see some "CHECK:" lines specified in comments. Now you can see
+how the file is piped into llvm-as, then llc, and the machine code output is
+what we are verifying. FileCheck checks the machine code output to verify that
+it matches what the "CHECK:" lines specify.
+
+The syntax of the CHECK: lines is very simple: they are fixed strings that
+must occur in order. FileCheck defaults to ignoring horizontal whitespace
+differences (e.g. a space is allowed to match a tab) but otherwise, the contents
+of the CHECK: line is required to match some thing in the test file exactly.
+
+One nice thing about FileCheck (compared to grep) is that it allows merging
+test cases together into logical groups. For example, because the test above
+is checking for the "sub1:" and "inc4:" labels, it will not match unless there
+is a "subl" in between those labels. If it existed somewhere else in the file,
+that would not count: "grep subl" matches if subl exists anywhere in the
+file.
+
+
+
+=head2 The FileCheck -check-prefix option
+
+The FileCheck -check-prefix option allows multiple test configurations to be
+driven from one .ll file. This is useful in many circumstances, for example,
+testing different architectural variants with llc. Here's a simple example:
+
+ ; RUN: llvm-as < %s | llc -mtriple=i686-apple-darwin9 -mattr=sse41 \
+ ; RUN: | <b>FileCheck %s -check-prefix=X32</b>
+ ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin9 -mattr=sse41 \
+ ; RUN: | <b>FileCheck %s -check-prefix=X64</b>
+
+ define <4 x i32> @pinsrd_1(i32 %s, <4 x i32> %tmp) nounwind {
+ %tmp1 = insertelement <4 x i32>; %tmp, i32 %s, i32 1
+ ret <4 x i32> %tmp1
+ ; <b>X32:</b> pinsrd_1:
+ ; <b>X32:</b> pinsrd $1, 4(%esp), %xmm0
+
+ ; <b>X64:</b> pinsrd_1:
+ ; <b>X64:</b> pinsrd $1, %edi, %xmm0
+ }
+
+In this case, we're testing that we get the expected code generation with
+both 32-bit and 64-bit code generation.
+
+
+
+=head2 The "CHECK-NEXT:" directive
+
+Sometimes you want to match lines and would like to verify that matches
+happen on exactly consequtive lines with no other lines in between them. In
+this case, you can use CHECK: and CHECK-NEXT: directives to specify this. If
+you specified a custom check prefix, just use "<PREFIX>-NEXT:". For
+example, something like this works as you'd expect:
+
+ define void @t2(<2 x double>* %r, <2 x double&gt;* %A, double %B) {
+ %tmp3 = load <2 x double&gt;* %A, align 16
+ %tmp7 = insertelement <2 x double&gt; undef, double %B, i32 0
+ %tmp9 = shufflevector <2 x double&gt; %tmp3,
+ <2 x double&gt; %tmp7,
+ <2 x i32&gt; < i32 0, i32 2 &gt;
+ store <2 x double&gt; %tmp9, <2 x double&gt;* %r, align 16
+ ret void
+
+ ; <b>CHECK:</b> t2:
+ ; <b>CHECK:</b> movl 8(%esp), %eax
+ ; <b>CHECK-NEXT:</b> movapd (%eax), %xmm0
+ ; <b>CHECK-NEXT:</b> movhpd 12(%esp), %xmm0
+ ; <b>CHECK-NEXT:</b> movl 4(%esp), %eax
+ ; <b>CHECK-NEXT:</b> movapd %xmm0, (%eax)
+ ; <b>CHECK-NEXT:</b> ret
+ }
+
+CHECK-NEXT: directives reject the input unless there is exactly one newline
+between it an the previous directive. A CHECK-NEXT cannot be the first
+directive in a file.
+
+
+
+=head2 The "CHECK-NOT:" directive
+
+The CHECK-NOT: directive is used to verify that a string doesn't occur
+between two matches (or the first match and the beginning of the file). For
+example, to verify that a load is removed by a transformation, a test like this
+can be used:
+
+ define i8 @coerce_offset0(i32 %V, i32* %P) {
+ store i32 %V, i32* %P
+
+ %P2 = bitcast i32* %P to i8*
+ %P3 = getelementptr i8* %P2, i32 2
+
+ %A = load i8* %P3
+ ret i8 %A
+ ; <b>CHECK:</b> @coerce_offset0
+ ; <b>CHECK-NOT:</b> load
+ ; <b>CHECK:</b> ret i8
+ }
+
+
+
+=head2 FileCheck Pattern Matching Syntax
+
+The CHECK: and CHECK-NOT: directives both take a pattern to match. For most
+uses of FileCheck, fixed string matching is perfectly sufficient. For some
+things, a more flexible form of matching is desired. To support this, FileCheck
+allows you to specify regular expressions in matching strings, surrounded by
+double braces: B<{{yourregex}}>. Because we want to use fixed string
+matching for a majority of what we do, FileCheck has been designed to support
+mixing and matching fixed string matching with regular expressions. This allows
+you to write things like this:
+
+ ; CHECK: movhpd <b>{{[0-9]+}}</b>(%esp), <b>{{%xmm[0-7]}}</b>
+
+In this case, any offset from the ESP register will be allowed, and any xmm
+register will be allowed.
+
+Because regular expressions are enclosed with double braces, they are
+visually distinct, and you don't need to use escape characters within the double
+braces like you would in C. In the rare case that you want to match double
+braces explicitly from the input, you can use something ugly like
+B<{{[{][{]}}> as your pattern.
+
+
+
+=head2 FileCheck Variables
+
+It is often useful to match a pattern and then verify that it occurs again
+later in the file. For codegen tests, this can be useful to allow any register,
+but verify that that register is used consistently later. To do this, FileCheck
+allows named variables to be defined and substituted into patterns. Here is a
+simple example:
+
+ ; CHECK: test5:
+ ; CHECK: notw <b>[[REGISTER:%[a-z]+]]</b>
+ ; CHECK: andw {{.*}}<b>[[REGISTER]]</b>
+
+The first check line matches a regex (<tt>%[a-z]+</tt>) and captures it into
+the variables "REGISTER". The second line verifies that whatever is in REGISTER
+occurs later in the file after an "andw". FileCheck variable references are
+always contained in <tt>[[ ]]</tt> pairs, are named, and their names can be
+formed with the regex "<tt>[a-zA-Z][a-zA-Z0-9]*</tt>". If a colon follows the
+name, then it is a definition of the variable, if not, it is a use.
+
+FileCheck variables can be defined multiple times, and uses always get the
+latest value. Note that variables are all read at the start of a "CHECK" line
+and are all defined at the end. This means that if you have something like
+"<tt>CHECK: [[XYZ:.*]]x[[XYZ]]<tt>" that the check line will read the previous
+value of the XYZ variable and define a new one after the match is performed. If
+you need to do something like this you can probably take advantage of the fact
+that FileCheck is not actually line-oriented when it matches, this allows you to
+define two separate CHECK lines that match on the same line.
+
+
+
=head1 AUTHORS
Maintained by The LLVM Team (L<http://llvm.org>).
diff --git a/docs/CommandGuide/index.html b/docs/CommandGuide/index.html
index f1046fa..14635dd 100644
--- a/docs/CommandGuide/index.html
+++ b/docs/CommandGuide/index.html
@@ -132,6 +132,8 @@ options) arguments to the tool you are interested in.</p>
Flexible file verifier used extensively by the testing harness</li>
<li><a href="/cmds/tblgen.html"><b>tblgen</b></a> -
target description reader and generator</li>
+<li><a href="/cmds/lit.html"><b>lit</b></a> -
+ LLVM Integrated Tester, for running tests</li>
</ul>
</div>
@@ -146,7 +148,7 @@ options) arguments to the tool you are interested in.</p>
src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
<a href="http://llvm.org">LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-08-15 17:38:11 +0200 (Sat, 15 Aug 2009) $
+ Last modified: $Date: 2009-10-19 05:54:13 +0200 (Mon, 19 Oct 2009) $
</address>
</body>
diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html
index 8a8bce3..e3ceec6 100644
--- a/docs/GettingStarted.html
+++ b/docs/GettingStarted.html
@@ -724,6 +724,7 @@ revision), you can checkout it from the '<tt>tags</tt>' directory (instead of
subdirectories of the '<tt>tags</tt>' directory:</p>
<ul>
+<li>Release 2.6: <b>RELEASE_26</b></li>
<li>Release 2.5: <b>RELEASE_25</b></li>
<li>Release 2.4: <b>RELEASE_24</b></li>
<li>Release 2.3: <b>RELEASE_23</b></li>
@@ -1635,7 +1636,7 @@ out:</p>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.x10sys.com/rspencer/">Reid Spencer</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-09-27 06:56:27 +0200 (Sun, 27 Sep 2009) $
+ Last modified: $Date: 2009-10-23 08:20:06 +0200 (Fri, 23 Oct 2009) $
</address>
</body>
</html>
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 21e41d5..9741fdb 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -2339,9 +2339,9 @@ has undefined behavior.</p>
a special value. This value represents the inline assembler as a string
(containing the instructions to emit), a list of operand constraints (stored
as a string), a flag that indicates whether or not the inline asm
- expression has side effects, and a flag indicating whether the asm came
- originally from an asm block. An example inline assembler
- expression is:</p>
+ expression has side effects, and a flag indicating whether the function
+ containing the asm needs to align its stack conservatively. An example
+ inline assembler expression is:</p>
<div class="doc_code">
<pre>
@@ -2369,12 +2369,16 @@ call void asm sideeffect "eieio", ""()
</pre>
</div>
-<p>Inline asms derived from asm blocks are similarly marked with the
- '<tt>msasm</tt>' keyword:</p>
+<p>In some cases inline asms will contain code that will not work unless the
+ stack is aligned in some way, such as calls or SSE instructions on x86,
+ yet will not contain code that does that alignment within the asm.
+ The compiler should make conservative assumptions about what the asm might
+ contain and should generate its usual stack alignment code in the prologue
+ if the '<tt>alignstack</tt>' keyword is present:</p>
<div class="doc_code">
<pre>
-call void asm msasm "eieio", ""()
+call void asm alignstack "eieio", ""()
</pre>
</div>
@@ -7274,7 +7278,7 @@ LLVM</a>.</p>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-10-13 23:56:55 +0200 (Tue, 13 Oct 2009) $
+ Last modified: $Date: 2009-10-22 01:28:00 +0200 (Thu, 22 Oct 2009) $
</address>
</body>
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index 3234554..c5451b6 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -83,6 +83,7 @@ option</a></li>
<li><a href="#dss_stringmap">"llvm/ADT/StringMap.h"</a></li>
<li><a href="#dss_indexedmap">"llvm/ADT/IndexedMap.h"</a></li>
<li><a href="#dss_densemap">"llvm/ADT/DenseMap.h"</a></li>
+ <li><a href="#dss_valuemap">"llvm/ADT/ValueMap.h"</a></li>
<li><a href="#dss_map">&lt;map&gt;</a></li>
<li><a href="#dss_othermap">Other Map-Like Container Options</a></li>
</ul></li>
@@ -1492,6 +1493,23 @@ inserted into the map) that it needs internally.</p>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
+ <a name="dss_valuemap">"llvm/ADT/ValueMap.h"</a>
+</div>
+
+<div class="doc_text">
+
+<p>
+ValueMap is a wrapper around a <a href="#dss_densemap">DenseMap</a> mapping
+Value*s (or subclasses) to another type. When a Value is deleted or RAUW'ed,
+ValueMap will update itself so the new version of the key is mapped to the same
+value, just as if the key were a WeakVH. You can configure exactly how this
+happens, and what else happens on these two events, by passing
+a <code>Config</code> parameter to the ValueMap template.</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
<a name="dss_map">&lt;map&gt;</a>
</div>
@@ -3854,7 +3872,7 @@ arguments. An argument has a pointer to the parent Function.</p>
<a href="mailto:dhurjati@cs.uiuc.edu">Dinakar Dhurjati</a> and
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-10-12 16:46:08 +0200 (Mon, 12 Oct 2009) $
+ Last modified: $Date: 2009-10-23 00:11:22 +0200 (Fri, 23 Oct 2009) $
</address>
</body>
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html
index 8707052..2b93b1f 100644
--- a/docs/ReleaseNotes.html
+++ b/docs/ReleaseNotes.html
@@ -246,7 +246,7 @@ KLEE.</p>
<p>
The goal of <a href="http://dragonegg.llvm.org/">DragonEgg</a> is to make
gcc-4.5 act like llvm-gcc without requiring any gcc modifications whatsoever.
-<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a shared library (llvm.so)
+<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a shared library (dragonegg.so)
that is loaded by gcc at runtime. It uses the new gcc plugin architecture to
disable the GCC optimizers and code generators, and schedule the LLVM optimizers
and code generators (or direct output of LLVM IR) instead. Currently only Linux
@@ -1025,7 +1025,7 @@ guide. For clients, the notable API changes are:
<li>Intel and AMD machines running on Win32 using MinGW libraries (native).</li>
<li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
support is available for native builds with Visual C++).</li>
-<li>Sun UltraSPARC workstations running Solaris 10.</li>
+<li>Sun x86 and AMD64 machines running Solaris 10, OpenSolaris 0906.</li>
<li>Alpha-based machines running Debian GNU/Linux.</li>
</ul>
@@ -1348,7 +1348,7 @@ lists</a>.</p>
src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
<a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2009-10-13 19:48:04 +0200 (Tue, 13 Oct 2009) $
+ Last modified: $Date: 2009-10-16 18:30:58 +0200 (Fri, 16 Oct 2009) $
</address>
</body>
OpenPOWER on IntegriCloud