diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-30 23:05:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-30 23:05:20 +0000 |
commit | a04096580a65b6cfbe12dabf6d695f7303750c0d (patch) | |
tree | 0dd3f641c599ed0675c9579f72c70fa4c010f872 /include/llvm/Analysis | |
parent | 1fd374e9c1c074c1681336bef31e65f0170b0f7e (diff) | |
download | external_llvm-a04096580a65b6cfbe12dabf6d695f7303750c0d.zip external_llvm-a04096580a65b6cfbe12dabf6d695f7303750c0d.tar.gz external_llvm-a04096580a65b6cfbe12dabf6d695f7303750c0d.tar.bz2 |
teach DSE to use GetPointerBaseWithConstantOffset to analyze
may-aliasing stores that partially overlap with different base
pointers. This implements PR6043 and the non-variable part of
PR8657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/ValueTracking.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index b95749f..953d910 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -102,6 +102,11 @@ namespace llvm { /// base and offset to the caller. Value *GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset, const TargetData &TD); + static inline const Value * + GetPointerBaseWithConstantOffset(const Value *Ptr, int64_t &Offset, + const TargetData &TD) { + return GetPointerBaseWithConstantOffset(const_cast<Value*>(Ptr), Offset,TD); + } /// GetConstantStringInfo - This function computes the length of a /// null-terminated C string pointed to by V. If successful, it returns true |