Update MIRLangRef for MIR syntax change from r244982.
authorAlex Lorenz <arphaman@gmail.com>
Fri, 14 Aug 2015 00:36:10 +0000 (00:36 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 14 Aug 2015 00:36:10 +0000 (00:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244996 91177308-0d34-0410-b5e6-96231b3b80d8

docs/MIRLangRef.rst

index 845b2b754ff0b5c4997fb42429cfa27028ddead0..b3bf3294ef76eeca4ae2d5cd8fc7abb4c334f536 100644 (file)
@@ -64,22 +64,21 @@ Machine Functions
 The remaining YAML documents contain the machine functions. This is an example
 of such YAML document:
 
-.. code-block:: yaml
+.. code-block:: llvm
 
      ---
      name:            inc
      tracksRegLiveness: true
      liveins:
        - { reg: '%rdi' }
-     body:
-       - id:              0
-         name:            entry
-         liveins:         [ '%rdi' ]
-         instructions:
-           - '%eax = MOV32rm %rdi, 1, _, 0, _'
-           - '%eax = INC32r killed %eax, implicit-def dead %eflags'
-           - 'MOV32mr killed %rdi, 1, _, 0, _, %eax'
-           - 'RETQ %eax'
+     body: |
+       bb.0.entry:
+         liveins: %rdi
+
+         %eax = MOV32rm %rdi, 1, _, 0, _
+         %eax = INC32r killed %eax, implicit-def dead %eflags
+         MOV32mr killed %rdi, 1, _, 0, _, %eax
+         RETQ %eax
      ...
 
 The document above consists of attributes that represent the various
@@ -88,12 +87,8 @@ properties and data structures in a machine function.
 The attribute ``name`` is required, and its value should be identical to the
 name of a function that this machine function is based on.
 
-The attribute ``body`` contains a list of YAML mappings that represent the
-function's machine basic blocks.
-
-The first machine basic block in the ``body`` list above contains the attribute
-``instructions``. This attribute stores a list of string literals which
-represent the machine instructions for that basic block.
+The attribute ``body`` is a `YAML block literal string`_. Its value represents
+the function's machine basic blocks and their machine instructions.
 
 .. TODO: Describe the parsers default behaviour when optional YAML attributes
    are missing.