예제 #1
0
/// 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());
}
void
ARMConstantPoolValue::AddSelectionDAGCSEId(FoldingSetNodeID &ID) {
  ID.AddPointer(CVal);
  ID.AddPointer(S);
  ID.AddInteger(LabelId);
  ID.AddInteger(PCAdjust);
}
예제 #3
0
파일: DIE.cpp 프로젝트: baatar/llvm-duetto
/// Profile - Used to gather unique data for the abbreviation folding set.
///
void DIEAbbrev::Profile(FoldingSetNodeID &ID) const {
  ID.AddInteger(Tag);
  ID.AddInteger(ChildrenFlag);

  // For each attribute description.
  for (unsigned i = 0, N = Data.size(); i < N; ++i)
    Data[i].Profile(ID);
}
예제 #4
0
/// Creates a hash-code for the function which is the same for any two
/// functions that will compare equal, without looking at the instructions
/// inside the function.
static unsigned profileFunction(const Function *F) {
  FunctionType *FTy = F->getFunctionType();

  FoldingSetNodeID ID;
  ID.AddInteger(F->size());
  ID.AddInteger(F->getCallingConv());
  ID.AddBoolean(F->hasGC());
  ID.AddBoolean(FTy->isVarArg());
  ID.AddInteger(getTypeIDForHash(FTy->getReturnType()));
  for (unsigned i = 0, e = FTy->getNumParams(); i != e; ++i)
    ID.AddInteger(getTypeIDForHash(FTy->getParamType(i)));
  return ID.ComputeHash();
}
예제 #5
0
/// 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);
}
예제 #6
0
파일: DIE.cpp 프로젝트: baatar/llvm-duetto
/// Profile - Used to gather unique data for the abbreviation folding set.
///
void DIEAbbrevData::Profile(FoldingSetNodeID &ID) const {
  ID.AddInteger(Attribute);
  ID.AddInteger(Form);
}
/// Profile - Used to gather unique data for the folding set.
///
void DWLabel::Profile(FoldingSetNodeID &ID) const {
  ID.AddString(Tag);
  ID.AddInteger(Number);
}
예제 #8
0
파일: DIE.cpp 프로젝트: Bigcheese/llvm
/// Profile - Used to gather unique data for the abbreviation folding set.
///
void DIEAbbrevData::Profile(FoldingSetNodeID &ID) const {
  // Explicitly cast to an integer type for which FoldingSetNodeID has
  // overloads.  Otherwise MSVC 2010 thinks this call is ambiguous.
  ID.AddInteger(unsigned(Attribute));
  ID.AddInteger(unsigned(Form));
}
예제 #9
0
 static void Profile(FoldingSetNodeID &ID, const AttributeWithIndex *Attr,
                     unsigned NumAttrs) {
   for (unsigned i = 0; i != NumAttrs; ++i)
     ID.AddInteger(uint64_t(Attr[i].Attrs) << 32 | unsigned(Attr[i].Index));
 }
예제 #10
0
 static void Profile(FoldingSetNodeID &ID, ArrayRef<AttributeWithIndex> Attrs){
   for (unsigned i = 0, e = Attrs.size(); i != e; ++i) {
     ID.AddInteger(Attrs[i].Attrs.Raw());
     ID.AddInteger(Attrs[i].Index);
   }
 }
예제 #11
0
void SystemZConstantPoolValue::addSelectionDAGCSEId(FoldingSetNodeID &ID) {
  ID.AddPointer(GV);
  ID.AddInteger(Modifier);
}
예제 #12
0
unsigned DenseMapInfo<DebugLoc>::getHashValue(const DebugLoc &Key) {
  FoldingSetNodeID ID;
  ID.AddInteger(Key.LineCol);
  ID.AddInteger(Key.ScopeIdx);
  return ID.ComputeHash();
}
예제 #13
0
파일: Constant.cpp 프로젝트: ezhangle/rhine
void ConstantInt::Profile(FoldingSetNodeID &ID, const Type *Ty,
                          const int &Val) {
  ID.Add(Ty);
  ID.AddInteger(Val);
}
예제 #14
0
파일: Constant.cpp 프로젝트: ezhangle/rhine
void ConstantFloat::Profile(FoldingSetNodeID &ID, const Type *Ty,
                            const float &Val) {
  ID.Add(Ty);
  ID.AddInteger((long)Val);
}