Lines Matching defs:MD
345 auto *MD = dyn_cast<MetadataAsValue>(&Op);
346 if (!MD) {
352 if (isa<LocalAsMetadata>(MD->getMetadata()))
355 EnumerateMetadata(MD->getMetadata());
397 if (auto *MD = dyn_cast<MetadataAsValue>(V))
398 return getMetadataID(MD->getMetadata());
447 const Metadata *MD = I->first;
449 MD->print(OS);
499 void ValueEnumerator::EnumerateNamedMDNode(const NamedMDNode *MD) {
500 for (unsigned i = 0, e = MD->getNumOperands(); i != e; ++i)
501 EnumerateMetadata(MD->getOperand(i));
508 Metadata *MD = N->getOperand(i);
509 if (!MD)
511 assert(!isa<LocalAsMetadata>(MD) && "MDNodes cannot be function-local");
512 EnumerateMetadata(MD);
516 void ValueEnumerator::EnumerateMetadata(const Metadata *MD) {
518 (isa<MDNode>(MD) || isa<MDString>(MD) || isa<ConstantAsMetadata>(MD)) &&
522 // EnumerateMDNodeOperands() from re-visiting MD in a cyclic graph.
525 if (!MDValueMap.insert(std::make_pair(MD, 0)).second)
529 if (auto *N = dyn_cast<MDNode>(MD))
531 else if (auto *C = dyn_cast<ConstantAsMetadata>(MD))
534 HasMDString |= isa<MDString>(MD);
535 HasDILocation |= isa<DILocation>(MD);
536 HasGenericDINode |= isa<GenericDINode>(MD);
540 MDs.push_back(MD);
541 MDValueMap[MD] = MDs.size();
653 if (auto *MD = dyn_cast<MetadataAsValue>(V)) {
654 assert(!isa<LocalAsMetadata>(MD->getMetadata()) &&
657 EnumerateMetadata(MD->getMetadata());
740 if (auto *MD = dyn_cast<MetadataAsValue>(&OI))
741 if (auto *Local = dyn_cast<LocalAsMetadata>(MD->getMetadata()))