summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-12 20:33:26 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-12 20:33:26 +0000
commit91097a3ffa3557600ca39066e4080a31055d0f76 (patch)
tree78dd54a8f0ee89fd6f744ecda43a16071ee6e5ae /llvm/lib/CodeGen/MIRPrinter.cpp
parent7596bcf726ab348d1e621873d6f79255d34e8ad5 (diff)
downloadbcm5719-llvm-91097a3ffa3557600ca39066e4080a31055d0f76.tar.gz
bcm5719-llvm-91097a3ffa3557600ca39066e4080a31055d0f76.zip
MIR Serialization: Serialize the constant pool pseudo source values.
llvm-svn: 244803
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 8b54a981f8e..d47ed979689 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -704,9 +704,21 @@ void MIPrinter::print(const MachineMemOperand &Op) {
OS << "store ";
}
OS << Op.getSize() << (Op.isLoad() ? " from " : " into ");
- if (const Value *Val = Op.getValue())
+ if (const Value *Val = Op.getValue()) {
printIRValueReference(*Val);
- // TODO: Print PseudoSourceValue.
+ } else {
+ const PseudoSourceValue *PVal = Op.getPseudoValue();
+ assert(PVal && "Expected a pseudo source value");
+ switch (PVal->kind()) {
+ case PseudoSourceValue::ConstantPool:
+ OS << "constant-pool";
+ break;
+ default:
+ // TODO: Print the other pseudo source values.
+ OS << "<unserializable pseudo value>";
+ break;
+ }
+ }
printOffset(Op.getOffset());
if (Op.getBaseAlignment() != Op.getSize())
OS << ", align " << Op.getBaseAlignment();
OpenPOWER on IntegriCloud