本文整理汇总了C++中FoldingSetNodeID::AddPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ FoldingSetNodeID::AddPointer方法的具体用法?C++ FoldingSetNodeID::AddPointer怎么用?C++ FoldingSetNodeID::AddPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FoldingSetNodeID
的用法示例。
在下文中一共展示了FoldingSetNodeID::AddPointer方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
ARMConstantPoolValue::AddSelectionDAGCSEId(FoldingSetNodeID &ID) {
ID.AddPointer(CVal);
ID.AddPointer(S);
ID.AddInteger(LabelId);
ID.AddInteger(PCAdjust);
}
示例2: node_hash
static unsigned node_hash(GepNode *N) {
// Include everything except flags and parent.
FoldingSetNodeID ID;
ID.AddPointer(N->Idx);
ID.AddPointer(N->PTy);
return ID.ComputeHash();
}
示例3: Profile
/// Profile - Gather unique data for the object.
///
void MachineMemOperand::Profile(FoldingSetNodeID &ID) const {
ID.AddInteger(getOffset());
ID.AddInteger(Size);
ID.AddPointer(getOpaqueValue());
ID.AddInteger(getFlags());
ID.AddInteger(getBaseAlignment());
}
示例4: Profile
void MDNode::Profile(FoldingSetNodeID &ID) const {
// Add all the operand pointers. Note that we don't have to add the
// isFunctionLocal bit because that's implied by the operands.
// Note that if the operands are later nulled out, the node will be
// removed from the uniquing map.
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
ID.AddPointer(getOperand(i));
}
示例5: switch
MDNode *MDNode::getMDNode(LLVMContext &Context, ArrayRef<Value*> Vals,
FunctionLocalness FL, bool Insert) {
LLVMContextImpl *pImpl = Context.pImpl;
// Add all the operand pointers. Note that we don't have to add the
// isFunctionLocal bit because that's implied by the operands.
// Note that if the operands are later nulled out, the node will be
// removed from the uniquing map.
FoldingSetNodeID ID;
for (unsigned i = 0; i != Vals.size(); ++i)
ID.AddPointer(Vals[i]);
void *InsertPoint;
MDNode *N = pImpl->MDNodeSet.FindNodeOrInsertPos(ID, InsertPoint);
if (N || !Insert)
return N;
bool isFunctionLocal = false;
switch (FL) {
case FL_Unknown:
for (unsigned i = 0; i != Vals.size(); ++i) {
Value *V = Vals[i];
if (!V) continue;
if (isFunctionLocalValue(V)) {
isFunctionLocal = true;
break;
}
}
break;
case FL_No:
isFunctionLocal = false;
break;
case FL_Yes:
isFunctionLocal = true;
break;
}
// Coallocate space for the node and Operands together, then placement new.
void *Ptr = malloc(sizeof(MDNode) + Vals.size() * sizeof(MDNodeOperand));
N = new (Ptr) MDNode(Context, Vals, isFunctionLocal);
// Cache the operand hash.
N->Hash = ID.ComputeHash();
// InsertPoint will have been set by the FindNodeOrInsertPos call.
pImpl->MDNodeSet.InsertNode(N, InsertPoint);
return N;
}
示例6: findOrInsertDependencePair
bool LoopDependenceAnalysis::findOrInsertDependencePair(Value *A,
Value *B,
DependencePair *&P) {
void *insertPos = 0;
FoldingSetNodeID id;
id.AddPointer(A);
id.AddPointer(B);
P = Pairs.FindNodeOrInsertPos(id, insertPos);
if (P) return true;
P = new (PairAllocator) DependencePair(id, A, B);
Pairs.InsertNode(P, insertPos);
return false;
}
示例7: Profile
/// Profile - Gather unique data for the object.
///
void MachineMemOperand::Profile(FoldingSetNodeID &ID) const {
ID.AddInteger(Offset);
ID.AddInteger(Size);
ID.AddPointer(V);
ID.AddInteger(Flags);
}
示例8: addSelectionDAGCSEId
void ARMConstantPoolMBB::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
ID.AddPointer(MBB);
ARMConstantPoolValue::addSelectionDAGCSEId(ID);
}
示例9: Profile
void SuppressInlineDefensiveChecksVisitor::Profile(FoldingSetNodeID &ID) const {
static int id = 0;
ID.AddPointer(&id);
ID.AddPointer(StartN);
ID.Add(V);
}
示例10: addSelectionDAGCSEId
void SystemZConstantPoolValue::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
ID.AddPointer(GV);
ID.AddInteger(Modifier);
}
示例11: addSelectionDAGCSEId
void ARMConstantPoolConstant::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
ID.AddPointer(CVal);
for (const auto *GV : GVars)
ID.AddPointer(GV);
ARMConstantPoolValue::addSelectionDAGCSEId(ID);
}
示例12: Profile
void MDNode::Profile(FoldingSetNodeID &ID) const {
for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
ID.AddPointer(getOperand(i));
ID.AddBoolean(isFunctionLocal());
}
示例13: Profile
void Pointer::Profile(FoldingSetNodeID &ID, const Type *Ty, const Value *Val) {
ID.Add(Ty);
ID.AddPointer(Val);
}