本文整理汇总了C++中AliasAnalysis::hasNoModRefInfoForCalls方法的典型用法代码示例。如果您正苦于以下问题:C++ AliasAnalysis::hasNoModRefInfoForCalls方法的具体用法?C++ AliasAnalysis::hasNoModRefInfoForCalls怎么用?C++ AliasAnalysis::hasNoModRefInfoForCalls使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliasAnalysis
的用法示例。
在下文中一共展示了AliasAnalysis::hasNoModRefInfoForCalls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: aliasesPointer
/// aliasesPointer - Return true if the specified pointer "may" (or must)
/// alias one of the members in the set.
///
bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,
AliasAnalysis &AA) const {
if (AliasTy == MustAlias) {
assert(CallSites.empty() && "Illegal must alias set!");
// If this is a set of MustAliases, only check to see if the pointer aliases
// SOME value in the set...
HashNodePair *SomePtr = getSomePointer();
assert(SomePtr && "Empty must-alias set??");
return AA.alias(SomePtr->first, SomePtr->second.getSize(), Ptr, Size);
}
// If this is a may-alias set, we have to check all of the pointers in the set
// to be sure it doesn't alias the set...
for (iterator I = begin(), E = end(); I != E; ++I)
if (AA.alias(Ptr, Size, I.getPointer(), I.getSize()))
return true;
// Check the call sites list and invoke list...
if (!CallSites.empty()) {
if (AA.hasNoModRefInfoForCalls())
return true;
for (unsigned i = 0, e = CallSites.size(); i != e; ++i)
if (AA.getModRefInfo(CallSites[i], const_cast<Value*>(Ptr), Size)
!= AliasAnalysis::NoModRef)
return true;
}
return false;
}
示例2: aliasesCallSite
bool AliasSet::aliasesCallSite(CallSite CS, AliasAnalysis &AA) const {
if (AA.doesNotAccessMemory(CS))
return false;
if (AA.hasNoModRefInfoForCalls())
return true;
for (unsigned i = 0, e = CallSites.size(); i != e; ++i)
if (AA.getModRefInfo(CallSites[i], CS) != AliasAnalysis::NoModRef ||
AA.getModRefInfo(CS, CallSites[i]) != AliasAnalysis::NoModRef)
return true;
for (iterator I = begin(), E = end(); I != E; ++I)
if (AA.getModRefInfo(CS, I.getPointer(), I.getSize()) !=
AliasAnalysis::NoModRef)
return true;
return false;
}