Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 1 | ======================================== |
| 2 | Machine IR (MIR) Format Reference Manual |
| 3 | ======================================== |
| 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | |
| 8 | .. warning:: |
| 9 | This is a work in progress. |
| 10 | |
| 11 | Introduction |
| 12 | ============ |
| 13 | |
| 14 | This document is a reference manual for the Machine IR (MIR) serialization |
| 15 | format. MIR is a human readable serialization format that is used to represent |
| 16 | LLVM's :ref:`machine specific intermediate representation |
| 17 | <machine code representation>`. |
| 18 | |
| 19 | The MIR serialization format is designed to be used for testing the code |
| 20 | generation passes in LLVM. |
| 21 | |
| 22 | Overview |
| 23 | ======== |
| 24 | |
| 25 | The MIR serialization format uses a YAML container. YAML is a standard |
| 26 | data serialization language, and the full YAML language spec can be read at |
| 27 | `yaml.org |
| 28 | <http://www.yaml.org/spec/1.2/spec.html#Introduction>`_. |
| 29 | |
| 30 | A MIR file is split up into a series of `YAML documents`_. The first document |
| 31 | can contain an optional embedded LLVM IR module, and the rest of the documents |
| 32 | contain the serialized machine functions. |
| 33 | |
| 34 | .. _YAML documents: http://www.yaml.org/spec/1.2/spec.html#id2800132 |
| 35 | |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 36 | MIR Testing Guide |
| 37 | ================= |
| 38 | |
| 39 | You can use the MIR format for testing in two different ways: |
| 40 | |
| 41 | - You can write MIR tests that invoke a single code generation pass using the |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 42 | ``-run-pass`` option in llc. |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 43 | |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 44 | - You can use llc's ``-stop-after`` option with existing or new LLVM assembly |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 45 | tests and check the MIR output of a specific code generation pass. |
| 46 | |
| 47 | Testing Individual Code Generation Passes |
| 48 | ----------------------------------------- |
| 49 | |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 50 | The ``-run-pass`` option in llc allows you to create MIR tests that invoke just |
| 51 | a single code generation pass. When this option is used, llc will parse an |
| 52 | input MIR file, run the specified code generation pass(es), and output the |
| 53 | resulting MIR code. |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 54 | |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 55 | You can generate an input MIR file for the test by using the ``-stop-after`` or |
| 56 | ``-stop-before`` option in llc. For example, if you would like to write a test |
| 57 | for the post register allocation pseudo instruction expansion pass, you can |
| 58 | specify the machine copy propagation pass in the ``-stop-after`` option, as it |
| 59 | runs just before the pass that we are trying to test: |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 60 | |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 61 | ``llc -stop-after=machine-cp bug-trigger.ll > test.mir`` |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 62 | |
Matt Arsenault | 4c2adea | 2018-12-04 17:45:12 +0000 | [diff] [blame] | 63 | If the same pass is run multiple times, a run index can be included |
| 64 | after the name with a comma. |
| 65 | |
| 66 | ``llc -stop-after=dead-mi-elimination,1 bug-trigger.ll > test.mir`` |
| 67 | |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 68 | After generating the input MIR file, you'll have to add a run line that uses |
| 69 | the ``-run-pass`` option to it. In order to test the post register allocation |
| 70 | pseudo instruction expansion pass on X86-64, a run line like the one shown |
| 71 | below can be used: |
| 72 | |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 73 | ``# RUN: llc -o - %s -mtriple=x86_64-- -run-pass=postrapseudos | FileCheck %s`` |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 74 | |
| 75 | The MIR files are target dependent, so they have to be placed in the target |
Matthias Braun | 1130138 | 2017-04-13 22:14:45 +0000 | [diff] [blame] | 76 | specific test directories (``lib/CodeGen/TARGETNAME``). They also need to |
| 77 | specify a target triple or a target architecture either in the run line or in |
| 78 | the embedded LLVM IR module. |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 79 | |
Matthias Braun | dc1a361 | 2017-04-13 23:45:14 +0000 | [diff] [blame] | 80 | Simplifying MIR files |
| 81 | ^^^^^^^^^^^^^^^^^^^^^ |
| 82 | |
| 83 | The MIR code coming out of ``-stop-after``/``-stop-before`` is very verbose; |
| 84 | Tests are more accessible and future proof when simplified: |
| 85 | |
Matthias Braun | 0cb25a2 | 2017-05-05 21:09:30 +0000 | [diff] [blame] | 86 | - Use the ``-simplify-mir`` option with llc. |
| 87 | |
Matthias Braun | dc1a361 | 2017-04-13 23:45:14 +0000 | [diff] [blame] | 88 | - 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`. |
| 91 | 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 |
| 93 | necessary for some passes that care about block livein lists. |
| 94 | |
| 95 | - The (global) `liveins:` list is typically only interesting for early |
| 96 | instruction selection passes and can be removed when testing later passes. |
| 97 | The per-block `liveins:` on the other hand are necessary if |
| 98 | `tracksRegLiveness` is true. |
| 99 | |
| 100 | - Branch probability data in block `successors:` lists can be dropped if the |
| 101 | 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`. |
| 104 | |
| 105 | - MIR code contains a whole IR module. This is necessary because there are |
| 106 | no equivalents in MIR for global variables, references to external functions, |
| 107 | function attributes, metadata, debug info. Instead some MIR data references |
| 108 | the IR constructs. You can often remove them if the test doesn't depend on |
| 109 | them. |
| 110 | |
| 111 | - Alias Analysis is performed on IR values. These are referenced by memory |
| 112 | operands in MIR. Example: `:: (load 8 from %ir.foobar, !alias.scope !9)`. |
| 113 | If the test doesn't depend on (good) alias analysis the references can be |
| 114 | dropped: `:: (load 8)` |
| 115 | |
| 116 | - 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`. |
| 120 | |
| 121 | - If there are no memory operands or blocks referencing the IR then the |
| 122 | IR function can be replaced by a parameterless dummy function like |
| 123 | `define @func() { ret void }`. |
| 124 | |
| 125 | - 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 |
| 127 | IR functions automatically in this case. |
| 128 | |
Francis Visoiu Mistrih | ee30ab7 | 2017-12-14 10:03:23 +0000 | [diff] [blame] | 129 | .. _limitations: |
| 130 | |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 131 | Limitations |
| 132 | ----------- |
| 133 | |
| 134 | Currently the MIR format has several limitations in terms of which state it |
| 135 | can serialize: |
| 136 | |
| 137 | - The target-specific state in the target-specific ``MachineFunctionInfo`` |
| 138 | subclasses isn't serialized at the moment. |
| 139 | |
| 140 | - The target-specific ``MachineConstantPoolValue`` subclasses (in the ARM and |
| 141 | SystemZ backends) aren't serialized at the moment. |
| 142 | |
Chandler Carruth | e90d440 | 2018-08-16 23:11:05 +0000 | [diff] [blame] | 143 | - The ``MCSymbol`` machine operands don't support temporary or local symbols. |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 144 | |
| 145 | - A lot of the state in ``MachineModuleInfo`` isn't serialized - only the CFI |
| 146 | instructions and the variable debug information from MMI is serialized right |
| 147 | now. |
| 148 | |
| 149 | These limitations impose restrictions on what you can test with the MIR format. |
| 150 | For now, tests that would like to test some behaviour that depends on the state |
Chandler Carruth | e90d440 | 2018-08-16 23:11:05 +0000 | [diff] [blame] | 151 | of temporary or local ``MCSymbol`` operands or the exception handling state in |
| 152 | MMI, 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 |
Alex Lorenz | 0f92e21 | 2015-08-21 22:58:33 +0000 | [diff] [blame] | 154 | ``MachineConstantPoolValue`` subclasses can't use the MIR format at the moment. |
| 155 | |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 156 | High Level Structure |
| 157 | ==================== |
| 158 | |
Alex Lorenz | 1fd5773 | 2015-09-08 11:38:16 +0000 | [diff] [blame] | 159 | .. _embedded-module: |
| 160 | |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 161 | Embedded Module |
| 162 | --------------- |
| 163 | |
| 164 | When the first YAML document contains a `YAML block literal string`_, the MIR |
| 165 | parser will treat this string as an LLVM assembly language string that |
| 166 | represents an embedded LLVM IR module. |
| 167 | Here is an example of a YAML document that contains an LLVM module: |
| 168 | |
| 169 | .. code-block:: llvm |
| 170 | |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 171 | define i32 @inc(i32* %x) { |
| 172 | entry: |
| 173 | %0 = load i32, i32* %x |
| 174 | %1 = add i32 %0, 1 |
| 175 | store i32 %1, i32* %x |
| 176 | ret i32 %1 |
| 177 | } |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 178 | |
| 179 | .. _YAML block literal string: http://www.yaml.org/spec/1.2/spec.html#id2795688 |
| 180 | |
| 181 | Machine Functions |
| 182 | ----------------- |
| 183 | |
| 184 | The remaining YAML documents contain the machine functions. This is an example |
| 185 | of such YAML document: |
| 186 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 187 | .. code-block:: text |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 188 | |
| 189 | --- |
| 190 | name: inc |
| 191 | tracksRegLiveness: true |
| 192 | liveins: |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 193 | - { reg: '$rdi' } |
Alex Lorenz | 1dde2af | 2015-08-14 00:36:10 +0000 | [diff] [blame] | 194 | body: | |
| 195 | bb.0.entry: |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 196 | liveins: $rdi |
Alex Lorenz | 1dde2af | 2015-08-14 00:36:10 +0000 | [diff] [blame] | 197 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 198 | $eax = MOV32rm $rdi, 1, _, 0, _ |
| 199 | $eax = INC32r killed $eax, implicit-def dead $eflags |
| 200 | MOV32mr killed $rdi, 1, _, 0, _, $eax |
| 201 | RETQ $eax |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 202 | ... |
| 203 | |
| 204 | The document above consists of attributes that represent the various |
| 205 | properties and data structures in a machine function. |
| 206 | |
| 207 | The attribute ``name`` is required, and its value should be identical to the |
| 208 | name of a function that this machine function is based on. |
| 209 | |
Alex Lorenz | 1dde2af | 2015-08-14 00:36:10 +0000 | [diff] [blame] | 210 | The attribute ``body`` is a `YAML block literal string`_. Its value represents |
| 211 | the function's machine basic blocks and their machine instructions. |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 212 | |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 213 | Machine Instructions Format Reference |
| 214 | ===================================== |
| 215 | |
| 216 | The machine basic blocks and their instructions are represented using a custom, |
| 217 | human readable serialization language. This language is used in the |
| 218 | `YAML block literal string`_ that corresponds to the machine function's body. |
| 219 | |
| 220 | A source string that uses this language contains a list of machine basic |
| 221 | blocks, which are described in the section below. |
| 222 | |
| 223 | Machine Basic Blocks |
| 224 | -------------------- |
| 225 | |
| 226 | A machine basic block is defined in a single block definition source construct |
| 227 | that contains the block's ID. |
| 228 | The example below defines two blocks that have an ID of zero and one: |
| 229 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 230 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 231 | |
| 232 | bb.0: |
| 233 | <instructions> |
| 234 | bb.1: |
| 235 | <instructions> |
| 236 | |
| 237 | A machine basic block can also have a name. It should be specified after the ID |
| 238 | in the block's definition: |
| 239 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 240 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 241 | |
| 242 | bb.0.entry: ; This block's name is "entry" |
| 243 | <instructions> |
| 244 | |
| 245 | The block's name should be identical to the name of the IR block that this |
| 246 | machine block is based on. |
| 247 | |
Francis Visoiu Mistrih | d347e97 | 2017-12-13 10:30:59 +0000 | [diff] [blame] | 248 | .. _block-references: |
| 249 | |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 250 | Block References |
| 251 | ^^^^^^^^^^^^^^^^ |
| 252 | |
| 253 | The machine basic blocks are identified by their ID numbers. Individual |
| 254 | blocks are referenced using the following syntax: |
| 255 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 256 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 257 | |
Francis Visoiu Mistrih | ca0df55 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 258 | %bb.<id> |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 259 | |
Francis Visoiu Mistrih | ca0df55 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 260 | Example: |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 261 | |
| 262 | .. code-block:: llvm |
| 263 | |
| 264 | %bb.0 |
Francis Visoiu Mistrih | ca0df55 | 2017-12-04 17:18:51 +0000 | [diff] [blame] | 265 | |
| 266 | The following syntax is also supported, but the former syntax is preferred for |
| 267 | block references: |
| 268 | |
| 269 | .. code-block:: text |
| 270 | |
| 271 | %bb.<id>[.<name>] |
| 272 | |
| 273 | Example: |
| 274 | |
| 275 | .. code-block:: llvm |
| 276 | |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 277 | %bb.1.then |
| 278 | |
| 279 | Successors |
| 280 | ^^^^^^^^^^ |
| 281 | |
| 282 | The machine basic block's successors have to be specified before any of the |
| 283 | instructions: |
| 284 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 285 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 286 | |
| 287 | bb.0.entry: |
| 288 | successors: %bb.1.then, %bb.2.else |
| 289 | <instructions> |
| 290 | bb.1.then: |
| 291 | <instructions> |
| 292 | bb.2.else: |
| 293 | <instructions> |
| 294 | |
| 295 | The branch weights can be specified in brackets after the successor blocks. |
| 296 | The example below defines a block that has two successors with branch weights |
| 297 | of 32 and 16: |
| 298 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 299 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 300 | |
| 301 | bb.0.entry: |
| 302 | successors: %bb.1.then(32), %bb.2.else(16) |
| 303 | |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 304 | .. _bb-liveins: |
| 305 | |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 306 | Live In Registers |
| 307 | ^^^^^^^^^^^^^^^^^ |
| 308 | |
| 309 | The machine basic block's live in registers have to be specified before any of |
| 310 | the instructions: |
| 311 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 312 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 313 | |
| 314 | bb.0.entry: |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 315 | liveins: $edi, $esi |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 316 | |
| 317 | The list of live in registers and successors can be empty. The language also |
| 318 | allows multiple live in register and successor lists - they are combined into |
| 319 | one list by the parser. |
| 320 | |
| 321 | Miscellaneous Attributes |
| 322 | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 323 | |
| 324 | The attributes ``IsAddressTaken``, ``IsLandingPad`` and ``Alignment`` can be |
| 325 | specified in brackets after the block's definition: |
| 326 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 327 | .. code-block:: text |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 328 | |
| 329 | bb.0.entry (address-taken): |
| 330 | <instructions> |
| 331 | bb.2.else (align 4): |
| 332 | <instructions> |
| 333 | bb.3(landing-pad, align 4): |
| 334 | <instructions> |
| 335 | |
| 336 | .. TODO: Describe the way the reference to an unnamed LLVM IR block can be |
| 337 | preserved. |
| 338 | |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 339 | Machine Instructions |
| 340 | -------------------- |
| 341 | |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 342 | A machine instruction is composed of a name, |
| 343 | :ref:`machine operands <machine-operands>`, |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 344 | :ref:`instruction flags <instruction-flags>`, and machine memory operands. |
| 345 | |
| 346 | The instruction's name is usually specified before the operands. The example |
| 347 | below shows an instance of the X86 ``RETQ`` instruction with a single machine |
| 348 | operand: |
| 349 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 350 | .. code-block:: text |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 351 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 352 | RETQ $eax |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 353 | |
| 354 | However, if the machine instruction has one or more explicitly defined register |
| 355 | operands, the instruction's name has to be specified after them. The example |
| 356 | below shows an instance of the AArch64 ``LDPXpost`` instruction with three |
| 357 | defined register operands: |
| 358 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 359 | .. code-block:: text |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 360 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 361 | $sp, $fp, $lr = LDPXpost $sp, 2 |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 362 | |
| 363 | The instruction names are serialized using the exact definitions from the |
| 364 | target's ``*InstrInfo.td`` files, and they are case sensitive. This means that |
| 365 | similar instruction names like ``TSTri`` and ``tSTRi`` represent different |
| 366 | machine instructions. |
| 367 | |
| 368 | .. _instruction-flags: |
| 369 | |
| 370 | Instruction Flags |
| 371 | ^^^^^^^^^^^^^^^^^ |
| 372 | |
Francis Visoiu Mistrih | 4e1cf66 | 2018-01-09 11:33:22 +0000 | [diff] [blame] | 373 | The flag ``frame-setup`` or ``frame-destroy`` can be specified before the |
| 374 | instruction's name: |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 375 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 376 | .. code-block:: text |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 377 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 378 | $fp = frame-setup ADDXri $sp, 0, 0 |
Alex Lorenz | ded00c7 | 2015-08-21 17:26:38 +0000 | [diff] [blame] | 379 | |
Francis Visoiu Mistrih | 4e1cf66 | 2018-01-09 11:33:22 +0000 | [diff] [blame] | 380 | .. code-block:: text |
| 381 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 382 | $x21, $x20 = frame-destroy LDPXi $sp |
Francis Visoiu Mistrih | 4e1cf66 | 2018-01-09 11:33:22 +0000 | [diff] [blame] | 383 | |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 384 | .. _registers: |
| 385 | |
Francis Visoiu Mistrih | 1f2edf6 | 2018-01-10 17:53:16 +0000 | [diff] [blame] | 386 | Bundled Instructions |
| 387 | ^^^^^^^^^^^^^^^^^^^^ |
| 388 | |
| 389 | The syntax for bundled instructions is the following: |
| 390 | |
| 391 | .. code-block:: text |
| 392 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 393 | BUNDLE implicit-def $r0, implicit-def $r1, implicit $r2 { |
| 394 | $r0 = SOME_OP $r2 |
| 395 | $r1 = ANOTHER_OP internal $r0 |
Francis Visoiu Mistrih | 1f2edf6 | 2018-01-10 17:53:16 +0000 | [diff] [blame] | 396 | } |
| 397 | |
| 398 | The first instruction is often a bundle header. The instructions between ``{`` |
| 399 | and ``}`` are bundled with the first instruction. |
| 400 | |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 401 | Registers |
| 402 | --------- |
| 403 | |
| 404 | Registers are one of the key primitives in the machine instructions |
Hiroshi Inoue | 96dcb66 | 2018-06-15 05:10:09 +0000 | [diff] [blame] | 405 | serialization language. They are primarily used in the |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 406 | :ref:`register machine operands <register-operands>`, |
| 407 | but they can also be used in a number of other places, like the |
| 408 | :ref:`basic block's live in list <bb-liveins>`. |
| 409 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 410 | The physical registers are identified by their name and by the '$' prefix sigil. |
| 411 | They use the following syntax: |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 412 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 413 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 414 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 415 | $<name> |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 416 | |
| 417 | The example below shows three X86 physical registers: |
| 418 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 419 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 420 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 421 | $eax |
| 422 | $r15 |
| 423 | $eflags |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 424 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 425 | The virtual registers are identified by their ID number and by the '%' sigil. |
| 426 | They use the following syntax: |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 427 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 428 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 429 | |
| 430 | %<id> |
| 431 | |
| 432 | Example: |
| 433 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 434 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 435 | |
| 436 | %0 |
| 437 | |
| 438 | The null registers are represented using an underscore ('``_``'). They can also be |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 439 | represented using a '``$noreg``' named register, although the former syntax |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 440 | is preferred. |
| 441 | |
| 442 | .. _machine-operands: |
| 443 | |
| 444 | Machine Operands |
| 445 | ---------------- |
| 446 | |
Chandler Carruth | e90d440 | 2018-08-16 23:11:05 +0000 | [diff] [blame] | 447 | There are seventeen different kinds of machine operands, and all of them can be |
| 448 | serialized. |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 449 | |
| 450 | Immediate Operands |
| 451 | ^^^^^^^^^^^^^^^^^^ |
| 452 | |
| 453 | The immediate machine operands are untyped, 64-bit signed integers. The |
| 454 | example below shows an instance of the X86 ``MOV32ri`` instruction that has an |
| 455 | immediate machine operand ``-42``: |
| 456 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 457 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 458 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 459 | $eax = MOV32ri -42 |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 460 | |
Francis Visoiu Mistrih | e28484a | 2017-12-08 22:53:21 +0000 | [diff] [blame] | 461 | An immediate operand is also used to represent a subregister index when the |
| 462 | machine instruction has one of the following opcodes: |
| 463 | |
| 464 | - ``EXTRACT_SUBREG`` |
| 465 | |
| 466 | - ``INSERT_SUBREG`` |
| 467 | |
| 468 | - ``REG_SEQUENCE`` |
| 469 | |
| 470 | - ``SUBREG_TO_REG`` |
| 471 | |
| 472 | In case this is true, the Machine Operand is printed according to the target. |
| 473 | |
| 474 | For example: |
| 475 | |
| 476 | In AArch64RegisterInfo.td: |
| 477 | |
| 478 | .. code-block:: text |
| 479 | |
| 480 | def sub_32 : SubRegIndex<32>; |
| 481 | |
| 482 | If the third operand is an immediate with the value ``15`` (target-dependent |
| 483 | value), based on the instruction's opcode and the operand's index the operand |
| 484 | will be printed as ``%subreg.sub_32``: |
| 485 | |
| 486 | .. code-block:: text |
| 487 | |
| 488 | %1:gpr64 = SUBREG_TO_REG 0, %0, %subreg.sub_32 |
| 489 | |
Francis Visoiu Mistrih | ab9bb80 | 2017-12-08 11:40:06 +0000 | [diff] [blame] | 490 | For integers > 64bit, we use a special machine operand, ``MO_CImmediate``, |
| 491 | which stores the immediate in a ``ConstantInt`` using an ``APInt`` (LLVM's |
| 492 | arbitrary precision integers). |
| 493 | |
| 494 | .. TODO: Describe the FPIMM immediate operands. |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 495 | |
| 496 | .. _register-operands: |
| 497 | |
| 498 | Register Operands |
| 499 | ^^^^^^^^^^^^^^^^^ |
| 500 | |
| 501 | The :ref:`register <registers>` primitive is used to represent the register |
| 502 | machine operands. The register operands can also have optional |
| 503 | :ref:`register flags <register-flags>`, |
Alex Lorenz | 0aeea88 | 2015-09-08 11:39:47 +0000 | [diff] [blame] | 504 | :ref:`a subregister index <subregister-indices>`, |
| 505 | and a reference to the tied register operand. |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 506 | The full syntax of a register operand is shown below: |
| 507 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 508 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 509 | |
| 510 | [<flags>] <register> [ :<subregister-idx-name> ] [ (tied-def <tied-op>) ] |
| 511 | |
| 512 | This example shows an instance of the X86 ``XOR32rr`` instruction that has |
| 513 | 5 register operands with different register flags: |
| 514 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 515 | .. code-block:: text |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 516 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 517 | dead $eax = XOR32rr undef $eax, undef $eax, implicit-def dead $eflags, implicit-def $al |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 518 | |
| 519 | .. _register-flags: |
| 520 | |
| 521 | Register Flags |
| 522 | ~~~~~~~~~~~~~~ |
| 523 | |
| 524 | The table below shows all of the possible register flags along with the |
| 525 | corresponding internal ``llvm::RegState`` representation: |
| 526 | |
| 527 | .. list-table:: |
| 528 | :header-rows: 1 |
| 529 | |
| 530 | * - Flag |
| 531 | - Internal Value |
| 532 | |
| 533 | * - ``implicit`` |
| 534 | - ``RegState::Implicit`` |
| 535 | |
| 536 | * - ``implicit-def`` |
| 537 | - ``RegState::ImplicitDefine`` |
| 538 | |
| 539 | * - ``def`` |
| 540 | - ``RegState::Define`` |
| 541 | |
| 542 | * - ``dead`` |
| 543 | - ``RegState::Dead`` |
| 544 | |
| 545 | * - ``killed`` |
| 546 | - ``RegState::Kill`` |
| 547 | |
| 548 | * - ``undef`` |
| 549 | - ``RegState::Undef`` |
| 550 | |
| 551 | * - ``internal`` |
| 552 | - ``RegState::InternalRead`` |
| 553 | |
| 554 | * - ``early-clobber`` |
| 555 | - ``RegState::EarlyClobber`` |
| 556 | |
| 557 | * - ``debug-use`` |
| 558 | - ``RegState::Debug`` |
Alex Lorenz | bd978a4 | 2015-08-15 01:06:06 +0000 | [diff] [blame] | 559 | |
Geoff Berry | 3b391fe | 2017-12-12 17:53:59 +0000 | [diff] [blame] | 560 | * - ``renamable`` |
| 561 | - ``RegState::Renamable`` |
| 562 | |
Alex Lorenz | 0aeea88 | 2015-09-08 11:39:47 +0000 | [diff] [blame] | 563 | .. _subregister-indices: |
| 564 | |
| 565 | Subregister Indices |
| 566 | ~~~~~~~~~~~~~~~~~~~ |
| 567 | |
| 568 | The register machine operands can reference a portion of a register by using |
| 569 | the subregister indices. The example below shows an instance of the ``COPY`` |
| 570 | pseudo instruction that uses the X86 ``sub_8bit`` subregister index to copy 8 |
| 571 | lower bits from the 32-bit virtual register 0 to the 8-bit virtual register 1: |
| 572 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 573 | .. code-block:: text |
Alex Lorenz | 0aeea88 | 2015-09-08 11:39:47 +0000 | [diff] [blame] | 574 | |
| 575 | %1 = COPY %0:sub_8bit |
| 576 | |
| 577 | The names of the subregister indices are target specific, and are typically |
| 578 | defined in the target's ``*RegisterInfo.td`` file. |
| 579 | |
Francis Visoiu Mistrih | c846909 | 2017-12-13 10:30:45 +0000 | [diff] [blame] | 580 | Constant Pool Indices |
| 581 | ^^^^^^^^^^^^^^^^^^^^^ |
| 582 | |
| 583 | A constant pool index (CPI) operand is printed using its index in the |
| 584 | function's ``MachineConstantPool`` and an offset. |
| 585 | |
| 586 | For example, a CPI with the index 1 and offset 8: |
| 587 | |
| 588 | .. code-block:: text |
| 589 | |
| 590 | %1:gr64 = MOV64ri %const.1 + 8 |
| 591 | |
| 592 | For a CPI with the index 0 and offset -12: |
| 593 | |
| 594 | .. code-block:: text |
| 595 | |
| 596 | %1:gr64 = MOV64ri %const.0 - 12 |
| 597 | |
| 598 | A constant pool entry is bound to a LLVM IR ``Constant`` or a target-specific |
| 599 | ``MachineConstantPoolValue``. When serializing all the function's constants the |
| 600 | following format is used: |
| 601 | |
| 602 | .. code-block:: text |
| 603 | |
| 604 | constants: |
| 605 | - id: <index> |
| 606 | value: <value> |
| 607 | alignment: <alignment> |
| 608 | isTargetSpecific: <target-specific> |
| 609 | |
| 610 | where ``<index>`` is a 32-bit unsigned integer, ``<value>`` is a `LLVM IR Constant |
| 611 | <https://www.llvm.org/docs/LangRef.html#constants>`_, alignment is a 32-bit |
| 612 | unsigned integer, and ``<target-specific>`` is either true or false. |
| 613 | |
| 614 | Example: |
| 615 | |
| 616 | .. code-block:: text |
| 617 | |
| 618 | constants: |
| 619 | - id: 0 |
| 620 | value: 'double 3.250000e+00' |
| 621 | alignment: 8 |
| 622 | - id: 1 |
| 623 | value: 'g-(LPC0+8)' |
| 624 | alignment: 4 |
| 625 | isTargetSpecific: true |
| 626 | |
Alex Lorenz | 1fd5773 | 2015-09-08 11:38:16 +0000 | [diff] [blame] | 627 | Global Value Operands |
| 628 | ^^^^^^^^^^^^^^^^^^^^^ |
| 629 | |
| 630 | The global value machine operands reference the global values from the |
| 631 | :ref:`embedded LLVM IR module <embedded-module>`. |
| 632 | The example below shows an instance of the X86 ``MOV64rm`` instruction that has |
| 633 | a global value operand named ``G``: |
| 634 | |
Renato Golin | 88ea57f | 2016-07-20 12:16:38 +0000 | [diff] [blame] | 635 | .. code-block:: text |
Alex Lorenz | 1fd5773 | 2015-09-08 11:38:16 +0000 | [diff] [blame] | 636 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 637 | $rax = MOV64rm $rip, 1, _, @G, _ |
Alex Lorenz | 1fd5773 | 2015-09-08 11:38:16 +0000 | [diff] [blame] | 638 | |
| 639 | The named global values are represented using an identifier with the '@' prefix. |
| 640 | If the identifier doesn't match the regular expression |
| 641 | `[-a-zA-Z$._][-a-zA-Z$._0-9]*`, then this identifier must be quoted. |
| 642 | |
| 643 | The unnamed global values are represented using an unsigned numeric value with |
| 644 | the '@' prefix, like in the following examples: ``@0``, ``@989``. |
| 645 | |
Francis Visoiu Mistrih | 2b16863 | 2017-12-13 10:30:51 +0000 | [diff] [blame] | 646 | Target-dependent Index Operands |
| 647 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 648 | |
| 649 | A target index operand is a target-specific index and an offset. The |
| 650 | target-specific index is printed using target-specific names and a positive or |
| 651 | negative offset. |
| 652 | |
| 653 | For example, the ``amdgpu-constdata-start`` is associated with the index ``0`` |
| 654 | in the AMDGPU backend. So if we have a target index operand with the index 0 |
| 655 | and the offset 8: |
| 656 | |
| 657 | .. code-block:: text |
| 658 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 659 | $sgpr2 = S_ADD_U32 _, target-index(amdgpu-constdata-start) + 8, implicit-def _, implicit-def _ |
Francis Visoiu Mistrih | 2b16863 | 2017-12-13 10:30:51 +0000 | [diff] [blame] | 660 | |
Francis Visoiu Mistrih | d347e97 | 2017-12-13 10:30:59 +0000 | [diff] [blame] | 661 | Jump-table Index Operands |
| 662 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 663 | |
| 664 | A jump-table index operand with the index 0 is printed as following: |
| 665 | |
| 666 | .. code-block:: text |
| 667 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 668 | tBR_JTr killed $r0, %jump-table.0 |
Francis Visoiu Mistrih | d347e97 | 2017-12-13 10:30:59 +0000 | [diff] [blame] | 669 | |
| 670 | A machine jump-table entry contains a list of ``MachineBasicBlocks``. When serializing all the function's jump-table entries, the following format is used: |
| 671 | |
| 672 | .. code-block:: text |
| 673 | |
| 674 | jumpTable: |
| 675 | kind: <kind> |
| 676 | entries: |
| 677 | - id: <index> |
| 678 | blocks: [ <bbreference>, <bbreference>, ... ] |
| 679 | |
| 680 | where ``<kind>`` is describing how the jump table is represented and emitted (plain address, relocations, PIC, etc.), and each ``<index>`` is a 32-bit unsigned integer and ``blocks`` contains a list of :ref:`machine basic block references <block-references>`. |
| 681 | |
| 682 | Example: |
| 683 | |
| 684 | .. code-block:: text |
| 685 | |
| 686 | jumpTable: |
| 687 | kind: inline |
| 688 | entries: |
| 689 | - id: 0 |
| 690 | blocks: [ '%bb.3', '%bb.9', '%bb.4.d3' ] |
| 691 | - id: 1 |
| 692 | blocks: [ '%bb.7', '%bb.7', '%bb.4.d3', '%bb.5' ] |
| 693 | |
Francis Visoiu Mistrih | d398775 | 2017-12-14 10:02:58 +0000 | [diff] [blame] | 694 | External Symbol Operands |
| 695 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 696 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 697 | An external symbol operand is represented using an identifier with the ``&`` |
Francis Visoiu Mistrih | d398775 | 2017-12-14 10:02:58 +0000 | [diff] [blame] | 698 | prefix. The identifier is surrounded with ""'s and escaped if it has any |
| 699 | special non-printable characters in it. |
| 700 | |
| 701 | Example: |
| 702 | |
| 703 | .. code-block:: text |
| 704 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 705 | CALL64pcrel32 &__stack_chk_fail, csr_64, implicit $rsp, implicit-def $rsp |
Francis Visoiu Mistrih | d398775 | 2017-12-14 10:02:58 +0000 | [diff] [blame] | 706 | |
Francis Visoiu Mistrih | ee30ab7 | 2017-12-14 10:03:23 +0000 | [diff] [blame] | 707 | MCSymbol Operands |
| 708 | ^^^^^^^^^^^^^^^^^ |
| 709 | |
| 710 | A MCSymbol operand is holding a pointer to a ``MCSymbol``. For the limitations |
| 711 | of this operand in MIR, see :ref:`limitations <limitations>`. |
| 712 | |
| 713 | The syntax is: |
| 714 | |
| 715 | .. code-block:: text |
| 716 | |
| 717 | EH_LABEL <mcsymbol Ltmp1> |
Francis Visoiu Mistrih | d398775 | 2017-12-14 10:02:58 +0000 | [diff] [blame] | 718 | |
Francis Visoiu Mistrih | fcfc7b2 | 2017-12-19 16:51:52 +0000 | [diff] [blame] | 719 | CFIIndex Operands |
| 720 | ^^^^^^^^^^^^^^^^^ |
| 721 | |
| 722 | A CFI Index operand is holding an index into a per-function side-table, |
| 723 | ``MachineFunction::getFrameInstructions()``, which references all the frame |
| 724 | instructions in a ``MachineFunction``. A ``CFI_INSTRUCTION`` may look like it |
| 725 | contains multiple operands, but the only operand it contains is the CFI Index. |
| 726 | The other operands are tracked by the ``MCCFIInstruction`` object. |
| 727 | |
| 728 | The syntax is: |
| 729 | |
| 730 | .. code-block:: text |
| 731 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 732 | CFI_INSTRUCTION offset $w30, -16 |
Francis Visoiu Mistrih | fcfc7b2 | 2017-12-19 16:51:52 +0000 | [diff] [blame] | 733 | |
| 734 | which may be emitted later in the MC layer as: |
| 735 | |
| 736 | .. code-block:: text |
| 737 | |
| 738 | .cfi_offset w30, -16 |
| 739 | |
Francis Visoiu Mistrih | 43c2ba7 | 2017-12-19 21:47:05 +0000 | [diff] [blame] | 740 | IntrinsicID Operands |
| 741 | ^^^^^^^^^^^^^^^^^^^^ |
| 742 | |
| 743 | An Intrinsic ID operand contains a generic intrinsic ID or a target-specific ID. |
| 744 | |
| 745 | The syntax for the ``returnaddress`` intrinsic is: |
| 746 | |
| 747 | .. code-block:: text |
| 748 | |
Puyan Lotfi | 9e2cb42 | 2018-03-12 14:51:19 +0000 | [diff] [blame] | 749 | $x0 = COPY intrinsic(@llvm.returnaddress) |
Francis Visoiu Mistrih | 43c2ba7 | 2017-12-19 21:47:05 +0000 | [diff] [blame] | 750 | |
Francis Visoiu Mistrih | 234b36e | 2017-12-19 21:47:10 +0000 | [diff] [blame] | 751 | Predicate Operands |
| 752 | ^^^^^^^^^^^^^^^^^^ |
| 753 | |
| 754 | A Predicate operand contains an IR predicate from ``CmpInst::Predicate``, like |
| 755 | ``ICMP_EQ``, etc. |
| 756 | |
| 757 | For an int eq predicate ``ICMP_EQ``, the syntax is: |
| 758 | |
| 759 | .. code-block:: text |
| 760 | |
| 761 | %2:gpr(s32) = G_ICMP intpred(eq), %0, %1 |
| 762 | |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 763 | .. TODO: Describe the parsers default behaviour when optional YAML attributes |
| 764 | are missing. |
Alex Lorenz | 5e825f6 | 2015-08-21 21:17:01 +0000 | [diff] [blame] | 765 | .. TODO: Describe the syntax for virtual register YAML definitions. |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 766 | .. TODO: Describe the machine function's YAML flag attributes. |
Francis Visoiu Mistrih | d398775 | 2017-12-14 10:02:58 +0000 | [diff] [blame] | 767 | .. TODO: Describe the syntax for the register mask machine operands. |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 768 | .. TODO: Describe the frame information YAML mapping. |
| 769 | .. TODO: Describe the syntax of the stack object machine operands and their |
| 770 | YAML definitions. |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 771 | .. TODO: Describe the syntax of the block address machine operands. |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 772 | .. TODO: Describe the syntax of the metadata machine operands, and the |
| 773 | instructions debug location attribute. |
Alex Lorenz | 32dcc28 | 2015-08-06 22:55:19 +0000 | [diff] [blame] | 774 | .. TODO: Describe the syntax of the register live out machine operands. |
| 775 | .. TODO: Describe the syntax of the machine memory operands. |