llvm.org GIT mirror llvm / 2b2534c
[docs] Update code block for compatibility with Sphinx 1.5.1 It is currently not possible to build the documentation with cmake and the same version of Sphinx (1.5.1) used to generate the public facing documentation on llvm.org. When code blocks cannot be parsed by Pygments, it generates a warning which is treated as an error. In addition to being annoying and confusing for developers, this needlessly increases the bar for newcomers that want to get involved. This patch removes the language specifier from the affected block. The result is the same as when parsing fails: the block are not highlighted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317472 91177308-0d34-0410-b5e6-96231b3b80d8 Jonas Devlieghere 1 year, 9 months ago
5 changed file(s) with 70 addition(s) and 70 deletion(s). Raw diff Collapse all Expand all
121121
122122 Choose the code model from:
123123
124 .. code-block:: perl
124 .. code-block:: text
125125
126126 default: Target default code model
127127 small: Small code model
153153
154154 Instruction schedulers available (before register allocation):
155155
156 .. code-block:: perl
156 .. code-block:: text
157157
158158 =default: Best scheduler for the target
159159 =none: No scheduling: breadth first sequencing
167167
168168 Register allocator to use (default=linearscan)
169169
170 .. code-block:: perl
170 .. code-block:: text
171171
172172 =bigblock: Big-block register allocator
173173 =linearscan: linear scan register allocator =local - local register allocator
177177
178178 Choose relocation model from:
179179
180 .. code-block:: perl
180 .. code-block:: text
181181
182182 =default: Target default relocation model
183183 =static: Non-relocatable code =pic - Fully relocatable, position independent code
187187
188188 Spiller to use (default=local)
189189
190 .. code-block:: perl
190 .. code-block:: text
191191
192192 =simple: simple spiller
193193 =local: local spiller
196196
197197 Choose style of code to emit from X86 backend:
198198
199 .. code-block:: perl
199 .. code-block:: text
200200
201201 =att: Emit AT&T-style assembly
202202 =intel: Emit Intel-style assembly
141141
142142 Displays class definitions in the specified format.
143143
144 .. code-block:: perl
144 .. code-block:: text
145145
146146 =all - Display all class members including data, constants, typedefs, functions, etc (default)
147147 =layout - Only display members that contribute to class size.
151151
152152 Displays classes in the specified order.
153153
154 .. code-block:: perl
154 .. code-block:: text
155155
156156 =none - Undefined / no particular sort order (default)
157157 =name - Sort classes by name
199199 Type of symbols to dump when -globals, -externals, or -module-syms is
200200 specified. (default all)
201201
202 .. code-block:: perl
202 .. code-block:: text
203203
204204 =thunks - Display thunk symbols
205205 =data - Display data symbols
211211 For symbols dumped via the -module-syms, -globals, or -externals options, sort
212212 the results in specified order.
213213
214 .. code-block:: perl
214 .. code-block:: text
215215
216216 =none - Undefined / no particular sort order
217217 =name - Sort symbols by name
195195 In order to access the 18th integer in the array, you would need to do the
196196 following:
197197
198 .. code-block:: llvm
198 .. code-block:: text
199199
200200 %idx = getelementptr { [40 x i32]* }, { [40 x i32]* }* %, i64 0, i32 0
201201 %arr = load [40 x i32]** %idx
541541
542542 ``dso_local``
543543 The compiler may assume that a function or variable marked as ``dso_local``
544 will resolve to a symbol within the same linkage unit. Direct access will
544 will resolve to a symbol within the same linkage unit. Direct access will
545545 be generated even if the definition is not within this compilation unit.
546546
547547 .. _namedtypes:
596596 case they don't have an initializer.
597597
598598 Either global variable definitions or declarations may have an explicit section
599 to be placed in and may have an optional explicit alignment specified. If there
600 is a mismatch between the explicit or inferred section information for the
601 variable declaration and its definition the resulting behavior is undefined.
599 to be placed in and may have an optional explicit alignment specified. If there
600 is a mismatch between the explicit or inferred section information for the
601 variable declaration and its definition the resulting behavior is undefined.
602602
603603 A variable may be defined as a global ``constant``, which indicates that
604604 the contents of the variable will **never** be modified (enabling better
641641 Additionally, the global can placed in a comdat if the target has the necessary
642642 support.
643643
644 External declarations may have an explicit section specified. Section
645 information is retained in LLVM IR for targets that make use of this
646 information. Attaching section information to an external declaration is an
647 assertion that its definition is located in the specified section. If the
648 definition is located in a different section, the behavior is undefined.
644 External declarations may have an explicit section specified. Section
645 information is retained in LLVM IR for targets that make use of this
646 information. Attaching section information to an external declaration is an
647 assertion that its definition is located in the specified section. If the
648 definition is located in a different section, the behavior is undefined.
649649
650650 By default, global initializers are optimized by assuming that global
651651 variables defined within the module are not modified from their
44984498 doesn't have a trailing ``DW_OP_stack_value`` will describe an *address* when
44994499 combined with a concrete location.
45004500
4501 .. code-block:: llvm
4501 .. code-block:: text
45024502
45034503 !0 = !DIExpression(DW_OP_deref)
45044504 !1 = !DIExpression(DW_OP_plus_uconst, 3)
46384638 int i; // offset 0
46394639 float f; // offset 4
46404640 };
4641
4641
46424642 struct Outer {
46434643 float f; // offset 0
46444644 double d; // offset 4
46454645 struct Inner inner_a; // offset 12
46464646 };
4647
4647
46484648 void f(struct Outer* outer, struct Inner* inner, float* f, int* i, char* c) {
46494649 outer->f = 0; // tag0: (OuterStructTy, FloatScalarTy, 0)
46504650 outer->inner_a.i = 0; // tag1: (OuterStructTy, IntScalarTy, 12)
52205220 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52215221
52225222 The ``invariant.group`` metadata may be attached to ``load``/``store`` instructions.
5223 The existence of the ``invariant.group`` metadata on the instruction tells
5224 the optimizer that every ``load`` and ``store`` to the same pointer operand
5225 within the same invariant group can be assumed to load or store the same
5226 value (but see the ``llvm.invariant.group.barrier`` intrinsic which affects
5223 The existence of the ``invariant.group`` metadata on the instruction tells
5224 the optimizer that every ``load`` and ``store`` to the same pointer operand
5225 within the same invariant group can be assumed to load or store the same
5226 value (but see the ``llvm.invariant.group.barrier`` intrinsic which affects
52275227 when two pointers are considered the same). Pointers returned by bitcast or
52285228 getelementptr with only zero indices are considered the same.
52295229
52365236 %ptr = alloca i8
52375237 store i8 42, i8* %ptr, !invariant.group !0
52385238 call void @foo(i8* %ptr)
5239
5239
52405240 %a = load i8, i8* %ptr, !invariant.group !0 ; Can assume that value under %ptr didn't change
52415241 call void @foo(i8* %ptr)
52425242 %b = load i8, i8* %ptr, !invariant.group !1 ; Can't assume anything, because group changed
5243
5244 %newPtr = call i8* @getPointer(i8* %ptr)
5243
5244 %newPtr = call i8* @getPointer(i8* %ptr)
52455245 %c = load i8, i8* %newPtr, !invariant.group !0 ; Can't assume anything, because we only have information about %ptr
5246
5246
52475247 %unknownValue = load i8, i8* @unknownPtr
52485248 store i8 %unknownValue, i8* %ptr, !invariant.group !0 ; Can assume that %unknownValue == 42
5249
5249
52505250 call void @foo(i8* %ptr)
52515251 %newPtr2 = call i8* @llvm.invariant.group.barrier(i8* %ptr)
52525252 %d = load i8, i8* %newPtr2, !invariant.group !0 ; Can't step through invariant.group.barrier to get value of %ptr
5253
5253
52545254 ...
52555255 declare void @foo(i8*)
52565256 declare i8* @getPointer(i8*)
52575257 declare i8* @llvm.invariant.group.barrier(i8*)
5258
5258
52595259 !0 = !{!"magic ptr"}
52605260 !1 = !{!"other ptr"}
52615261
52645264 to the SSA value of the pointer operand.
52655265
52665266 .. code-block:: llvm
5267
5267
52685268 %v = load i8, i8* %x, !invariant.group !0
52695269 ; if %x mustalias %y then we can replace the above instruction with
52705270 %v = load i8, i8* %y
52945294
52955295 Example:
52965296
5297 .. code-block:: llvm
5297 .. code-block:: text
52985298
52995299 $a = comdat any
53005300 @a = global i32 1, comdat $a
67226722
67236723 Note that unsigned integer remainder and signed integer remainder are
67246724 distinct operations; for signed integer remainder, use '``srem``'.
6725
6725
67266726 Taking the remainder of a division by zero is undefined behavior.
6727 For vectors, if any element of the divisor is zero, the operation has
6727 For vectors, if any element of the divisor is zero, the operation has
67286728 undefined behavior.
67296729
67306730 Example:
67766776 distinct operations; for unsigned integer remainder, use '``urem``'.
67776777
67786778 Taking the remainder of a division by zero is undefined behavior.
6779 For vectors, if any element of the divisor is zero, the operation has
6779 For vectors, if any element of the divisor is zero, the operation has
67806780 undefined behavior.
67816781 Overflow also leads to undefined behavior; this is a rare case, but can
67826782 occur, for example, by taking the remainder of a 32-bit division of
76497649 instructions to save cache bandwidth, such as the ``MOVNT`` instruction on
76507650 x86.
76517651
7652 The optional ``!invariant.group`` metadata must reference a
7652 The optional ``!invariant.group`` metadata must reference a
76537653 single metadata name ````. See ``invariant.group`` metadata.
76547654
76557655 Semantics:
77237723 Example:
77247724 """"""""
77257725
7726 .. code-block:: llvm
7726 .. code-block:: text
77277727
77287728 fence acquire ; yields void
77297729 fence syncscope("singlethread") seq_cst ; yields void
77557755 to operate on, a value to compare to the value currently be at that
77567756 address, and a new value to place at that address if the compared values
77577757 are equal. The type of '' must be an integer or pointer type whose
7758 bit width is a power of two greater than or equal to eight and less
7758 bit width is a power of two greater than or equal to eight and less
77597759 than or equal to a target-specific size limit. '' and '' must
7760 have the same type, and the type of '' must be a pointer to
7761 that type. If the ``cmpxchg`` is marked as ``volatile``, then the
7760 have the same type, and the type of '' must be a pointer to
7761 that type. If the ``cmpxchg`` is marked as ``volatile``, then the
77627762 optimizer is not allowed to modify the number or order of execution of
77637763 this ``cmpxchg`` with other :ref:`volatile operations `.
77647764
90529052 ``tail`` or ``musttail`` markers to the call. It is used to prevent tail
90539053 call optimization from being performed on the call.
90549054
9055 #. The optional ``fast-math flags`` marker indicates that the call has one or more
9055 #. The optional ``fast-math flags`` marker indicates that the call has one or more
90569056 :ref:`fast-math flags `, which are optimization hints to enable
90579057 otherwise unsafe floating-point optimizations. Fast-math flags are only valid
90589058 for calls that return a floating-point scalar or vector type.
1279412794 Overview:
1279512795 """""""""
1279612796
12797 The '``llvm.invariant.group.barrier``' intrinsic can be used when an invariant
12797 The '``llvm.invariant.group.barrier``' intrinsic can be used when an invariant
1279812798 established by invariant.group metadata no longer holds, to obtain a new pointer
1279912799 value that does not carry the invariant information.
1280012800
1280812808 Semantics:
1280912809 """"""""""
1281012810
12811 Returns another pointer that aliases its argument but which is considered different
12811 Returns another pointer that aliases its argument but which is considered different
1281212812 for the purposes of ``load``/``store`` ``invariant.group`` metadata.
1281312813
1281412814 Constrained Floating Point Intrinsics
1288612886 Any FP exception that would have been raised by the original code must be raised
1288712887 by the transformed code, and the transformed code must not raise any FP
1288812888 exceptions that would not have been raised by the original code. This is the
12889 exception behavior argument that will be used if the code being compiled reads
12889 exception behavior argument that will be used if the code being compiled reads
1289012890 the FP exception status flags, but this mode can also be used with code that
1289112891 unmasks FP exceptions.
1289212892
1290412904
1290512905 ::
1290612906
12907 declare
12907 declare
1290812908 @llvm.experimental.constrained.fadd( , ,
1290912909 metadata ,
1291012910 metadata )
1294112941
1294212942 ::
1294312943
12944 declare
12944 declare
1294512945 @llvm.experimental.constrained.fsub( , ,
1294612946 metadata ,
1294712947 metadata )
1297812978
1297912979 ::
1298012980
12981 declare
12981 declare
1298212982 @llvm.experimental.constrained.fmul( , ,
1298312983 metadata ,
1298412984 metadata )
1301513015
1301613016 ::
1301713017
13018 declare
13018 declare
1301913019 @llvm.experimental.constrained.fdiv( , ,
1302013020 metadata ,
1302113021 metadata )
1305213052
1305313053 ::
1305413054
13055 declare
13055 declare
1305613056 @llvm.experimental.constrained.frem( , ,
1305713057 metadata ,
1305813058 metadata )
1308113081
1308213082 The value produced is the floating point remainder from the division of the two
1308313083 value operands and has the same type as the operands. The remainder has the
13084 same sign as the dividend.
13084 same sign as the dividend.
1308513085
1308613086 '``llvm.experimental.constrained.fma``' Intrinsic
1308713087 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1314113141
1314213142 ::
1314313143
13144 declare
13144 declare
1314513145 @llvm.experimental.constrained.sqrt( ,
1314613146 metadata ,
1314713147 metadata )
1317813178
1317913179 ::
1318013180
13181 declare
13181 declare
1318213182 @llvm.experimental.constrained.pow( , ,
1318313183 metadata ,
1318413184 metadata )
1321513215
1321613216 ::
1321713217
13218 declare
13218 declare
1321913219 @llvm.experimental.constrained.powi( , i32 ,
1322013220 metadata ,
1322113221 metadata )
1325413254
1325513255 ::
1325613256
13257 declare
13257 declare
1325813258 @llvm.experimental.constrained.sin( ,
1325913259 metadata ,
1326013260 metadata )
1329013290
1329113291 ::
1329213292
13293 declare
13293 declare
1329413294 @llvm.experimental.constrained.cos( ,
1329513295 metadata ,
1329613296 metadata )
1332613326
1332713327 ::
1332813328
13329 declare
13329 declare
1333013330 @llvm.experimental.constrained.exp( ,
1333113331 metadata ,
1333213332 metadata )
1336113361
1336213362 ::
1336313363
13364 declare
13364 declare
1336513365 @llvm.experimental.constrained.exp2( ,
1336613366 metadata ,
1336713367 metadata )
1339713397
1339813398 ::
1339913399
13400 declare
13400 declare
1340113401 @llvm.experimental.constrained.log( ,
1340213402 metadata ,
1340313403 metadata )
1343313433
1343413434 ::
1343513435
13436 declare
13436 declare
1343713437 @llvm.experimental.constrained.log10( ,
1343813438 metadata ,
1343913439 metadata )
1346813468
1346913469 ::
1347013470
13471 declare
13471 declare
1347213472 @llvm.experimental.constrained.log2( ,
1347313473 metadata ,
1347413474 metadata )
1350313503
1350413504 ::
1350513505
13506 declare
13506 declare
1350713507 @llvm.experimental.constrained.rint( ,
1350813508 metadata ,
1350913509 metadata )
1354213542
1354313543 ::
1354413544
13545 declare
13545 declare
1354613546 @llvm.experimental.constrained.nearbyint( ,
1354713547 metadata ,
1354813548 metadata )
1430314303 memory from the source location to the destination location. These locations are not
1430414304 allowed to overlap. The memory copy is performed as a sequence of load/store operations
1430514305 where each access is guaranteed to be a multiple of ``element_size`` bytes wide and
14306 aligned at an ``element_size`` boundary.
14306 aligned at an ``element_size`` boundary.
1430714307
1430814308 The order of the copy is unspecified. The same value may be read from the source
1430914309 buffer many times, but only one write is issued to the destination buffer per
1437814378 of memory from the source location to the destination location. These locations
1437914379 are allowed to overlap. The memory copy is performed as a sequence of load/store
1438014380 operations where each access is guaranteed to be a multiple of ``element_size``
14381 bytes wide and aligned at an ``element_size`` boundary.
14381 bytes wide and aligned at an ``element_size`` boundary.
1438214382
1438314383 The order of the copy is unspecified. The same value may be read from the source
1438414384 buffer many times, but only one write is issued to the destination buffer per
1445314453 The '``llvm.memset.element.unordered.atomic.*``' intrinsic sets the ``len`` bytes of
1445414454 memory starting at the destination location to the given ``value``. The memory is
1445514455 set with a sequence of store operations where each access is guaranteed to be a
14456 multiple of ``element_size`` bytes wide and aligned at an ``element_size`` boundary.
14456 multiple of ``element_size`` bytes wide and aligned at an ``element_size`` boundary.
1445714457
1445814458 The order of the assignment is unspecified. Only one write is issued to the
1445914459 destination buffer per element. It is well defined to have concurrent reads and
187187 `_. An `llvm.dbg.addr` intrinsic describes the
188188 *address* of a source variable.
189189
190 .. code-block:: llvm
190 .. code-block:: text
191191
192192 %i.addr = alloca i32, align 4
193193 call void @llvm.dbg.addr(metadata i32* %i.addr, metadata !1,