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)
commit33f0aef32f92efe150ae18a9a5d2678a064517a3
tree469e6267d09a320280b813753c89e61e5e437a83
parenta67e50c301fc0bf2a0e84a819408354b38e51580
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

llvm-svn: 240792
25 files changed:
llvm/include/llvm/CodeGen/MIRYamlMapping.h
llvm/lib/CodeGen/MIRParser/MILexer.cpp
llvm/lib/CodeGen/MIRParser/MILexer.h
llvm/lib/CodeGen/MIRParser/MIParser.cpp
llvm/lib/CodeGen/MIRParser/MIParser.h
llvm/lib/CodeGen/MIRParser/MIRParser.cpp
llvm/lib/CodeGen/MIRPrinter.cpp
llvm/test/CodeGen/MIR/X86/expected-machine-operand.mir
llvm/test/CodeGen/MIR/X86/expected-number-after-bb.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/immediate-operands.mir
llvm/test/CodeGen/MIR/X86/large-index-number-error.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/machine-basic-block-operands.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/machine-instructions.mir
llvm/test/CodeGen/MIR/X86/missing-comma.mir
llvm/test/CodeGen/MIR/X86/missing-instruction.mir
llvm/test/CodeGen/MIR/X86/named-registers.mir
llvm/test/CodeGen/MIR/X86/null-register-operands.mir
llvm/test/CodeGen/MIR/X86/unknown-instruction.mir
llvm/test/CodeGen/MIR/X86/unknown-machine-basic-block.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/unknown-named-machine-basic-block.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/X86/unknown-register.mir
llvm/test/CodeGen/MIR/X86/unrecognized-character.mir
llvm/test/CodeGen/MIR/basic-blocks.mir
llvm/test/CodeGen/MIR/machine-basic-block-redefinition-error.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/machine-basic-block-unknown-name.mir