From a2574815af6ed03e9a12f8d5af8a0f991b8d2fa8 Mon Sep 17 00:00:00 2001
From: Bill Wendling
Date: Mon, 2 Nov 2009 00:24:16 +0000
Subject: [PATCH] Some formatting changes.
llvm-svn: 85768
---
docs/LangRef.html | 111 ++++++++++++++++++++++------------------------
1 file changed, 54 insertions(+), 57 deletions(-)
diff --git a/docs/LangRef.html b/docs/LangRef.html
index af0e5640c5b..b0a6793064c 100644
--- a/docs/LangRef.html
+++ b/docs/LangRef.html
@@ -338,7 +338,7 @@
IR's", allowing many source languages to be mapped to them). By providing
type information, LLVM can be used as the target of optimizations: for
example, through pointer analysis, it can be proven that a C automatic
- variable is never accessed outside of the current function... allowing it to
+ variable is never accessed outside of the current function, allowing it to
be promoted to a simple SSA value instead of a memory location.
@@ -359,12 +359,12 @@
-...because the definition of %x does not dominate all of its
- uses. The LLVM infrastructure provides a verification pass that may be used
- to verify that an LLVM module is well formed. This pass is automatically run
- by the parser after parsing input assembly and by the optimizer before it
- outputs bitcode. The violations pointed out by the verifier pass indicate
- bugs in transformation passes or input to the parser.
+because the definition of %x does not dominate all of its uses. The
+ LLVM infrastructure provides a verification pass that may be used to verify
+ that an LLVM module is well formed. This pass is automatically run by the
+ parser after parsing input assembly and by the optimizer before it outputs
+ bitcode. The violations pointed out by the verifier pass indicate bugs in
+ transformation passes or input to the parser.
@@ -457,7 +457,7 @@
Unnamed temporaries are numbered sequentially
-...and it also shows a convention that we follow in this document. When
+
It also shows a convention that we follow in this document. When
demonstrating instructions, we will follow an instruction with a comment that
defines the type and name of value produced. Comments are shown in italic
text.
@@ -482,24 +482,21 @@
the "hello world" module:
-
; Declare the string constant as a global constant...
-@.LC0 = internal constant [13 x i8] c"hello world\0A\00" ; [13 x i8]*
+
+; Declare the string constant as a global constant.
+@.LC0 = internal constant [13 x i8] c"hello world\0A\00" ; [13 x i8]*
; External declaration of the puts function
-declare i32 @puts(i8 *) ; i32(i8 *)*
+declare i32 @puts(i8 *) ; i32(i8 *)*
; Definition of main function
-define i32 @main() { ; i32()*
- ; Convert [13 x i8]* to i8 *...
- %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0 ; i8 *
+define i32 @main() { ; i32()*
+ ; Convert [13 x i8]* to i8 *...
+ %cast210 = getelementptr [13 x i8]* @.LC0, i64 0, i64 0 ; i8 *
- ; Call puts function to write out the string to stdout...
- call i32 @puts(i8 * %cast210) ; i32
- ret i32 0
}
+ ; Call puts function to write out the string to stdout.
+ call i32 @puts(i8 * %cast210) ; i32
+ ret i32 0
}
@@ -527,7 +524,7 @@ define i32 @main() { ; i32()*
linkage:
- - private:
+ - 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
@@ -535,7 +532,7 @@ define i32 @main() { ; i32()*
references can be updated. This doesn't show up in any symbol table in the
object file.
- - linker_private:
+ - linker_private
- Similar to private, but the symbol is passed through the assembler and
removed by the linker after evaluation. Note that (unlike private
symbols) linker_private symbols are subject to coalescing by the linker:
@@ -543,12 +540,12 @@ define i32 @main() { ; i32()*
normal strong symbols, they are removed by the linker from the final
linked image (executable or dynamic library).
- - internal:
+ - 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:
+ - 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
@@ -557,20 +554,20 @@ define i32 @main() { ; i32()*
be discarded at will, and are otherwise the same as linkonce_odr.
This linkage type is only allowed on definitions, not declarations.
- - linkonce:
+ - 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
translation unit that uses it. Unreferenced linkonce globals are
allowed to be discarded.
- - weak:
+ - weak
- "weak" linkage has the same merging semantics as
linkonce linkage, except that unreferenced globals with
weak linkage may not be discarded. This is used for globals that
are declared "weak" in C source code.
- - common:
+ - common
- "common" linkage is most similar to "weak" linkage, but
they are used for tentative definitions in C, such as "int X;" at
global scope.
@@ -582,20 +579,20 @@ define i32 @main() { ; i32()*
have common linkage.
- - appending:
+ - 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
the LLVM, typesafe, equivalent of having the system linker append together
"sections" with identical names when .o files are linked.
- - extern_weak:
+ - 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:
+ - 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" -
@@ -615,14 +612,14 @@ define i32 @main() { ; i32()*
DLLs (Dynamic Link Libraries).
- - dllimport:
+ - 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
formed by combining
__imp_
and the function or variable
name.
- - dllexport:
+ - 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
@@ -935,24 +932,24 @@ declare signext i8 @returns_signed_char()
Currently, only the following parameter attributes are defined:
- - zeroext
+ - 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
+ - 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
+ - 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,
though some targets use it to distinguish between two different kinds of
registers). Use of this attribute is target-specific.
- - byval
+ - 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
@@ -967,7 +964,7 @@ declare signext i8 @returns_signed_char()
generator that usually indicates a desired alignment for the synthesized
stack slot.
- - sret
+ - 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 +972,7 @@ declare signext i8 @returns_signed_char()
may only be applied to the first parameter. This is not a valid attribute
for return values.
- - noalias
+ - 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
@@ -985,12 +982,12 @@ declare signext i8 @returns_signed_char()
alias
analysis.
- - nocapture
+ - 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
+ - nest
- This indicates that the pointer parameter can be excised using the
trampoline intrinsics. This is not a valid
attribute for return values.
@@ -1010,7 +1007,7 @@ declare signext i8 @returns_signed_char()
-define void @f() gc "name" { ...
+define void @f() gc "name" { ... }
@@ -1040,42 +1037,42 @@ define void @f() gc "name" { ...
define void @f() noinline { ... }
define void @f() alwaysinline { ... }
define void @f() alwaysinline optsize { ... }
-define void @f() optsize
+define void @f() optsize { ... }
- - alwaysinline
+ - 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.
- - inlinehint
+ - inlinehint
- This attribute indicates that the source code contained a hint that inlining
this function is desirable (such as the "inline" keyword in C/C++). It
is just a hint; it imposes no requirements on the inliner.
- - noinline
+ - 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
+ - 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
+ - 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
+ - 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
+ - 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
@@ -1086,7 +1083,7 @@ define void @f() optsize
exceptions by calling the C++ exception throwing methods, but
could use the unwind instruction.
- - readonly
+ - 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,
@@ -1097,7 +1094,7 @@ define void @f() optsize
exception by calling the C++ exception throwing methods, but may
use the unwind instruction.
- - ssp
+ - 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
@@ -1108,7 +1105,7 @@ define void @f() optsize
function that doesn't have an ssp attribute, then the resulting
function will have an ssp attribute.
- - sspreq
+ - sspreq
- This attribute indicates that the function should always emit a
stack smashing protector. This overrides
the ssp function attribute.
@@ -1118,14 +1115,14 @@ define void @f() optsize
an ssp attribute, then the resulting function will have
an sspreq attribute.
- - noredzone
+ - noredzone
- This attribute indicates that the code generator should not use a red
zone, even if the target-specific ABI normally permits it.
- - noimplicitfloat
+ - noimplicitfloat
- This attributes disables implicit floating point instructions.
- - naked
+ - naked
- This attribute disables prologue / epilogue emission for the function.
This can have very system-specific consequences.