MIR Serialization: Serialize machine basic block operands.
authorAlex Lorenz <arphaman@gmail.com>
Fri, 26 Jun 2015 16:46:11 +0000 (16:46 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 26 Jun 2015 16:46:11 +0000 (16:46 +0000)
commit438a4919fd0c74557a328108bab5b2ba94c371e0
treea77d0f1bad85101ac10880af164d4ae03ae71402
parentb65669cdde5c18b5abf0dfb1f22b9266e6a68196
MIR Serialization: Serialize machine basic block operands.

This commit serializes machine basic block operands. The
machine basic block operands use the following syntax:

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

This commit also modifies the YAML representation for the
machine basic blocks - a new, required field 'id' is added
to the MBB YAML mapping.

The id is used to resolve the MBB references to the
actual MBBs. And while the name of the MBB can be
included in a MBB reference, this name isn't used to
resolve MBB references - as it's possible that multiple
MBBs will reference the same BB and thus they will have the
same name. If the name is specified, the parser will verify
that it is equal to the name of the MBB with the specified id.

Reviewers: Duncan P. N. Exon Smith

Differential Revision: http://reviews.llvm.org/D10608

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240792 91177308-0d34-0410-b5e6-96231b3b80d8
25 files changed:
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 [new file with mode: 0644]
test/CodeGen/MIR/X86/immediate-operands.mir
test/CodeGen/MIR/X86/large-index-number-error.mir [new file with mode: 0644]
test/CodeGen/MIR/X86/machine-basic-block-operands.mir [new file with mode: 0644]
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 [new file with mode: 0644]
test/CodeGen/MIR/X86/unknown-named-machine-basic-block.mir [new file with mode: 0644]
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 [new file with mode: 0644]
test/CodeGen/MIR/machine-basic-block-unknown-name.mir