From: Chris Lattner Date: Mon, 23 Nov 2009 16:38:54 +0000 (+0000) Subject: add a helper X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c46530b6a32a53edf0d6d32bcd09ea5d76940472;p=oota-llvm.git add a helper git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89662 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index 0b3199d234d..2d43bddf7e0 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.