本文整理汇总了C++中AliasSet::addPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ AliasSet::addPointer方法的具体用法?C++ AliasSet::addPointer怎么用?C++ AliasSet::addPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AliasSet
的用法示例。
在下文中一共展示了AliasSet::addPointer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyValue
// copyValue - This method should be used whenever a preexisting value in the
// program is copied or cloned, introducing a new value. Note that it is ok for
// clients that use this method to introduce the same value multiple times: if
// the tracker already knows about a value, it will ignore the request.
//
void AliasSetTracker::copyValue(Value *From, Value *To) {
// Notify the alias analysis implementation that this value is copied.
AA.copyValue(From, To);
// First, look up the PointerRec for this pointer.
hash_map<Value*, AliasSet::PointerRec>::iterator I = PointerMap.find(From);
if (I == PointerMap.end() || !I->second.hasAliasSet())
return; // Noop
AliasSet::HashNodePair &Entry = getEntryFor(To);
if (Entry.second.hasAliasSet()) return; // Already in the tracker!
// Add it to the alias set it aliases...
AliasSet *AS = I->second.getAliasSet(*this);
AS->addPointer(*this, Entry, I->second.getSize(), true);
}
示例2: copyValue
// copyValue - This method should be used whenever a preexisting value in the
// program is copied or cloned, introducing a new value. Note that it is ok for
// clients that use this method to introduce the same value multiple times: if
// the tracker already knows about a value, it will ignore the request.
//
void AliasSetTracker::copyValue(Value *From, Value *To) {
// First, look up the PointerRec for this pointer.
PointerMapType::iterator I = PointerMap.find_as(From);
if (I == PointerMap.end())
return; // Noop
assert(I->second->hasAliasSet() && "Dead entry?");
AliasSet::PointerRec &Entry = getEntryFor(To);
if (Entry.hasAliasSet()) return; // Already in the tracker!
// getEntryFor above may invalidate iterator \c I, so reinitialize it.
I = PointerMap.find_as(From);
// Add it to the alias set it aliases...
AliasSet *AS = I->second->getAliasSet(*this);
AS->addPointer(*this, Entry, I->second->getSize(), I->second->getAAInfo(),
true, true);
}
示例3: copyValue
// copyValue - This method should be used whenever a preexisting value in the
// program is copied or cloned, introducing a new value. Note that it is ok for
// clients that use this method to introduce the same value multiple times: if
// the tracker already knows about a value, it will ignore the request.
//
void AliasSetTracker::copyValue(Value *From, Value *To) {
// Notify the alias analysis implementation that this value is copied.
AA.copyValue(From, To);
// First, look up the PointerRec for this pointer.
PointerMapType::iterator I = PointerMap.find(From);
if (I == PointerMap.end())
return; // Noop
assert(I->second->hasAliasSet() && "Dead entry?");
AliasSet::PointerRec &Entry = getEntryFor(To);
if (Entry.hasAliasSet()) return; // Already in the tracker!
// Add it to the alias set it aliases...
I = PointerMap.find(From);
AliasSet *AS = I->second->getAliasSet(*this);
AS->addPointer(*this, Entry, I->second->getSize(), true);
}