diff options
author | Alex Lorenz <arphaman@gmail.com> | 2015-07-27 22:42:41 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2015-07-27 22:42:41 +0000 |
commit | 8a1915b04e68168234ca6463025268d364b31223 (patch) | |
tree | d33a3ddaa8660542b5d51e6ae68849057b5418f3 /llvm/lib/CodeGen/MIRParser/MILexer.cpp | |
parent | 6c6efa1786aab7b41e6cf28855c2da4728435048 (diff) | |
download | bcm5719-llvm-8a1915b04e68168234ca6463025268d364b31223.tar.gz bcm5719-llvm-8a1915b04e68168234ca6463025268d364b31223.zip |
MIR Serialization: Serialize the unnamed basic block references.
This commit serializes the references from the machine basic blocks to the
unnamed basic blocks.
This commit adds a new attribute to the machine basic block's YAML mapping
called 'ir-block'. This attribute contains the actual reference to the
basic block.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 243340
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MILexer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MILexer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MILexer.cpp b/llvm/lib/CodeGen/MIRParser/MILexer.cpp index 2f038ff5684..d730dce6c75 100644 --- a/llvm/lib/CodeGen/MIRParser/MILexer.cpp +++ b/llvm/lib/CodeGen/MIRParser/MILexer.cpp @@ -219,6 +219,10 @@ static Cursor maybeLexConstantPoolItem(Cursor C, MIToken &Token) { return maybeLexIndex(C, Token, "%const.", MIToken::ConstantPoolItem); } +static Cursor maybeLexIRBlock(Cursor C, MIToken &Token) { + return maybeLexIndex(C, Token, "%ir-block.", MIToken::IRBlock); +} + static Cursor lexVirtualRegister(Cursor C, MIToken &Token) { auto Range = C; C.advance(); // Skip '%' @@ -351,6 +355,8 @@ StringRef llvm::lexMIToken( return R.remaining(); if (Cursor R = maybeLexConstantPoolItem(C, Token)) return R.remaining(); + if (Cursor R = maybeLexIRBlock(C, Token)) + return R.remaining(); if (Cursor R = maybeLexRegister(C, Token)) return R.remaining(); if (Cursor R = maybeLexGlobalValue(C, Token, ErrorCallback)) |