[llvm-commits] [llvm] r89662 - /llvm/trunk/include/llvm/Analysis/AliasAnalysis.h
Chris Lattner
sabre at nondot.org
Mon Nov 23 08:38:55 PST 2009
Author: lattner
Date: Mon Nov 23 10:38:54 2009
New Revision: 89662
URL: http://llvm.org/viewvc/llvm-project?rev=89662&view=rev
Log:
add a helper
Modified:
llvm/trunk/include/llvm/Analysis/AliasAnalysis.h
Modified: llvm/trunk/include/llvm/Analysis/AliasAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasAnalysis.h?rev=89662&r1=89661&r2=89662&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasAnalysis.h Mon Nov 23 10:38:54 2009
@@ -94,6 +94,13 @@
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.
More information about the llvm-commits
mailing list