summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-12-14 00:24:02 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-12-14 00:24:02 +0000
commit9bd42e3fab0e67a475bf3d78bcaa65a531e9c729 (patch)
tree11ed96ee559cf1fb738ebab1178ac6760a8e4f45 /lib/CodeGen
parenta73959a988b118832b6c22e8c8dd312ac22a7c77 (diff)
downloadllvm-9bd42e3fab0e67a475bf3d78bcaa65a531e9c729.tar.gz
llvm-9bd42e3fab0e67a475bf3d78bcaa65a531e9c729.tar.bz2
llvm-9bd42e3fab0e67a475bf3d78bcaa65a531e9c729.tar.xz
Print the address space of a MachineMemOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197288 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineInstr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 295b450a0f..8d89276e73 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -481,6 +481,10 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const MachineMemOperand &MMO) {
else
WriteAsOperand(OS, MMO.getValue(), /*PrintType=*/false);
+ unsigned AS = MMO.getAddrSpace();
+ if (AS != 0)
+ OS << "(addrspace=" << AS << ')';
+
// If the alignment of the memory reference itself differs from the alignment
// of the base pointer, print the base alignment explicitly, next to the base
// pointer.