Lines Matching defs:MD
84 static bool getVal(MDTuple *MD, const char *Key, uint64_t &Val) {
85 if (!MD)
87 if (MD->getNumOperands() != 2)
89 MDString *KeyMD = dyn_cast<MDString>(MD->getOperand(0));
90 ConstantAsMetadata *ValMD = dyn_cast<ConstantAsMetadata>(MD->getOperand(1));
100 static bool isKeyValuePair(MDTuple *MD, const char *Key, const char *Val) {
101 if (!MD || MD->getNumOperands() != 2)
103 MDString *KeyMD = dyn_cast<MDString>(MD->getOperand(0));
104 MDString *ValMD = dyn_cast<MDString>(MD->getOperand(1));
113 static bool getSummaryFromMD(MDTuple *MD, SummaryEntryVector &Summary) {
114 if (!MD || MD->getNumOperands() != 2)
116 MDString *KeyMD = dyn_cast<MDString>(MD->getOperand(0));
119 MDTuple *EntriesMD = dyn_cast<MDTuple>(MD->getOperand(1));
142 ProfileSummary *ProfileSummary::getFromMD(Metadata *MD) {
143 MDTuple *Tuple = dyn_cast_or_null<MDTuple>(MD);