mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
MIR Serialization: Initial serialization of machine constant pools.
This commit implements the initial serialization of machine constant pools and the constant pool index machine operands. The constant pool is serialized using a YAML sequence of YAML mappings that represent the constant values. The target-specific constant pool items aren't serialized by this commit. Reviewers: Duncan P. N. Exon Smith git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -211,6 +211,10 @@ static Cursor maybeLexFixedStackObject(Cursor C, MIToken &Token) {
|
||||
return maybeLexIndex(C, Token, "%fixed-stack.", MIToken::FixedStackObject);
|
||||
}
|
||||
|
||||
static Cursor maybeLexConstantPoolItem(Cursor C, MIToken &Token) {
|
||||
return maybeLexIndex(C, Token, "%const.", MIToken::ConstantPoolItem);
|
||||
}
|
||||
|
||||
static Cursor lexVirtualRegister(Cursor C, MIToken &Token) {
|
||||
auto Range = C;
|
||||
C.advance(); // Skip '%'
|
||||
@@ -321,6 +325,8 @@ StringRef llvm::lexMIToken(
|
||||
return R.remaining();
|
||||
if (Cursor R = maybeLexFixedStackObject(C, Token))
|
||||
return R.remaining();
|
||||
if (Cursor R = maybeLexConstantPoolItem(C, Token))
|
||||
return R.remaining();
|
||||
if (Cursor R = maybeLexRegister(C, Token))
|
||||
return R.remaining();
|
||||
if (Cursor R = maybeLexGlobalValue(C, Token, ErrorCallback))
|
||||
|
Reference in New Issue
Block a user