diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-24 15:52:52 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-24 15:52:52 +0000 |
commit | aa76e9e2cf50af190de90bc778b7f7e42ef9ceff (patch) | |
tree | 5206b0fb0ac695e3ab1c9cf434b5a85195abf336 /include/llvm/Analysis | |
parent | 3575222175b4982f380ff291bb17be67aadc0966 (diff) | |
download | external_llvm-aa76e9e2cf50af190de90bc778b7f7e42ef9ceff.tar.gz external_llvm-aa76e9e2cf50af190de90bc778b7f7e42ef9ceff.tar.bz2 external_llvm-aa76e9e2cf50af190de90bc778b7f7e42ef9ceff.zip |
Add in support for getIntPtrType to get the pointer type based on the address space.
This checkin also adds in some tests that utilize these paths and updates some of the
clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/MemoryBuiltins.h | 5 | ||||
-rw-r--r-- | include/llvm/Analysis/ScalarEvolution.h | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/Analysis/MemoryBuiltins.h b/include/llvm/Analysis/MemoryBuiltins.h index a842898e41..9e5d97dd7f 100644 --- a/include/llvm/Analysis/MemoryBuiltins.h +++ b/include/llvm/Analysis/MemoryBuiltins.h @@ -168,7 +168,8 @@ class ObjectSizeOffsetVisitor public: ObjectSizeOffsetVisitor(const DataLayout *TD, const TargetLibraryInfo *TLI, - LLVMContext &Context, bool RoundToAlign = false); + LLVMContext &Context, bool RoundToAlign = false, + unsigned AS = 0); SizeOffsetType compute(Value *V); @@ -229,7 +230,7 @@ class ObjectSizeOffsetEvaluator public: ObjectSizeOffsetEvaluator(const DataLayout *TD, const TargetLibraryInfo *TLI, - LLVMContext &Context); + LLVMContext &Context, unsigned AS = 0); SizeOffsetEvalType compute(Value *V); bool knownSize(SizeOffsetEvalType SizeOffset) { diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index 67c9a4d14f..d2df67080c 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -628,7 +628,7 @@ namespace llvm { /// getSizeOfExpr - Return an expression for sizeof on the given type. /// - const SCEV *getSizeOfExpr(Type *AllocTy); + const SCEV *getSizeOfExpr(Type *AllocTy, Type *IntPtrTy); /// getAlignOfExpr - Return an expression for alignof on the given type. /// @@ -636,7 +636,8 @@ namespace llvm { /// getOffsetOfExpr - Return an expression for offsetof on the given field. /// - const SCEV *getOffsetOfExpr(StructType *STy, unsigned FieldNo); + const SCEV *getOffsetOfExpr(StructType *STy, Type *IntPtrTy, + unsigned FieldNo); /// getOffsetOfExpr - Return an expression for offsetof on the given field. /// |