[PATCH] MIR Serialization: Serialize MBB operands.

Alex Lorenz arphaman at gmail.com
Tue Jun 23 15:06:40 PDT 2015


Updated the MBB operand syntax based on Duncan's comments:

The YAML mapping for MBBs now includes a required number field. This number is used when referencing MBBs from machine instructions.

The syntax for basic block operands is now:

  %bb.<number>[.<name>]

The name is purely optional, it's not used for MBB resolution. However, the parser still verifies that the name matches the name of the MBB with the given number.

Examples:

  body:
     - number: 0
        name: entry
        instructions:
           ...
           - 'JG_1 %bb.2.exit'
  
   body:
      - number: 0
         instructions:
            ...
            - 'JG_1 %bb.3'
       - number: 1
         instructions:
            ...
       - number: 3
         instructions:
            ...


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10608

Files:
  include/llvm/CodeGen/MIRYamlMapping.h
  lib/CodeGen/MIRParser/MILexer.cpp
  lib/CodeGen/MIRParser/MILexer.h
  lib/CodeGen/MIRParser/MIParser.cpp
  lib/CodeGen/MIRParser/MIParser.h
  lib/CodeGen/MIRParser/MIRParser.cpp
  lib/CodeGen/MIRPrinter.cpp
  test/CodeGen/MIR/X86/expected-machine-operand.mir
  test/CodeGen/MIR/X86/expected-number-after-bb.mir
  test/CodeGen/MIR/X86/immediate-operands.mir
  test/CodeGen/MIR/X86/large-index-number-error.mir
  test/CodeGen/MIR/X86/machine-basic-block-operands.mir
  test/CodeGen/MIR/X86/machine-instructions.mir
  test/CodeGen/MIR/X86/missing-comma.mir
  test/CodeGen/MIR/X86/missing-instruction.mir
  test/CodeGen/MIR/X86/named-registers.mir
  test/CodeGen/MIR/X86/null-register-operands.mir
  test/CodeGen/MIR/X86/unknown-instruction.mir
  test/CodeGen/MIR/X86/unknown-machine-basic-block.mir
  test/CodeGen/MIR/X86/unknown-named-machine-basic-block.mir
  test/CodeGen/MIR/X86/unknown-register.mir
  test/CodeGen/MIR/X86/unrecognized-character.mir
  test/CodeGen/MIR/basic-blocks.mir
  test/CodeGen/MIR/machine-basic-block-redefinition-error.mir
  test/CodeGen/MIR/machine-basic-block-unknown-name.mir

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10608.28294.patch
Type: text/x-patch
Size: 26575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150623/1decf856/attachment.bin>


More information about the llvm-commits mailing list