• Home
  • Raw
  • Download

Lines Matching refs:MDNode

203     SmallVector<MDNode *, 16> POT;                  // Post-order traversal.
212 Metadata &getFwdReference(MDNode &Op);
216 SmallVector<MDNode *, 16> DistinctWorklist;
220 SmallVector<MDNode *, 16> POTStorage;
243 Metadata *map(const MDNode &N);
265 Metadata *mapTopLevelUniquedNode(const MDNode &FirstN);
284 MDNode *mapDistinctNode(const MDNode &N);
303 bool createPOT(UniquedGraph &G, const MDNode &FirstN);
312 MDNode *visitOperands(UniquedGraph &G, MDNode::op_iterator &I,
313 MDNode::op_iterator E, bool &HasChanged);
334 void remapOperands(MDNode &N, OperandMapper mapOperand);
533 const MDNode &N = *cast<MDNode>(Op); in tryToMapOperand()
539 MDNode *MDNodeMapper::mapDistinctNode(const MDNode &N) { in mapDistinctNode()
542 DistinctWorklist.push_back(cast<MDNode>( in mapDistinctNode()
545 : M.mapToMetadata(&N, MDNode::replaceWithDistinct(N.clone())))); in mapDistinctNode()
572 Metadata &MDNodeMapper::UniquedGraph::getFwdReference(MDNode &Op) { in getFwdReference()
588 void MDNodeMapper::remapOperands(MDNode &N, OperandMapper mapOperand) { in remapOperands()
602 MDNode *N; ///< Current node.
603 MDNode::op_iterator Op; ///< Current operand of \c N.
609 POTWorklistEntry(MDNode &N) : N(&N), Op(N.op_begin()) {} in POTWorklistEntry()
613 bool MDNodeMapper::createPOT(UniquedGraph &G, const MDNode &FirstN) { in createPOT()
620 Worklist.push_back(POTWorklistEntry(const_cast<MDNode &>(FirstN))); in createPOT()
625 if (MDNode *N = visitOperands(G, WE.Op, WE.N->op_end(), WE.HasChanged)) { in createPOT()
645 MDNode *MDNodeMapper::visitOperands(UniquedGraph &G, MDNode::op_iterator &I, in visitOperands()
646 MDNode::op_iterator E, bool &HasChanged) { in visitOperands()
656 MDNode &OpN = *cast<MDNode>(Op); in visitOperands()
669 for (MDNode *N : POT) { in propagateChanges()
687 SmallVector<MDNode *, 16> CyclicNodes; in mapNodesInPOT()
705 return &G.getFwdReference(*cast<MDNode>(Old)); in mapNodesInPOT()
708 auto *NewN = MDNode::replaceWithUniqued(std::move(ClonedN)); in mapNodesInPOT()
723 Metadata *MDNodeMapper::map(const MDNode &N) { in map()
737 return mapTopLevelUniquedNode(*cast<MDNode>(Old)); in map()
742 Metadata *MDNodeMapper::mapTopLevelUniquedNode(const MDNode &FirstN) { in mapTopLevelUniquedNode()
749 for (const MDNode *N : G.POT) in mapTopLevelUniquedNode()
751 return &const_cast<MDNode &>(FirstN); in mapTopLevelUniquedNode()
801 assert(isa<MDNode>(MD) && "Expected a metadata node"); in mapSimpleMetadata()
813 return MDNodeMapper(*this).map(*cast<MDNode>(MD)); in mapMetadata()
880 SmallVector<std::pair<unsigned, MDNode *>, 4> MDs; in remapInstruction()
883 MDNode *Old = MI.second; in remapInstruction()
884 MDNode *New = cast_or_null<MDNode>(mapMetadata(Old)); in remapInstruction()
921 SmallVector<std::pair<unsigned, MDNode *>, 8> MDs; in remapFunction()
925 F.addMetadata(I.first, *cast<MDNode>(mapMetadata(I.second))); in remapFunction()
1088 MDNode *ValueMapper::mapMDNode(const MDNode &N) { in mapMDNode()
1089 return cast_or_null<MDNode>(mapMetadata(N)); in mapMDNode()