[llvm-commits] [llvm] r159145 - /llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
Nuno Lopes
nunoplopes at sapo.pt
Mon Jun 25 09:17:54 PDT 2012
Author: nlopes
Date: Mon Jun 25 11:17:54 2012
New Revision: 159145
URL: http://llvm.org/viewvc/llvm-project?rev=159145&view=rev
Log:
check for the NoAlias attribute through CallSite
Modified:
llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
Modified: llvm/trunk/lib/Analysis/MemoryBuiltins.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryBuiltins.cpp?rev=159145&r1=159144&r2=159145&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryBuiltins.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryBuiltins.cpp Mon Jun 25 11:17:54 2012
@@ -118,8 +118,8 @@
}
static bool hasNoAliasAttr(const Value *V, bool LookThroughBitCast) {
- Function *Callee = getCalledFunction(V, LookThroughBitCast);
- return Callee && Callee->hasFnAttr(Attribute::NoAlias);
+ ImmutableCallSite CS(LookThroughBitCast ? V->stripPointerCasts() : V);
+ return CS && CS.hasFnAttr(Attribute::NoAlias);
}
More information about the llvm-commits
mailing list