X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FLangRef.html;h=96d4fa1086869383e65b85e926b1bec74120b1e2;hb=9030d384c404ef2d28e2464cddcfbea268a12109;hp=c1bfe743a557ec49f8e4d9d73093df2421f58f7a;hpb=2f7a8b091aa31c2dd6e6ebb6929501d6b430f9c4;p=oota-llvm.git diff --git a/docs/LangRef.html b/docs/LangRef.html index c1bfe743a55..96d4fa10868 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -191,6 +191,12 @@
; Declare the string constant as a global constant... -%.LC0 = internal constant [13 x i8 ] c"hello world\0A\00" ; [13 x i8 ]* +@.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()* +define i32 @main() { ; i32()* ; Convert [13x i8 ]* to i8 *... %cast210 = getelementptr [13 x i8 ]* %.LC0, i64 0, i64 0 ; i8 * + href="#i_getelementptr">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 + href="#i_call">call i32 @puts(i8 * %cast210) ; i32 ret i32 0@@ -698,7 +704,7 @@ 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 a program is special in two ways: it is immediately +
The first basic block in a function 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 @@ -734,9 +740,9 @@ a power of 2.
+@<Name> = [Linkage] [Visibility] alias <AliaseeTy> @<Aliasee> -+
-%X = global i32 17 -%Y = global i32 42 -%Z = global [2 x i32*] [ i32* %X, i32* %Y ] +@X = global i32 17 +@Y = global i32 42 +@Z = global [2 x i32*] [ i32* @X, i32* @Y ]
The value produced is the integer or floating point difference of the two operands.
<result> = sub i32 4, %var ; yields {i32}:result = 4 - %var ++ <result> = sub i32 4, %var ; yields {i32}:result = 4 - %var <result> = sub i32 0, %val ; yields {i32}:result = -%var@@ -2607,11 +2617,11 @@ a pointer is returned.%array = malloc [4 x i8 ] ; yields {[%4 x i8]*}:array - %size = add i32 2, 2 ; yields {i32}:size = i32 4 - %array1 = malloc i8, i32 4 ; yields {i8*}:array1 - %array2 = malloc [12 x i8], i32 %size ; yields {[12 x i8]*}:array2 - %array3 = malloc i32, i32 4, align 1024 ; yields {i32*}:array3 - %array4 = malloc i32, align 1024 ; yields {i32*}:array4 + %size = add i32 2, 2 ; yields {i32}:size = i32 4 + %array1 = malloc i8, i32 4 ; yields {i8*}:array1 + %array2 = malloc [12 x i8], i32 %size ; yields {[12 x i8]*}:array2 + %array3 = malloc i32, i32 4, align 1024 ; yields {i32*}:array3 + %array4 = malloc i32, align 1024 ; yields {i32*}:array4@@ -2791,16 +2801,16 @@ compiled to LLVM:struct RT { char A; - i32 B[10][20]; + int B[10][20]; char C; }; struct ST { - i32 X; + int X; double Y; struct RT Z; }; -i32 *foo(struct ST *s) { +int *foo(struct ST *s) { return &s[1].Z.B[5][13]; }@@ -4815,6 +4825,51 @@ href="ExceptionHandling.html#format_common_intrinsics">LLVM Exception Handling document. + + + +++ + + + +This class of intrinsics is designed to be generic and has +no specific purpose.
++ ++Syntax:
++ declare void @llvm.var.annotation(i8* <val>, i8* <str>, i8* <str>, i32 <int> ) ++ +Overview:
+ ++The 'llvm.var.annotation' intrinsic +
+ +Arguments:
+ ++The first argument is a pointer to a value, the second is a pointer to a +global string, the third is a pointer to a global string which is the source +file name, and the last argument is the line number. +
+ +Semantics:
+ ++This intrinsic allows annotation of local variables with arbitrary strings. +This can be useful for special purpose optimizations that want to look for these + annotations. These have no other defined use, they are ignored by code + generation and optimization. +