From e9aa2cf10f98fd31a2cee828c7746ebee1664b91 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Mon, 20 Jul 2009 02:39:26 +0000
Subject: [PATCH] More reformatting.
llvm-svn: 76393
---
docs/LangRef.html | 145 +++++++++++-----------------------------------
1 file changed, 33 insertions(+), 112 deletions(-)
diff --git a/docs/LangRef.html b/docs/LangRef.html
index 122fddaa828..1b9d6bfa754 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -508,7 +508,6 @@ define i32 @main() { ; i32()*
- private:
-
- Global values with private linkage are only directly accessible by objects
in the current module. In particular, linking code into a module with an
private global value may cause the private to be renamed as necessary to
@@ -517,18 +516,15 @@ define i32 @main() { ; i32()*
object file.
- linker_private:
-
- Similar to private, but the symbol is passed through the assembler and
removed by the linker after evaluation.
- internal:
-
- Similar to private, but the value shows as a local symbol
(STB_LOCAL in the case of ELF) in the object file. This
corresponds to the notion of the 'static' keyword in C.
- available_externally:
-
- Globals with "available_externally" linkage are never emitted
into the object file corresponding to the LLVM module. They exist to
allow inlining and other optimizations to take place given knowledge of
@@ -538,7 +534,6 @@ define i32 @main() { ; i32()*
This linkage type is only allowed on definitions, not declarations.
- linkonce:
-
- Globals with "linkonce" linkage are merged with other globals of
the same name when linkage occurs. This is typically used to implement
inline functions, templates, or other code which must be generated in each
@@ -546,7 +541,6 @@ define i32 @main() { ; i32()*
allowed to be discarded.
- common:
-
- "common" linkage is exactly the same as linkonce
linkage, except that unreferenced common globals may not be
discarded. This is used for globals that may be emitted in multiple
@@ -555,14 +549,12 @@ define i32 @main() { ; i32()*
definitions in C, such as "int X;" at global scope.
- weak:
-
- "weak" linkage is the same as common linkage, except
that some targets may choose to emit different assembly sequences for them
for target-dependent reasons. This is used for globals that are declared
"weak" in C source code.
- appending:
-
- "appending" linkage may only be applied to global variables of
pointer to array type. When two global variables with appending linkage
are linked together, the two global arrays are appended together. This is
@@ -570,14 +562,12 @@ define i32 @main() { ; i32()*
"sections" with identical names when .o files are linked.
- extern_weak:
-
- The semantics of this linkage follow the ELF object file model: the symbol
is weak until linked, if not linked, the symbol becomes null instead of
being an undefined reference.
- linkonce_odr:
- weak_odr:
-
- Some languages allow differing globals to be merged, such as two functions
with different semantics. Other languages, such as C++, ensure
that only equivalent globals are ever merged (the "one definition rule" -
@@ -587,7 +577,6 @@ define i32 @main() { ; i32()*
same as their non-odr versions.
- externally visible:
-
- If none of the above identifiers are used, the global is externally
visible, meaning that it participates in linkage and can be used to
resolve external symbol references.
@@ -599,7 +588,6 @@ define i32 @main() { ; i32()*
- dllimport:
-
- "dllimport" linkage causes the compiler to reference a function
or variable via a global pointer to a pointer that is set up by the DLL
exporting the symbol. On Microsoft Windows targets, the pointer name is
@@ -607,7 +595,6 @@ define i32 @main() { ; i32()*
name.
- dllexport:
-
- "dllexport" linkage causes the compiler to provide a global
pointer to a pointer in a DLL, so that it can be referenced with the
dllimport attribute. On Microsoft Windows targets, the pointer
@@ -646,7 +633,6 @@ define i32 @main() { ; i32()*
- "ccc" - The C calling convention:
-
- This calling convention (the default if no other calling convention is
specified) matches the target C calling conventions. This calling
convention supports varargs function calls and tolerates some mismatch in
@@ -654,7 +640,6 @@ define i32 @main() { ; i32()*
does normal C).
- "fastcc" - The fast calling convention:
-
- This calling convention attempts to make calls as fast as possible
(e.g. by passing things in registers). This calling convention allows the
target to use whatever tricks it wants to produce fast code for the
@@ -666,7 +651,6 @@ define i32 @main() { ; i32()*
the prototype of the function definition.
- "coldcc" - The cold calling convention:
-
- This calling convention attempts to make code in the caller as efficient
as possible under the assumption that the call is not commonly executed.
As such, these calls often preserve all registers so that the call does
@@ -675,7 +659,6 @@ define i32 @main() { ; i32()*
exactly match the prototype of the function definition.
- "cc <n>" - Numbered convention:
-
- Any calling convention may be specified by number, allowing
target-specific calling conventions to be used. Target specific calling
conventions start at 64.
@@ -699,7 +682,6 @@ define i32 @main() { ; i32()*
- "default" - Default style:
-
- On targets that use the ELF object file format, default visibility means
that the declaration is visible to other modules and, in shared libraries,
means that the declared entity may be overridden. On Darwin, default
@@ -707,7 +689,6 @@ define i32 @main() { ; i32()*
visibility corresponds to "external linkage" in the language.
- "hidden" - Hidden style:
-
- Two declarations of an object with hidden visibility refer to the same
object if they are in the same shared object. Usually, hidden visibility
indicates that the symbol will not be placed into the dynamic symbol
@@ -715,7 +696,6 @@ define i32 @main() { ; i32()*
directly.
- "protected" - Protected style:
-
- On ELF, protected visibility indicates that the symbol will be placed in
the dynamic symbol table, but that references within the defining module
will bind to the local symbol. That is, the symbol cannot be overridden by
@@ -863,8 +843,7 @@ define i32 @main() { ; i32()*
specified, the function is forced to have at least that much alignment. All
alignments must be a power of 2.
- Syntax:
-
+Syntax:
define [linkage] [visibility]
@@ -889,8 +868,7 @@ define [linkage] [visibility]
may have an optional linkage type, and an
optional visibility style.
- Syntax:
-
+Syntax:
@<Name> = alias [Linkage] [Visibility] <AliaseeTy> @<Aliasee>
@@ -930,19 +908,16 @@ declare signext i8 @returns_signed_char()
- zeroext
-
- This indicates to the code generator that the parameter or return value
should be zero-extended to a 32-bit value by the caller (for a parameter)
or the callee (for a return value).
- signext
-
- This indicates to the code generator that the parameter or return value
should be sign-extended to a 32-bit value by the caller (for a parameter)
or the callee (for a return value).
- inreg
-
- This indicates that this parameter or return value should be treated in a
special target-dependent fashion during while emitting code for a function
call or return (usually, by putting it in a register as opposed to memory,
@@ -950,7 +925,6 @@ declare signext i8 @returns_signed_char()
registers). Use of this attribute is target-specific.
- byval
-
- This indicates that the pointer parameter should really be passed by value
to the function. The attribute implies that a hidden copy of the pointee
is made between the caller and the callee, so the callee is unable to
@@ -966,7 +940,6 @@ declare signext i8 @returns_signed_char()
stack slot.
- sret
-
- This indicates that the pointer parameter specifies the address of a
structure that is the return value of the function in the source program.
This pointer must be guaranteed by the caller to be valid: loads and
@@ -975,7 +948,6 @@ declare signext i8 @returns_signed_char()
for return values.
- noalias
-
- This indicates that the pointer does not alias any global or any other
parameter. The caller is responsible for ensuring that this is the
case. On a function return value, noalias additionally indicates
@@ -986,13 +958,11 @@ declare signext i8 @returns_signed_char()
analysis.
- nocapture
-
- This indicates that the callee does not make any copies of the pointer
that outlive the callee itself. This is not a valid attribute for return
values.
- nest
-
- This indicates that the pointer parameter can be excised using the
trampoline intrinsics. This is not a valid
attribute for return values.
@@ -1048,37 +1018,31 @@ define void @f() optsize
- alwaysinline
-
- This attribute indicates that the inliner should attempt to inline this
function into callers whenever possible, ignoring any active inlining size
threshold for this caller.
- noinline
-
- This attribute indicates that the inliner should never inline this
function in any situation. This attribute may not be used together with
the alwaysinline attribute.
- optsize
-
- This attribute suggests that optimization passes and code generator passes
make choices that keep the code size of this function low, and otherwise
do optimizations specifically to reduce code size.
- noreturn
-
- This function attribute indicates that the function never returns
normally. This produces undefined behavior at runtime if the function
ever does dynamically return.
- nounwind
-
- This function attribute indicates that the function never returns with an
unwind or exceptional control flow. If the function does unwind, its
runtime behavior is undefined.
- readnone
-
- This attribute indicates that the function computes its result (or decides
to unwind an exception) based strictly on its arguments, without
dereferencing any pointer arguments or otherwise accessing any mutable
@@ -1090,7 +1054,6 @@ define void @f() optsize
could use the unwind instruction.
- readonly
-
- This attribute indicates that the function does not write through any
pointer arguments (including byval
arguments) or otherwise modify any state (e.g. memory, control registers,
@@ -1102,7 +1065,6 @@ define void @f() optsize
use the unwind instruction.
- ssp
-
- This attribute indicates that the function should emit a stack smashing
protector. It is in the form of a "canary"—a random value placed on
the stack before the local variables that's checked upon return from the
@@ -1114,27 +1076,23 @@ define void @f() optsize
function will have an ssp attribute.
- sspreq
-
- This attribute indicates that the function should always emit a
stack smashing protector. This overrides
- the ssp function attribute.
-
- If a function that has an sspreq attribute is inlined into a
- function that doesn't have an sspreq attribute or which has
- an ssp attribute, then the resulting function will have
- an sspreq attribute.
+ the ssp function attribute.
+
+ If a function that has an sspreq attribute is inlined into a
+ function that doesn't have an sspreq attribute or which has
+ an ssp attribute, then the resulting function will have
+ an sspreq attribute.
- noredzone
-
- This attribute indicates that the code generator should not use a red
zone, even if the target-specific ABI normally permits it.
- noimplicitfloat
-
- This attributes disables implicit floating point instructions.
- naked
-
- This attribute disables prologue / epilogue emission for the function.
This can have very system-specific consequences.
@@ -1193,46 +1151,38 @@ target datalayout = "layout specification"
- E
-
- Specifies that the target lays out data in big-endian form. That is, the
bits with the most significance have the lowest address location.
- e
-
- Specifies that the target lays out data in little-endian form. That is,
the bits with the least significance have the lowest address
location.
- p:size:abi:pref
-
- This specifies the size of a pointer and its abi and
preferred alignments. All sizes are in bits. Specifying
the pref alignment is optional. If omitted, the
preceding : should be omitted too.
- isize:abi:pref
-
- This specifies the alignment for an integer type of a given bit
size. The value of size must be in the range [1,2^23).
- vsize:abi:pref
-
- This specifies the alignment for a vector type of a given bit
size.
- fsize:abi:pref
-
- This specifies the alignment for a floating point type of a given bit
size. The value of size must be either 32 (float) or 64
(double).
- asize:abi:pref
-
- This specifies the alignment for an aggregate type of a given bit
size.
- ssize:abi:pref
-
- This specifies the alignment for a stack object of a given bit
size.
@@ -1389,44 +1339,47 @@ Classifications
+
Overview:
The void type does not represent any value and has no size.
Syntax:
-
void
+
+
Overview:
The label type represents code labels.
Syntax:
-
label
+
+
Overview:
The metadata type represents embedded metadata. The only derived type that
may contain metadata is metadata* or a function type that returns or
takes metadata typed parameters, but not pointer to metadata types.
Syntax:
-
metadata
+
@@ -1453,7 +1406,6 @@ Classifications
2^23-1 (about 8 million) can be specified.
Syntax:
-
iN
@@ -1495,7 +1447,6 @@ Classifications
and an underlying data type.
Syntax:
-
[<# elements> x <elementtype>]
@@ -1561,7 +1512,6 @@ Classifications
and the struct must have at least one element.
Syntax:
-
<returntype list> (<parameter list>)
@@ -1621,8 +1571,9 @@ Classifications
the 'getelementptr' instruction.
Syntax:
-
- { <type list> }
+
+ { <type list> }
+
Examples:
@@ -1662,8 +1613,9 @@ Classifications
the 'getelementptr' instruction.
Syntax:
-
- < { <type list> } >
+
+ < { <type list> } >
+
Examples:
@@ -1697,8 +1649,9 @@ Classifications
permit pointers to labels (label*). Use i8* instead.
Syntax:
-
- <type> *
+
+ <type> *
+
Examples:
@@ -1736,7 +1689,6 @@ Classifications
first class.
Syntax:
-
< <# elements> x <elementtype> >
@@ -1745,7 +1697,6 @@ Classifications
integer or floating point type.
Examples:
-
<4 x i32> |
@@ -1779,13 +1730,11 @@ Classifications
a structure type).
Syntax:
-
opaque
Examples:
-
opaque |
@@ -1822,7 +1771,6 @@ Classifications
in llvm IR).
Syntax:
-
\<level>
@@ -1830,7 +1778,6 @@ Classifications
The level is the count of the lexical type that is being referred to.
Examples:
-
\1* |
@@ -1863,18 +1810,15 @@ Classifications
- Boolean constants
-
- The two strings 'true' and 'false' are both valid
constants of the i1 type.
- Integer constants
-
- Standard integers (such as '4') are constants of
the integer type. Negative numbers may be used
with integer types.
- Floating point constants
-
- Floating point constants use standard decimal notation (e.g. 123.421),
exponential notation (e.g. 1.23421e+2), or a more precise hexadecimal
notation (see below). The assembler requires the exact decimal value of a
@@ -1883,7 +1827,6 @@ Classifications
constants must have a floating point type.
- Null pointer constants
-
- The identifier 'null' is recognized as a null pointer constant
and must be of pointer type.
@@ -1927,7 +1870,6 @@ Classifications
- Structure constants
-
- Structure constants are represented with notation similar to structure
type definitions (a comma separated list of elements, surrounded by braces
({})). For example: "{ i32 4, float 17.0, i32* @G }",
@@ -1937,7 +1879,6 @@ Classifications
type.
- Array constants
-
- Array constants are represented with notation similar to array type
definitions (a comma separated list of elements, surrounded by square
brackets ([])). For example: "[ i32 42, i32 11, i32 74
@@ -1946,7 +1887,6 @@ Classifications
type.
- Vector constants
-
- Vector constants are represented with notation similar to vector type
definitions (a comma separated list of elements, surrounded by
less-than/greater-than's (<>)). For example: "< i32
@@ -1955,7 +1895,6 @@ Classifications
elements must match those specified by the type.
- Zero initialization
-
- The string 'zeroinitializer' can be used to zero initialize a
value to zero of any type, including scalar and aggregate types.
This is often used to avoid having to print large zero initializers
@@ -1963,7 +1902,6 @@ Classifications
zero initializers.
- Metadata node
-
- A metadata node is a structure-like constant with
metadata type. For example: "metadata !{
i32 0, metadata !"test" }". Unlike other constants that are meant to
@@ -2024,36 +1962,30 @@ Classifications
- trunc ( CST to TYPE )
-
- Truncate a constant to another type. The bit size of CST must be larger
than the bit size of TYPE. Both types must be integers.
- zext ( CST to TYPE )
-
- Zero extend a constant to another type. The bit size of CST must be
smaller or equal to the bit size of TYPE. Both types must be
integers.
- sext ( CST to TYPE )
-
- Sign extend a constant to another type. The bit size of CST must be
smaller or equal to the bit size of TYPE. Both types must be
integers.
- fptrunc ( CST to TYPE )
-
- Truncate a floating point constant to another floating point type. The
size of CST must be larger than the size of TYPE. Both types must be
floating point.
- fpext ( CST to TYPE )
-
- Floating point extend a constant to another type. The size of CST must be
smaller or equal to the size of TYPE. Both types must be floating
point.
- fptoui ( CST to TYPE )
-
- Convert a floating point constant to the corresponding unsigned integer
constant. TYPE must be a scalar or vector integer type. CST must be of
scalar or vector floating point type. Both CST and TYPE must be scalars,
@@ -2061,7 +1993,6 @@ Classifications
integer type, the results are undefined.
- fptosi ( CST to TYPE )
-
- Convert a floating point constant to the corresponding signed integer
constant. TYPE must be a scalar or vector integer type. CST must be of
scalar or vector floating point type. Both CST and TYPE must be scalars,
@@ -2069,7 +2000,6 @@ Classifications
integer type, the results are undefined.
- uitofp ( CST to TYPE )
-
- Convert an unsigned integer constant to the corresponding floating point
constant. TYPE must be a scalar or vector floating point type. CST must be
of scalar or vector integer type. Both CST and TYPE must be scalars, or
@@ -2077,7 +2007,6 @@ Classifications
floating point type, the results are undefined.
- sitofp ( CST to TYPE )
-
- Convert a signed integer constant to the corresponding floating point
constant. TYPE must be a scalar or vector floating point type. CST must be
of scalar or vector integer type. Both CST and TYPE must be scalars, or
@@ -2085,61 +2014,50 @@ Classifications
floating point type, the results are undefined.
- ptrtoint ( CST to TYPE )
-
- Convert a pointer typed constant to the corresponding integer constant
TYPE must be an integer type. CST must be of pointer
type. The CST value is zero extended, truncated, or unchanged to
make it fit in TYPE.
- inttoptr ( CST to TYPE )
-
- Convert a integer constant to a pointer constant. TYPE must be a pointer
type. CST must be of integer type. The CST value is zero extended,
truncated, or unchanged to make it fit in a pointer size. This one is
really dangerous!
- bitcast ( CST to TYPE )
-
- Convert a constant, CST, to another TYPE. The constraints of the operands
are the same as those for the bitcast
instruction.
- getelementptr ( CSTPTR, IDX0, IDX1, ... )
-
- Perform the getelementptr operation on
constants. As with the getelementptr
instruction, the index list may have zero or more indexes, which are
required to make sense for the type of "CSTPTR".
- select ( COND, VAL1, VAL2 )
-
- Perform the select operation on constants.
- icmp COND ( VAL1, VAL2 )
-
- Performs the icmp operation on constants.
- fcmp COND ( VAL1, VAL2 )
-
- Performs the fcmp operation on constants.
- extractelement ( VAL, IDX )
-
- Perform the extractelement operation on
constants.
- insertelement ( VAL, ELT, IDX )
-
- Perform the insertelement operation on
constants.
- shufflevector ( VEC1, VEC2, IDXMASK )
-
- Perform the shufflevector operation on
constants.
- OPCODE ( LHS, RHS )
-
- Perform the specified operation of the LHS and RHS constants. OPCODE may
be any of the binary
or bitwise binary operations. The constraints
@@ -2283,7 +2201,6 @@ Instruction
Overview:
-
The 'ret' instruction is used to return control flow (and optionally
a value) from a function back to the caller.
@@ -2292,7 +2209,6 @@ Instruction
occur.
Arguments:
-
The 'ret' instruction optionally accepts a single argument, the
return value. The type of the return value must be a
'first class' type.
@@ -2304,7 +2220,6 @@ Instruction
return value.
Semantics:
-
When the 'ret' instruction is executed, control flow returns back to
the calling function's context. If the caller is a
"call" instruction, execution continues at the
@@ -2315,7 +2230,6 @@ Instruction
value.
Example:
-
ret i32 5 ; Return an integer value of 5
ret void ; Return from a void function
@@ -2360,8 +2274,16 @@ Instruction
control flows to the 'iffalse' label argument.
Example:
-Test:
%cond = icmp eq i32 %a, %b
br i1 %cond, label %IfEqual, label %IfUnequal
IfEqual:
ret i32 1
IfUnequal:
ret i32 0
+
+Test:
+ %cond = icmp eq i32 %a, %b
+ br i1 %cond, label %IfEqual, label %IfUnequal
+IfEqual:
+ ret i32 1
+IfUnequal:
+ ret i32 0
+
+
@@ -2585,7 +2507,6 @@ Instruction
The 'add' instruction returns the sum of its two operands.
Arguments:
-
The two arguments to the 'add' instruction must
be integer or vector of
integer values. Both arguments must have identical types.