Lines Matching refs:Dst
157 static ValueMap clone_params(LLVMValueRef Src, LLVMValueRef Dst) { in clone_params() argument
159 if (Count != LLVMCountParams(Dst)) in clone_params()
167 LLVMValueRef DstFirst = LLVMGetFirstParam(Dst); in clone_params()
169 LLVMValueRef DstLast = LLVMGetLastParam(Dst); in clone_params()
239 LLVMValueRef Dst = LLVMGetNamedFunction(M, Name); in clone_constant_impl() local
240 if (Dst) in clone_constant_impl()
241 return Dst; in clone_constant_impl()
248 LLVMValueRef Dst = LLVMGetNamedGlobal(M, Name); in clone_constant_impl() local
249 if (Dst) in clone_constant_impl()
250 return Dst; in clone_constant_impl()
344 FunCloner(LLVMValueRef Src, LLVMValueRef Dst): Fun(Dst), in FunCloner()
345 M(LLVMGetGlobalParent(Fun)), VMap(clone_params(Src, Dst)) {} in FunCloner()
373 auto Dst = CloneInstruction(Src, Builder); in CloneValue() local
375 return Dst; in CloneValue()
378 void CloneAttrs(LLVMValueRef Src, LLVMValueRef Dst) { in CloneAttrs()
386 LLVMAddCallSiteAttribute(Dst, i, A); in CloneAttrs()
415 LLVMValueRef Dst = nullptr; in CloneInstruction() local
422 Dst = LLVMBuildRetVoid(Builder); in CloneInstruction()
424 Dst = LLVMBuildRet(Builder, CloneValue(LLVMGetOperand(Src, 0))); in CloneInstruction()
431 Dst = LLVMBuildBr(Builder, DeclareBB(SrcBB)); in CloneInstruction()
440 Dst = LLVMBuildCondBr(Builder, Cond, ThenBB, ElseBB); in CloneInstruction()
454 Dst = LLVMBuildInvoke(Builder, Fn, Args.data(), ArgCount, in CloneInstruction()
456 CloneAttrs(Src, Dst); in CloneInstruction()
460 Dst = LLVMBuildUnreachable(Builder); in CloneInstruction()
465 Dst = LLVMBuildAdd(Builder, LHS, RHS, Name); in CloneInstruction()
471 Dst = LLVMBuildSub(Builder, LHS, RHS, Name); in CloneInstruction()
477 Dst = LLVMBuildMul(Builder, LHS, RHS, Name); in CloneInstruction()
483 Dst = LLVMBuildUDiv(Builder, LHS, RHS, Name); in CloneInstruction()
489 Dst = LLVMBuildSDiv(Builder, LHS, RHS, Name); in CloneInstruction()
495 Dst = LLVMBuildURem(Builder, LHS, RHS, Name); in CloneInstruction()
501 Dst = LLVMBuildSRem(Builder, LHS, RHS, Name); in CloneInstruction()
507 Dst = LLVMBuildShl(Builder, LHS, RHS, Name); in CloneInstruction()
513 Dst = LLVMBuildLShr(Builder, LHS, RHS, Name); in CloneInstruction()
519 Dst = LLVMBuildAShr(Builder, LHS, RHS, Name); in CloneInstruction()
525 Dst = LLVMBuildAnd(Builder, LHS, RHS, Name); in CloneInstruction()
531 Dst = LLVMBuildOr(Builder, LHS, RHS, Name); in CloneInstruction()
537 Dst = LLVMBuildXor(Builder, LHS, RHS, Name); in CloneInstruction()
542 Dst = LLVMBuildAlloca(Builder, Ty, Name); in CloneInstruction()
547 Dst = LLVMBuildLoad(Builder, Ptr, Name); in CloneInstruction()
548 LLVMSetAlignment(Dst, LLVMGetAlignment(Src)); in CloneInstruction()
554 Dst = LLVMBuildStore(Builder, Val, Ptr); in CloneInstruction()
555 LLVMSetAlignment(Dst, LLVMGetAlignment(Src)); in CloneInstruction()
565 Dst = LLVMBuildInBoundsGEP(Builder, Ptr, Idx.data(), NumIdx, Name); in CloneInstruction()
567 Dst = LLVMBuildGEP(Builder, Ptr, Idx.data(), NumIdx, Name); in CloneInstruction()
578 Dst = LLVMBuildAtomicCmpXchg(Builder, Ptr, Cmp, New, Succ, Fail, in CloneInstruction()
583 Dst = LLVMBuildBitCast(Builder, V, CloneType(Src), Name); in CloneInstruction()
590 Dst = LLVMBuildICmp(Builder, Pred, LHS, RHS, Name); in CloneInstruction()
595 VMap[Src] = Dst = LLVMBuildPhi(Builder, CloneType(Src), Name); in CloneInstruction()
606 LLVMAddIncoming(Dst, Values.data(), Blocks.data(), IncomingCount); in CloneInstruction()
607 return Dst; in CloneInstruction()
615 Dst = LLVMBuildCall(Builder, Fn, Args.data(), ArgCount, Name); in CloneInstruction()
616 LLVMSetTailCall(Dst, LLVMIsTailCall(Src)); in CloneInstruction()
617 CloneAttrs(Src, Dst); in CloneInstruction()
621 Dst = LLVMBuildResume(Builder, CloneValue(LLVMGetOperand(Src, 0))); in CloneInstruction()
626 Dst = LLVMBuildLandingPad(Builder, CloneType(Src), nullptr, 0, Name); in CloneInstruction()
629 LLVMAddClause(Dst, CloneValue(LLVMGetClause(Src, i))); in CloneInstruction()
630 LLVMSetCleanup(Dst, LLVMIsCleanup(Src)); in CloneInstruction()
638 Dst = LLVMBuildExtractValue(Builder, Agg, I, Name); in CloneInstruction()
647 Dst = LLVMBuildInsertValue(Builder, Agg, V, I, Name); in CloneInstruction()
654 if (Dst == nullptr) { in CloneInstruction()
659 check_value_kind(Dst, LLVMInstructionValueKind); in CloneInstruction()
660 return VMap[Src] = Dst; in CloneInstruction()