[llvm] r244045 - [AA] Use CallSite cast idiom. No functionality change.
Benjamin Kramer
benny.kra at googlemail.com
Wed Aug 5 07:16:45 PDT 2015
Author: d0k
Date: Wed Aug 5 09:16:44 2015
New Revision: 244045
URL: http://llvm.org/viewvc/llvm-project?rev=244045&view=rev
Log:
[AA] Use CallSite cast idiom. No functionality change.
Modified:
llvm/trunk/lib/Analysis/AliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/AliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysis.cpp?rev=244045&r1=244044&r2=244045&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysis.cpp Wed Aug 5 09:16:44 2015
@@ -455,9 +455,8 @@ bool AliasAnalysis::canInstructionRangeM
/// isNoAliasCall - Return true if this pointer is returned by a noalias
/// function.
bool llvm::isNoAliasCall(const Value *V) {
- if (isa<CallInst>(V) || isa<InvokeInst>(V))
- return ImmutableCallSite(cast<Instruction>(V))
- .paramHasAttr(0, Attribute::NoAlias);
+ if (auto CS = ImmutableCallSite(V))
+ return CS.paramHasAttr(0, Attribute::NoAlias);
return false;
}
More information about the llvm-commits
mailing list