From 9ee5d2296bcddc5a9d48cd3dcc46ca8dac2771a9 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Mar 2004 16:49:10 +0000 Subject: [PATCH] Remove the comment "Constants must always have an initial value.", which is incorrect. Fix some formatting nastiness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12223 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 64 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 24 deletions(-) diff --git a/docs/LangRef.html b/docs/LangRef.html index 7af49cead6f..3215586f864 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -623,45 +623,61 @@ external (i.e., lacking any linkage declarations), they are accessible outside of the current module. It is illegal for a function declaration to have any linkage type other than "externally visible".

+ -
Global Variables
+
+ Global Variables +
+
+

Global variables define regions of memory allocated at compilation time instead of run-time. Global variables may optionally be initialized. A variable may be defined as a global "constant", which indicates that the contents of the variable will never be modified -(opening options for optimization). Constants must always have an -initial value.

+(opening options for optimization).

+

As SSA values, global variables define pointer values that are in scope (i.e. they dominate) for all basic blocks in the program. Global variables always define a pointer to their "content" type because they describe a region of memory, and all memory objects in LLVM are accessed through pointers.

+
+ + -
Functions
+
+ Functions +
+
-

LLVM function definitions are composed of a (possibly empty) -argument list, an opening curly brace, a list of basic blocks, and a -closing curly brace. LLVM function declarations are defined with the "declare" -keyword, a function name, and a function signature.

-

A function definition contains a list of basic blocks, forming the -CFG for the function. Each basic block may optionally start with a -label (giving the basic block a symbol table entry), contains a list of -instructions, and ends with a terminator -instruction (such as a branch or function return).

-

The first basic block in program is special in two ways: it is -immediately executed on entrance to the function, and it is not allowed -to have predecessor basic blocks (i.e. there can not be any branches to -the entry block of a function). Because the block can have no -predecessors, it also cannot have any PHI nodes.

-

-LLVM functions are identified by their name and type signature. Hence, two -functions with the same name but different parameter lists or return values -are considered different functions, and LLVM will resolves references to each -appropriately. -

+ +

LLVM function definitions are composed of a (possibly empty) argument list, +an opening curly brace, a list of basic blocks, and a closing curly brace. LLVM +function declarations are defined with the "declare" keyword, a +function name, and a function signature.

+ +

A function definition contains a list of basic blocks, forming the CFG for +the function. Each basic block may optionally start with a label (giving the +basic block a symbol table entry), contains a list of instructions, and ends +with a terminator instruction (such as a branch or +function return).

+ +

The first basic block in program is special in two ways: it is immediately +executed on entrance to the function, and it is not allowed to have predecessor +basic blocks (i.e. there can not be any branches to the entry block of a +function). Because the block can have no predecessors, it also cannot have any +PHI nodes.

+ +

LLVM functions are identified by their name and type signature. Hence, two +functions with the same name but different parameter lists or return values are +considered different functions, and LLVM will resolves references to each +appropriately.

+
+ +
Instruction Reference
-- 2.11.0