Home | History | Annotate | Download | only in Utils

Lines Matching refs:Op

212     Metadata &getFwdReference(MDNode &Op);
269 /// If \c Op is already mapped, return the mapping. If it's not an \a
273 /// \return None if \c Op is an unmapped uniqued \a MDNode.
274 /// \post getMappedOp(Op) only returns None if this returns None.
275 Optional<Metadata *> tryToMapOperand(const Metadata *Op);
287 Optional<Metadata *> getMappedOp(const Metadata *Op) const;
431 Value *Op = C->getOperand(OpNo);
432 Mapped = mapValueOrNull(Op);
435 if (Mapped != Op)
516 Optional<Metadata *> MDNodeMapper::tryToMapOperand(const Metadata *Op) {
517 if (!Op)
520 if (Optional<Metadata *> MappedOp = M.mapSimpleMetadata(Op)) {
522 if (auto *CMD = dyn_cast<ConstantAsMetadata>(Op))
524 M.getVM().getMappedMD(Op)) &&
527 assert((isa<MDString>(Op) || M.getVM().getMappedMD(Op)) &&
533 const MDNode &N = *cast<MDNode>(Op);
556 Optional<Metadata *> MDNodeMapper::getMappedOp(const Metadata *Op) const {
557 if (!Op)
560 if (Optional<Metadata *> MappedOp = M.getVM().getMappedMD(Op))
563 if (isa<MDString>(Op))
564 return const_cast<Metadata *>(Op);
566 if (auto *CMD = dyn_cast<ConstantAsMetadata>(Op))
572 Metadata &MDNodeMapper::UniquedGraph::getFwdReference(MDNode &Op) {
573 auto Where = Info.find(&Op);
578 return Op;
582 OpD.Placeholder = Op.clone();
603 MDNode::op_iterator Op; ///< Current operand of \c N.
609 POTWorklistEntry(MDNode &N) : N(&N), Op(N.op_begin()) {}
625 if (MDNode *N = visitOperands(G, WE.Op, WE.N->op_end(), WE.HasChanged)) {
633 assert(WE.Op == WE.N->op_end() && "Expected to visit all operands");
648 Metadata *Op = *I++; // Increment even on early return.
649 if (Optional<Metadata *> MappedOp = tryToMapOperand(Op)) {
651 HasChanged |= Op != *MappedOp;
656 MDNode &OpN = *cast<MDNode>(Op);
674 if (!llvm::any_of(N->operands(), [&](const Metadata *Op) {
675 auto Where = Info.find(Op);
856 for (Use &Op : I->operands()) {
857 Value *V = mapValue(Op);
860 Op = V;
916 for (Use &Op : F.operands())
917 if (Op)
918 Op = mapValue(Op);