示例#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
/// 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
/// 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);
   }
 }
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
void ConstantInt::Profile(FoldingSetNodeID &ID, const Type *Ty,
                          const int &Val) {
  ID.Add(Ty);
  ID.AddInteger(Val);
}
示例#14
0
void ConstantFloat::Profile(FoldingSetNodeID &ID, const Type *Ty,
                            const float &Val) {
  ID.Add(Ty);
  ID.AddInteger((long)Val);
}