当前位置: 首页>>代码示例>>C++>>正文


C++ FoldingSetNodeID::AddPointer方法代码示例

本文整理汇总了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);
}
开发者ID:HenderOrlando,项目名称:clamav-bytecode-compiler,代码行数:7,代码来源:ARMConstantPoolValue.cpp

示例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();
}
开发者ID:crabtw,项目名称:llvm,代码行数:7,代码来源:HexagonCommonGEP.cpp

示例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());
}
开发者ID:CTSRD-CHERI,项目名称:llvm,代码行数:9,代码来源:MachineOperand.cpp

示例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));
}
开发者ID:QuentinFiard,项目名称:llvm,代码行数:8,代码来源:Metadata.cpp

示例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;
}
开发者ID:QuentinFiard,项目名称:llvm,代码行数:50,代码来源:Metadata.cpp

示例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;
}
开发者ID:CPFL,项目名称:guc,代码行数:15,代码来源:LoopDependenceAnalysis.cpp

示例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);
}
开发者ID:jdmdj,项目名称:llvm-work,代码行数:8,代码来源:MachineInstr.cpp

示例8: addSelectionDAGCSEId

void ARMConstantPoolMBB::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
  ID.AddPointer(MBB);
  ARMConstantPoolValue::addSelectionDAGCSEId(ID);
}
开发者ID:AstroVPK,项目名称:LLVM-4.0.0,代码行数:4,代码来源:ARMConstantPoolValue.cpp

示例9: Profile

void SuppressInlineDefensiveChecksVisitor::Profile(FoldingSetNodeID &ID) const {
  static int id = 0;
  ID.AddPointer(&id);
  ID.AddPointer(StartN);
  ID.Add(V);
}
开发者ID:Godin,项目名称:clang,代码行数:6,代码来源:BugReporterVisitors.cpp

示例10: addSelectionDAGCSEId

void SystemZConstantPoolValue::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
  ID.AddPointer(GV);
  ID.AddInteger(Modifier);
}
开发者ID:7heaven,项目名称:softart,代码行数:4,代码来源:SystemZConstantPoolValue.cpp

示例11: addSelectionDAGCSEId

void ARMConstantPoolConstant::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
  ID.AddPointer(CVal);
  for (const auto *GV : GVars)
    ID.AddPointer(GV);
  ARMConstantPoolValue::addSelectionDAGCSEId(ID);
}
开发者ID:BNieuwenhuizen,项目名称:llvm,代码行数:6,代码来源:ARMConstantPoolValue.cpp

示例12: Profile

void MDNode::Profile(FoldingSetNodeID &ID) const {
  for (unsigned i = 0, e = getNumOperands(); i != e; ++i)
    ID.AddPointer(getOperand(i));
  ID.AddBoolean(isFunctionLocal());
}
开发者ID:nickl-,项目名称:xchain-ios,代码行数:5,代码来源:Metadata.cpp

示例13: Profile

void Pointer::Profile(FoldingSetNodeID &ID, const Type *Ty, const Value *Val) {
  ID.Add(Ty);
  ID.AddPointer(Val);
}
开发者ID:ezhangle,项目名称:rhine,代码行数:4,代码来源:Constant.cpp


注:本文中的FoldingSetNodeID::AddPointer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。