[llvm] r244996 - Update MIRLangRef for MIR syntax change from r244982.

Alex Lorenz via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 17:36:10 PDT 2015


Author: arphaman
Date: Thu Aug 13 19:36:10 2015
New Revision: 244996

URL: http://llvm.org/viewvc/llvm-project?rev=244996&view=rev
Log:
Update MIRLangRef for MIR syntax change from r244982.

Modified:
    llvm/trunk/docs/MIRLangRef.rst

Modified: llvm/trunk/docs/MIRLangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/MIRLangRef.rst?rev=244996&r1=244995&r2=244996&view=diff
==============================================================================
--- llvm/trunk/docs/MIRLangRef.rst (original)
+++ llvm/trunk/docs/MIRLangRef.rst Thu Aug 13 19:36:10 2015
@@ -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 mach
 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.




More information about the llvm-commits mailing list