summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-12 21:00:22 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-12 21:00:22 +0000
commitd858f874fa8c5e3a48ef160c3f8682e2f5cf6bd7 (patch)
treee4af210705d4bee3c77fd2843cb53f62a83d0438 /llvm/lib
parent9ac4e38a16bd3f7695ec474deeb91c2eec858480 (diff)
downloadbcm5719-llvm-d858f874fa8c5e3a48ef160c3f8682e2f5cf6bd7.tar.gz
bcm5719-llvm-d858f874fa8c5e3a48ef160c3f8682e2f5cf6bd7.zip
MIR Serialization: Serialize the GOT pseudo source values.
llvm-svn: 244809
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MILexer.cpp1
-rw-r--r--llvm/lib/CodeGen/MIRParser/MILexer.h1
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIParser.cpp6
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp3
4 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MILexer.cpp b/llvm/lib/CodeGen/MIRParser/MILexer.cpp
index 8a6a1ff817a..950181bf17d 100644
--- a/llvm/lib/CodeGen/MIRParser/MILexer.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MILexer.cpp
@@ -202,6 +202,7 @@ static MIToken::TokenKind getIdentifierKind(StringRef Identifier) {
.Case("invariant", MIToken::kw_invariant)
.Case("align", MIToken::kw_align)
.Case("stack", MIToken::kw_stack)
+ .Case("got", MIToken::kw_got)
.Case("constant-pool", MIToken::kw_constant_pool)
.Case("liveout", MIToken::kw_liveout)
.Default(MIToken::Identifier);
diff --git a/llvm/lib/CodeGen/MIRParser/MILexer.h b/llvm/lib/CodeGen/MIRParser/MILexer.h
index 2c7a32cf508..beb38d0876f 100644
--- a/llvm/lib/CodeGen/MIRParser/MILexer.h
+++ b/llvm/lib/CodeGen/MIRParser/MILexer.h
@@ -71,6 +71,7 @@ struct MIToken {
kw_invariant,
kw_align,
kw_stack,
+ kw_got,
kw_constant_pool,
kw_liveout,
diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
index 47a9eaf14c3..6dae29a58e3 100644
--- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -1124,6 +1124,9 @@ bool MIParser::parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV) {
case MIToken::kw_stack:
PSV = MF.getPSVManager().getStack();
break;
+ case MIToken::kw_got:
+ PSV = MF.getPSVManager().getGOT();
+ break;
case MIToken::kw_constant_pool:
PSV = MF.getPSVManager().getConstantPool();
break;
@@ -1136,7 +1139,8 @@ bool MIParser::parseMemoryPseudoSourceValue(const PseudoSourceValue *&PSV) {
}
bool MIParser::parseMachinePointerInfo(MachinePointerInfo &Dest) {
- if (Token.is(MIToken::kw_constant_pool) || Token.is(MIToken::kw_stack)) {
+ if (Token.is(MIToken::kw_constant_pool) || Token.is(MIToken::kw_stack) ||
+ Token.is(MIToken::kw_got)) {
const PseudoSourceValue *PSV = nullptr;
if (parseMemoryPseudoSourceValue(PSV))
return true;
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 019383cc7cf..83e7b3e5862 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -713,6 +713,9 @@ void MIPrinter::print(const MachineMemOperand &Op) {
case PseudoSourceValue::Stack:
OS << "stack";
break;
+ case PseudoSourceValue::GOT:
+ OS << "got";
+ break;
case PseudoSourceValue::ConstantPool:
OS << "constant-pool";
break;
OpenPOWER on IntegriCloud