本文整理汇总了C++中AliasSet::mergeSetIn方法的典型用法代码示例。如果您正苦于以下问题:C++ AliasSet::mergeSetIn方法的具体用法?C++ AliasSet::mergeSetIn怎么用?C++ AliasSet::mergeSetIn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliasSet
的用法示例。
在下文中一共展示了AliasSet::mergeSetIn方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AliasResult
/// mergeAliasSetsForPointer - Given a pointer, merge all alias sets that may
/// alias the pointer. Return the unified set, or nullptr if no set that aliases
/// the pointer was found. MustAliasAll is updated to true/false if the pointer
/// is found to MustAlias all the sets it merged.
AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
LocationSize Size,
const AAMDNodes &AAInfo,
bool &MustAliasAll) {
AliasSet *FoundSet = nullptr;
AliasResult AllAR = MustAlias;
for (iterator I = begin(), E = end(); I != E;) {
iterator Cur = I++;
if (Cur->Forward)
continue;
AliasResult AR = Cur->aliasesPointer(Ptr, Size, AAInfo, AA);
if (AR == NoAlias)
continue;
AllAR =
AliasResult(AllAR & AR); // Possible downgrade to May/Partial, even No
if (!FoundSet) {
// If this is the first alias set ptr can go into, remember it.
FoundSet = &*Cur;
} else {
// Otherwise, we must merge the sets.
FoundSet->mergeSetIn(*Cur, *this);
}
}
MustAliasAll = (AllAR == MustAlias);
return FoundSet;
}
示例2: if
AliasSet *AliasSetTracker::findAliasSetForUnknownInst(Instruction *Inst) {
AliasSet *FoundSet = 0;
for (iterator I = begin(), E = end(); I != E; ++I) {
if (I->Forward || !I->aliasesUnknownInst(Inst, AA))
continue;
if (FoundSet == 0) // If this is the first alias set ptr can go into.
FoundSet = I; // Remember it.
else if (!I->Forward) // Otherwise, we must merge the sets.
FoundSet->mergeSetIn(*I, *this); // Merge in contents.
}
return FoundSet;
}
示例3:
AliasSet *AliasSetTracker::findAliasSetForUnknownInst(Instruction *Inst) {
AliasSet *FoundSet = nullptr;
for (iterator I = begin(), E = end(); I != E;) {
iterator Cur = I++;
if (Cur->Forward || !Cur->aliasesUnknownInst(Inst, AA))
continue;
if (!FoundSet) // If this is the first alias set ptr can go into.
FoundSet = &*Cur; // Remember it.
else // Otherwise, we must merge the sets.
FoundSet->mergeSetIn(*Cur, *this); // Merge in contents.
}
return FoundSet;
}
示例4: if
AliasSet *AliasSetTracker::findAliasSetForCallSite(CallSite CS) {
AliasSet *FoundSet = 0;
for (iterator I = begin(), E = end(); I != E; ++I)
if (!I->Forward && I->aliasesCallSite(CS, AA)) {
if (FoundSet == 0) { // If this is the first alias set ptr can go into.
FoundSet = I; // Remember it.
} else if (!I->Forward) { // Otherwise, we must merge the sets.
FoundSet->mergeSetIn(*I, *this); // Merge in contents.
}
}
return FoundSet;
}
示例5:
/// findAliasSetForPointer - Given a pointer, find the one alias set to put the
/// instruction referring to the pointer into. If there are multiple alias sets
/// that may alias the pointer, merge them together and return the unified set.
///
AliasSet *AliasSetTracker::findAliasSetForPointer(const Value *Ptr,
unsigned Size) {
AliasSet *FoundSet = 0;
for (iterator I = begin(), E = end(); I != E; ++I)
if (!I->Forward && I->aliasesPointer(Ptr, Size, AA)) {
if (FoundSet == 0) { // If this is the first alias set ptr can go into.
FoundSet = I; // Remember it.
} else { // Otherwise, we must merge the sets.
FoundSet->mergeSetIn(*I, *this); // Merge in contents.
}
}
return FoundSet;
}
示例6:
/// findAliasSetForPointer - Given a pointer, find the one alias set to put the
/// instruction referring to the pointer into. If there are multiple alias sets
/// that may alias the pointer, merge them together and return the unified set.
///
AliasSet *AliasSetTracker::findAliasSetForPointer(const Value *Ptr,
uint64_t Size,
const MDNode *TBAAInfo) {
AliasSet *FoundSet = 0;
for (iterator I = begin(), E = end(); I != E; ++I) {
if (I->Forward || !I->aliasesPointer(Ptr, Size, TBAAInfo, AA)) continue;
if (FoundSet == 0) { // If this is the first alias set ptr can go into.
FoundSet = I; // Remember it.
} else { // Otherwise, we must merge the sets.
FoundSet->mergeSetIn(*I, *this); // Merge in contents.
}
}
return FoundSet;
}