From 63b8ab29c420703dc5ef32e6d76d9e4d8f60f19e Mon Sep 17 00:00:00 2001 From: Micah Villmow Date: Tue, 9 Oct 2012 22:27:29 +0000 Subject: Add in some interfaces that will allow easier access to the pointer address space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165554 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/SelectionDAGNodes.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index fd89973263..63d4759265 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -956,7 +956,12 @@ public: const MachinePointerInfo &getPointerInfo() const { return MMO->getPointerInfo(); } - + + /// getAddressSpace - Return the address space for the associated pointer + unsigned getAddressSpace() const { + return getPointerInfo().getAddrSpace(); + } + /// refineAlignment - Update this MemSDNode's MachineMemOperand information /// to reflect the alignment of NewMMO, if it has a greater alignment. /// This must only be used when the new alignment applies to all users of -- cgit v1.2.3