diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2011-05-31 20:40:16 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2011-05-31 20:40:16 +0000 |
| commit | 7a5fc693f9463ce27bc729c0daa4b9e0e4d06886 (patch) | |
| tree | 2c603525cffd3526ddc74a5d219e1fed11badedd /llvm/include | |
| parent | f771a0f49081f00a5ed4b656cf15c0c401389998 (diff) | |
| download | bcm5719-llvm-7a5fc693f9463ce27bc729c0daa4b9e0e4d06886.tar.gz bcm5719-llvm-7a5fc693f9463ce27bc729c0daa4b9e0e4d06886.zip | |
llvm.memcpy.* has two distinct associated address spaces; the source address space, and the destination address space. Fix up the interface on MemIntrinsic and MemTransferInst to make this clear, and fix InstructionDereferencesPointer in LazyValueInfo.cpp to use the interface properly.
llvm-svn: 132356
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/IntrinsicInst.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/include/llvm/IntrinsicInst.h b/llvm/include/llvm/IntrinsicInst.h index 74c30fbddd7..24e5fe7845f 100644 --- a/llvm/include/llvm/IntrinsicInst.h +++ b/llvm/include/llvm/IntrinsicInst.h @@ -139,7 +139,7 @@ namespace llvm { return !getVolatileCst()->isZero(); } - unsigned getAddressSpace() const { + unsigned getDestAddressSpace() const { return cast<PointerType>(getRawDest()->getType())->getAddressSpace(); } @@ -227,6 +227,10 @@ namespace llvm { /// value is guaranteed to be a pointer. Value *getSource() const { return getRawSource()->stripPointerCasts(); } + unsigned getSourceAddressSpace() const { + return cast<PointerType>(getRawSource()->getType())->getAddressSpace(); + } + void setSource(Value *Ptr) { assert(getRawSource()->getType() == Ptr->getType() && "setSource called with pointer of wrong type!"); |

