Lines Matching defs:MDNode
47 /// - nullptr is replaced by an empty MDNode.
48 /// - An MDNode with a single null operand is replaced by an empty MDNode.
49 /// - An MDNode whose only operand is a \a ConstantAsMetadata gets skipped.
57 return MDNode::get(Context, None);
59 // Return early if this isn't a single-operand MDNode.
60 auto *N = dyn_cast<MDNode>(MD);
66 return MDNode::get(Context, None);
69 // Look through the MDNode.
159 assert(!(MD && isa<MDNode>(MD) && cast<MDNode>(MD)->isTemporary()) &&
233 auto *OwnerMD = dyn_cast<MDNode>(Owner.get<Metadata *>());
381 // MDNode implementation.
384 // Assert that the MDNode types will not be unaligned by the objects
392 void *MDNode::operator new(size_t Size, unsigned NumOps) {
404 void MDNode::operator delete(void *Mem) {
405 MDNode *N = static_cast<MDNode *>(Mem);
415 MDNode::MDNode(LLVMContext &Context, unsigned ID, StorageType Storage,
437 TempMDNode MDNode::clone() const {
440 llvm_unreachable("Invalid MDNode subclass");
449 if (auto *N = dyn_cast_or_null<MDNode>(Op))
454 unsigned MDNode::countUnresolvedOperands() {
460 void MDNode::makeUniqued() {
476 void MDNode::makeDistinct() {
489 void MDNode::resolve() {
502 void MDNode::resolveAfterOperandChange(Metadata *Old, Metadata *New) {
514 void MDNode::decrementUnresolvedOperandCount() {
520 void MDNode::resolveCycles(bool MDMaterialized) {
529 auto *N = dyn_cast_or_null<MDNode>(Op);
542 static bool hasSelfReference(MDNode
549 MDNode *MDNode::replaceWithPermanentImpl() {
567 MDNode *MDNode::replaceWithUniquedImpl() {
569 MDNode *UniquedNode = uniquify();
582 MDNode *MDNode::replaceWithDistinctImpl() {
591 void MDNode::dropAllReferences() {
600 void MDNode::handleChangedOperand(void *Ref, Metadata *New) {
649 void MDNode::deleteAsSubclass() {
652 llvm_unreachable("Invalid subclass of MDNode");
670 template <class NodeTy> struct MDNode::HasCachedHash {
682 MDNode *MDNode::uniquify() {
688 llvm_unreachable("Invalid or non-uniquable subclass of MDNode");
701 void MDNode::eraseFromStore() {
704 llvm_unreachable("Invalid or non-uniquable subclass of MDNode");
731 void MDNode::deleteTemporary(MDNode *N) {
737 void MDNode::storeDistinctInContext() {
744 llvm_unreachable("Invalid subclass of MDNode");
757 void MDNode::replaceOperandWith(unsigned I, Metadata *New) {
769 void MDNode::setOperand(unsigned I, Metadata *New) {
777 /// MDNode::concatenate() and \a MDNode::intersect() to maintain behaviour from
780 static MDNode *getOrSelfReference(LLVMContext &Context,
783 if (MDNode *N = dyn_cast_or_null<MDNode>(Ops[0]))
787 return MDNode::get(Context, Ops);
791 return MDNode::get(Context, Ops);
794 MDNode *MDNode::concatenate(MDNode *A, MDNode *B) {
810 MDNode *MDNode::intersect(MDNode *A, MDNode *B) {
824 MDNode *MDNode::getMostGenericAliasScope(MDNode *A, MDNode *B) {
838 MDNode *MDNode::getMostGenericFPMath(MDNode *A, MDNode *B) {
886 MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
955 return MDNode::get(A->getContext(), MDs);
958 MDNode *MDNode::getMostGenericAlignmentOrDereferenceable(MDNode *A, MDNode *B) {
990 MDNode *NamedMDNode::getOperand(unsigned i) const {
993 return cast_or_null<MDNode>(N);
996 void NamedMDNode::addOperand(MDNode *M) { getNMDOps(Operands).emplace_back(M); }
998 void NamedMDNode::setOperand(unsigned I, MDNode *New) {
1018 void MDAttachmentMap::set(unsigned ID, MDNode &MD) {
1047 MDNode *MDAttachmentMap::lookup(unsigned ID) const {
1055 SmallVectorImpl<std::pair<unsigned, MDNode *>> &Result) const {
1063 void Instruction::setMetadata(StringRef Kind, MDNode *Node) {
1069 MDNode *Instruction::getMetadataImpl(StringRef Kind) const {
1104 void Instruction::setMetadata(unsigned KindID, MDNode *Node) {
1149 MDNode *Instruction::getMetadataImpl(unsigned KindID) const {
1163 SmallVectorImpl<std::pair<unsigned, MDNode *>> &Result) const {
1182 SmallVectorImpl<std::pair<unsigned, MDNode *>> &Result) const {
1200 MDNode *Function::getMetadata(unsigned KindID) const {
1206 MDNode *Function::getMetadata(StringRef Kind) const {
1212 void Function::setMetadata(unsigned KindID, MDNode *MD) {
1231 void Function::setMetadata(StringRef Kind, MDNode *MD) {
1238 SmallVectorImpl<std::pair<unsigned, MDNode *>> &MDs) const {