@@ -1918,7 +1918,8 @@ <h5>Arguments:</h5>
1918
1918
elements of the aggregate object to index to. The actual types of the arguments
1919
1919
provided depend on the type of the first pointer argument. The
1920
1920
'< tt > getelementptr</ tt > ' instruction is used to index down through the type
1921
- levels of a structure. When indexing into a structure, only < tt > uint</ tt >
1921
+ levels of a structure or to a specific index in an array. When indexing into a
1922
+ structure, only < tt > uint</ tt >
1922
1923
integer constants are allowed. When indexing into an array or pointer,
1923
1924
< tt > int</ tt > and < tt > long</ tt > indexes are allowed of any sign.</ p >
1924
1925
@@ -1972,7 +1973,7 @@ <h5>Semantics:</h5>
1972
1973
sbyte }</ tt > ' type, another structure. The third index indexes into the second
1973
1974
element of the structure, yielding a '< tt > [10 x [20 x int]]</ tt > ' type, an
1974
1975
array. The two dimensions of the array are subscripted into, yielding an
1975
- '< tt > int</ tt > ' type. The '< tt > getelementptr</ tt > ' instruction return a pointer
1976
+ '< tt > int</ tt > ' type. The '< tt > getelementptr</ tt > ' instruction returns a pointer
1976
1977
to this element, thus computing a value of '< tt > int*</ tt > ' type.</ p >
1977
1978
1978
1979
< p > Note that it is perfectly legal to index partially through a
@@ -2119,7 +2120,7 @@ <h5>Semantics:</h5>
2119
2120
2120
2121
< p >
2121
2122
If the boolean condition evaluates to true, the instruction returns the first
2122
- value argument, otherwise it returns the second value argument.
2123
+ value argument; otherwise, it returns the second value argument.
2123
2124
</ p >
2124
2125
2125
2126
< h5 > Example:</ h5 >
@@ -2169,13 +2170,14 @@ <h5>Arguments:</h5>
2169
2170
< li >
2170
2171
< p > '< tt > ty</ tt > ': shall be the signature of the pointer to function value
2171
2172
being invoked. The argument types must match the types implied by this
2172
- signature.</ p >
2173
+ signature. This type can be omitted if the function is not varargs and
2174
+ if the function type does not return a pointer to a function.</ p >
2173
2175
</ li >
2174
2176
< li >
2175
2177
< p > '< tt > fnptrval</ tt > ': An LLVM value containing a pointer to a function to
2176
2178
be invoked. In most cases, this is a direct function invocation, but
2177
2179
indirect < tt > call</ tt > s are just as possible, calling an arbitrary pointer
2178
- to function values .</ p >
2180
+ to function value .</ p >
2179
2181
</ li >
2180
2182
< li >
2181
2183
< p > '< tt > function args</ tt > ': argument list whose types match the
@@ -2248,9 +2250,9 @@ <h5>Semantics:</h5>
2248
2250
2249
2251
< p > < tt > vanext</ tt > is an LLVM instruction instead of an < a
2250
2252
href ="#intrinsics "> intrinsic function</ a > because it takes a type as an
2251
- argument. The type refers to the current argument in the < tt > va_list</ tt > , it
2253
+ argument. The type refers to the current argument in the < tt > va_list</ tt > ; it
2252
2254
tells the compiler how far on the stack it needs to advance to find the next
2253
- argument</ p >
2255
+ argument. </ p >
2254
2256
2255
2257
< h5 > Example:</ h5 >
2256
2258
@@ -2297,7 +2299,7 @@ <h5>Semantics:</h5>
2297
2299
function.</ p >
2298
2300
2299
2301
< p > < tt > vaarg</ tt > is an LLVM instruction instead of an < a
2300
- href ="#intrinsics "> intrinsic function</ a > because it takes an type as an
2302
+ href ="#intrinsics "> intrinsic function</ a > because it takes a type as an
2301
2303
argument.</ p >
2302
2304
2303
2305
< h5 > Example:</ h5 >
@@ -2313,22 +2315,22 @@ <h5>Example:</h5>
2313
2315
< div class ="doc_text ">
2314
2316
2315
2317
< p > LLVM supports the notion of an "intrinsic function". These functions have
2316
- well known names and semantics, and are required to follow certain
2318
+ well known names and semantics and are required to follow certain
2317
2319
restrictions. Overall, these instructions represent an extension mechanism for
2318
2320
the LLVM language that does not require changing all of the transformations in
2319
2321
LLVM to add to the language (or the bytecode reader/writer, the parser,
2320
2322
etc...).</ p >
2321
2323
2322
- < p > Intrinsic function names must all start with an "< tt > llvm.</ tt > " prefix, this
2323
- prefix is reserved in LLVM for intrinsic names, thus functions may not be named
2324
+ < p > Intrinsic function names must all start with an "< tt > llvm.</ tt > " prefix. This
2325
+ prefix is reserved in LLVM for intrinsic names; thus, functions may not be named
2324
2326
this. Intrinsic functions must always be external functions: you cannot define
2325
2327
the body of intrinsic functions. Intrinsic functions may only be used in call
2326
2328
or invoke instructions: it is illegal to take the address of an intrinsic
2327
2329
function. Additionally, because intrinsic functions are part of the LLVM
2328
2330
language, it is required that they all be documented here if any are added.</ p >
2329
2331
2330
2332
2331
- < p > To learn how to add an intrinsics , please see the < a
2333
+ < p > To learn how to add an intrinsic function , please see the < a
2332
2334
href ="ExtendingLLVM.html "> Extending LLVM Guide</ a > .
2333
2335
</ p >
2334
2336
@@ -2396,7 +2398,7 @@ <h5>Semantics:</h5>
2396
2398
returns a < tt > va_list</ tt > element, so that the next < tt > vaarg</ tt >
2397
2399
will produce the first variable argument passed to the function. Unlike
2398
2400
the C < tt > va_start</ tt > macro, this intrinsic does not need to know the
2399
- last argument of the function, the compiler can figure that out.</ p >
2401
+ last argument of the function; the compiler can figure that out.</ p >
2400
2402
< p > Note that this intrinsic function is only legal to be called from
2401
2403
within the body of a variable argument function.</ p >
2402
2404
</ div >
@@ -2693,8 +2695,9 @@ <h5>Overview:</h5>
2693
2695
2694
2696
< p >
2695
2697
The '< tt > llvm.prefetch</ tt > ' intrinsic is a hint to the code generator to insert
2696
- a prefetch instruction if supported, otherwise it is a noop. Prefetches have no
2697
- effect on the behavior of the program, but can change its performance
2698
+ a prefetch instruction if supported; otherwise, it is a noop. Prefetches have
2699
+ no
2700
+ effect on the behavior of the program but can change its performance
2698
2701
characteristics.
2699
2702
</ p >
2700
2703
@@ -2735,13 +2738,14 @@ <h5>Overview:</h5>
2735
2738
2736
2739
2737
2740
< p >
2738
- The '< tt > llvm.pcmarker</ tt > ' intrinsic is a method to export a PC in a region of
2741
+ The '< tt > llvm.pcmarker</ tt > ' intrinsic is a method to export a Program Counter
2742
+ (PC) in a region of
2739
2743
code to simulators and other tools. The method is target specific, but it is
2740
2744
expected that the marker will use exported symbols to transmit the PC of the marker.
2741
2745
The marker makes no guaranties that it will remain with any specific instruction
2742
2746
after optimizations. It is possible that the presense of a marker will inhibit
2743
2747
optimizations. The intended use is to be inserted after optmizations to allow
2744
- corrolations of simulation runs.
2748
+ correlations of simulation runs.
2745
2749
</ p >
2746
2750
2747
2751
< h5 > Arguments:</ h5 >
0 commit comments