@@ -86,25 +86,25 @@ Tests are more accessible and future proof when simplified:
8686- Use the ``-simplify-mir `` option with llc.
8787
8888- Machine function attributes often have default values or the test works just
89- as well with default values. Typical candidates for this are: `alignment: `,
90- `exposesReturnsTwice `, `legalized `, `regBankSelected `, `selected `.
89+ as well with default values. Typical candidates for this are: `` alignment: ` `,
90+ `` exposesReturnsTwice `` , `` legalized `` , `` regBankSelected `` , `` selected ` `.
9191 The whole `frameInfo ` section is often unnecessary if there is no special
92- frame usage in the function. `tracksRegLiveness ` on the other hand is often
92+ frame usage in the function. `` tracksRegLiveness ` ` on the other hand is often
9393 necessary for some passes that care about block livein lists.
9494
95- - The (global) `liveins: ` list is typically only interesting for early
95+ - The (global) `` liveins: ` ` list is typically only interesting for early
9696 instruction selection passes and can be removed when testing later passes.
97- The per-block `liveins: ` on the other hand are necessary if
97+ The per-block `` liveins: ` ` on the other hand are necessary if
9898 `tracksRegLiveness ` is true.
9999
100- - Branch probability data in block `successors: ` lists can be dropped if the
100+ - Branch probability data in block `` successors: ` ` lists can be dropped if the
101101 test doesn't depend on it. Example:
102- `successors: %bb.1(0x40000000), %bb.2(0x40000000) ` can be replaced with
103- `successors: %bb.1, %bb.2 `.
102+ `` successors: %bb.1(0x40000000), %bb.2(0x40000000) ` ` can be replaced with
103+ `` successors: %bb.1, %bb.2 ` `.
104104
105105- MIR code contains a whole IR module. This is necessary because there are
106106 no equivalents in MIR for global variables, references to external functions,
107- function attributes, metadata, debug info. Instead some MIR data references
107+ function attributes, metadata, debug info. Instead, some MIR data references
108108 the IR constructs. You can often remove them if the test doesn't depend on
109109 them.
110110
@@ -114,24 +114,24 @@ Tests are more accessible and future proof when simplified:
114114 dropped: `:: (load 8) `
115115
116116- MIR blocks can reference IR blocks for debug printing, profile information,
117- or debug locations. Example: `bb.42.myblock ` in MIR references the IR block
118- `myblock `. It is usually possible to drop the `.myblock ` reference and simply
119- use `bb.42 `.
117+ or debug locations. Example: `` bb.42.myblock ` ` in MIR references the IR block
118+ `` myblock `` . It is usually possible to drop the `` .myblock ` ` reference and simply
119+ use `` bb.42 ` `.
120120
121121- If there are no memory operands or blocks referencing the IR, then the
122122 IR function can be replaced by a parameterless dummy function like
123- `define @func() { ret void } `.
123+ `` define @func() { ret void } ` `.
124124
125125- It is possible to drop the whole IR section of the MIR file if it only
126- contains dummy functions (see above). The .mir loader will create the
126+ contains dummy functions (see above). The `` .mir `` loader will create the
127127 IR functions automatically in this case.
128128
129129.. _limitations :
130130
131131Limitations
132132-----------
133133
134- Currently the MIR format has several limitations in terms of which state it
134+ Currently, the MIR format has several limitations in terms of which state it
135135can serialize:
136136
137137- The target-specific state in the target-specific ``MachineFunctionInfo ``
@@ -150,7 +150,7 @@ These limitations impose restrictions on what you can test with the MIR format.
150150For now, tests that would like to test some behaviour that depends on the state
151151of temporary or local ``MCSymbol `` operands or the exception handling state in
152152MMI, can't use the MIR format. As well as that, tests that test some behaviour
153- that depends on the state of the target specific ``MachineFunctionInfo `` or
153+ that depends on the state of the target- specific ``MachineFunctionInfo `` or
154154``MachineConstantPoolValue `` subclasses can't use the MIR format at the moment.
155155
156156High Level Structure
@@ -286,7 +286,7 @@ Example:
286286 Successors
287287^^^^^^^^^^
288288
289- The machine basic block's successors have to be specified before any of the
289+ The machine basic block's successors must be specified before any of the
290290instructions:
291291
292292.. code-block :: text
@@ -489,21 +489,21 @@ In case this is true, the Machine Operand is printed according to the target.
489489
490490For example:
491491
492- In AArch64RegisterInfo.td:
492+ In `` AArch64RegisterInfo.td `` :
493493
494494.. code-block :: text
495495
496496 def sub_32 : SubRegIndex<32>;
497497
498- If the third operand is an immediate with the value ``15 `` (target-dependent
498+ If the third operand is an immediate with the value ``15 `` (a target-dependent
499499value), based on the instruction's opcode and the operand's index the operand
500500will be printed as ``%subreg.sub_32 ``:
501501
502502.. code-block :: text
503503
504504 %1:gpr64 = SUBREG_TO_REG 0, %0, %subreg.sub_32
505505
506- For integers > 64 bits, we use a special machine operand, ``MO_CImmediate ``,
506+ For integers larger than 64 bits, we use a special machine operand, ``MO_CImmediate ``,
507507which stores the immediate in a ``ConstantInt `` using an ``APInt `` (LLVM's
508508arbitrary-precision integers).
509509
@@ -552,7 +552,7 @@ corresponding internal ``llvm::RegState`` representation:
552552
553553 * - ``implicit ``
554554 - ``RegState::Implicit ``
555- - Not emitted register (e.g. carry, or temporary result).
555+ - Not emitted register (e.g., carry, or temporary result).
556556
557557 * - ``implicit-def ``
558558 - ``RegState::ImplicitDefine ``
@@ -625,7 +625,7 @@ For a CPI with the index 0 and offset -12:
625625
626626 %1:gr64 = MOV64ri %const.0 - 12
627627
628- A constant pool entry is bound to a LLVM IR ``Constant `` or a target-specific
628+ A constant pool entry is bound to an LLVM IR ``Constant `` or a target-specific
629629``MachineConstantPoolValue ``. When serializing all the function's constants, the
630630following format is used:
631631
@@ -670,12 +670,12 @@ a global value operand named ``G``:
670670
671671 $rax = MOV64rm $rip, 1, _, @G, _
672672
673- The named global values are represented using an identifier with the '@' prefix.
673+ The named global values are represented using an identifier with the `` @ `` prefix.
674674If the identifier doesn't match the regular expression
675- `[-a-zA-Z$._][-a-zA-Z$._0-9]* `, then this identifier must be quoted.
675+ `` [-a-zA-Z$._][-a-zA-Z$._0-9]* ` `, then this identifier must be quoted.
676676
677677The unnamed global values are represented using an unsigned numeric value with
678- the '@' prefix, like in the following examples: ``@0 ``, ``@989 ``.
678+ the `` @ `` prefix, as in the following examples: ``@0 ``, ``@989 ``.
679679
680680Target-dependent Index Operands
681681^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -741,7 +741,7 @@ Example:
741741 MCSymbol Operands
742742^^^^^^^^^^^^^^^^^
743743
744- A MCSymbol operand holds a pointer to a ``MCSymbol ``. For the limitations
744+ An `` MCSymbol `` operand holds a pointer to an ``MCSymbol ``. For the limitations
745745of this operand in MIR, see :ref: `limitations <limitations >`.
746746
747747The syntax is:
@@ -825,7 +825,7 @@ Comments
825825^^^^^^^^
826826
827827Machine operands can have C/C++ style comments, which are annotations enclosed
828- between ``/* `` and ``*/ `` to improve readability of e.g. immediate operands.
828+ between ``/* `` and ``*/ `` to improve readability of e.g., immediate operands.
829829In the example below, ARM instructions EOR and BCC and immediate operands
830830``14 `` and ``0 `` have been annotated with their condition codes (CC)
831831definitions, i.e. the ``always `` and ``eq `` condition codes:
@@ -920,7 +920,7 @@ Instruction referencing locations
920920
921921This experimental feature aims to separate the specification of variable
922922*values * from the program point where a variable takes on that value. Changes
923- in variable value occur in the same manner as ``DBG_VALUE `` meta instructions
923+ in a variable value occur in the same manner as ``DBG_VALUE `` meta instructions
924924but using ``DBG_INSTR_REF ``. Variable values are identified by a pair of
925925instruction number and operand number. Consider the example below:
926926
0 commit comments