diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-23 16:38:54 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-23 16:38:54 +0000 |
| commit | 03c010bff7008ca11acd4576c058b690d8bc6a03 (patch) | |
| tree | bee63c44a6f0535a756ad31aaee1fd8620dd9e5a | |
| parent | 68761bbb60a826ebd53c006ee75d90dea55fea88 (diff) | |
| download | external_llvm-03c010bff7008ca11acd4576c058b690d8bc6a03.zip external_llvm-03c010bff7008ca11acd4576c058b690d8bc6a03.tar.gz external_llvm-03c010bff7008ca11acd4576c058b690d8bc6a03.tar.bz2 | |
add a helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89662 91177308-0d34-0410-b5e6-96231b3b80d8
| -rw-r--r-- | include/llvm/Analysis/AliasAnalysis.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index 0b3199d..2d43bdd 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -94,6 +94,13 @@ public: virtual AliasResult alias(const Value *V1, unsigned V1Size, const Value *V2, unsigned V2Size); + /// isNoAlias - A trivial helper function to check to see if the specified + /// pointers are no-alias. + bool isNoAlias(const Value *V1, unsigned V1Size, + const Value *V2, unsigned V2Size) { + return alias(V1, V1Size, V2, V2Size) == NoAlias; + } + /// pointsToConstantMemory - If the specified pointer is known to point into /// constant global memory, return true. This allows disambiguation of store /// instructions from constant pointers. |
