Home | History | Annotate | Download | only in IR

Lines Matching refs:InsertBefore

162                                const Twine &NameStr, Instruction *InsertBefore)
163 : Instruction(RetTy, Instruction::LandingPad, nullptr, 0, InsertBefore) {
188 Instruction *InsertBefore) {
189 return new LandingPadInst(RetTy, NumReservedClauses, NameStr, InsertBefore);
269 Instruction *InsertBefore)
274 1, InsertBefore) {
384 static Instruction *createMalloc(Instruction *InsertBefore,
389 assert(((!InsertBefore && InsertAtEnd) || (InsertBefore && !InsertAtEnd)) &&
390 "createMalloc needs either InsertBefore or InsertAtEnd");
399 if (InsertBefore)
401 "", InsertBefore);
417 if (InsertBefore)
419 "mallocsize", InsertBefore);
428 BasicBlock* BB = InsertBefore ? InsertBefore->getParent() : InsertAtEnd;
438 if (InsertBefore) {
439 MCall = CallInst::Create(MallocFunc, AllocSize, "malloccall", InsertBefore);
443 Result = new BitCastInst(MCall, AllocPtrType, Name, InsertBefore);
469 Instruction *CallInst::CreateMalloc(Instruction *InsertBefore,
474 return createMalloc(InsertBefore, nullptr, IntPtrTy, AllocTy, AllocSize,
494 static Instruction* createFree(Value* Source, Instruction *InsertBefore,
496 assert(((!InsertBefore && InsertAtEnd) || (InsertBefore && !InsertAtEnd)) &&
497 "createFree needs either InsertBefore or InsertAtEnd");
501 BasicBlock* BB = InsertBefore ? InsertBefore->getParent() : InsertAtEnd;
510 if (InsertBefore) {
512 PtrCast = new BitCastInst(Source, IntPtrTy, "", InsertBefore);
513 Result = CallInst::Create(FreeFunc, PtrCast, "", InsertBefore);
527 Instruction * CallInst::CreateFree(Value* Source, Instruction *InsertBefore) {
528 return createFree(Source, InsertBefore, nullptr);
698 ReturnInst::ReturnInst(LLVMContext &C, Value *retVal, Instruction *InsertBefore)
701 InsertBefore) {
744 ResumeInst::ResumeInst(Value *Exn, Instruction *InsertBefore)
746 OperandTraits<ResumeInst>::op_begin(this), 1, InsertBefore) {
793 unsigned Values, Instruction *InsertBefore)
797 Values, InsertBefore) {
838 Instruction *InsertBefore)
841 InsertBefore) {
872 Instruction *InsertBefore)
874 InsertBefore) {
969 const Twine &NameStr, Instruction *InsertBefore)
972 InsertBefore) {
990 Instruction *InsertBefore)
992 nullptr, 0, InsertBefore) {
1021 BranchInst::BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore)
1024 1, InsertBefore) {
1029 Instruction *InsertBefore)
1032 3, InsertBefore) {
1121 AllocaInst::AllocaInst(Type *Ty, const Twine &Name, Instruction *InsertBefore)
1122 : AllocaInst(Ty, /*ArraySize=*/nullptr, Name, InsertBefore) {}
1128 Instruction *InsertBefore)
1129 : AllocaInst(Ty, ArraySize, /*Align=*/0, Name, InsertBefore) {}
1136 const Twine &Name, Instruction *InsertBefore)
1138 getAISize(Ty->getContext(), ArraySize), InsertBefore),
1312 StoreInst::StoreInst(Value *val, Value *addr, Instruction *InsertBefore)
1313 : StoreInst(val, addr, /*isVolatile=*/false, InsertBefore) {}
1319 Instruction *InsertBefore)
1320 : StoreInst(val, addr, isVolatile, /*Align=*/0, InsertBefore) {}
1327 Instruction *InsertBefore)
1329 InsertBefore) {}
1339 Instruction *InsertBefore)
1343 InsertBefore) {
1416 Instruction *InsertBefore)
1421 OperandTraits<AtomicCmpXchgInst>::operands(this), InsertBefore) {
1465 Instruction *InsertBefore)
1469 InsertBefore) {
1490 Instruction *InsertBefore)
1491 : Instruction(Type::getVoidTy(C), Fence, nullptr, 0, InsertBefore) {
1707 Instruction *InsertBefore)
1713 InsertBefore) {
1910 Instruction *InsertBefore)
1914 InsertBefore) {
2012 Instruction *InsertBefore) {
2015 return new BinaryOperator(Op, S1, S2, S1->getType(), Name, InsertBefore);
2027 Instruction *InsertBefore) {
2031 Op->getType(), Name, InsertBefore);
2043 Instruction *InsertBefore) {
2045 return BinaryOperator::CreateNSWSub(zero, Op, Name, InsertBefore);
2055 Instruction *InsertBefore) {
2057 return BinaryOperator::CreateNUWSub(zero, Op, Name, InsertBefore);
2067 Instruction *InsertBefore) {
2070 Op->getType(), Name, InsertBefore);
2081 Instruction *InsertBefore) {
2084 Op->getType(), Name, InsertBefore);
2572 const Twine &Name, Instruction *InsertBefore) {
2576 case Trunc: return new TruncInst (S, Ty, Name, InsertBefore);
2577 case ZExt: return new ZExtInst (S, Ty, Name, InsertBefore);
2578 case SExt: return new SExtInst (S, Ty, Name, InsertBefore);
2579 case FPTrunc: return new FPTruncInst (S, Ty, Name, InsertBefore);
2580 case FPExt: return new FPExtInst (S, Ty, Name, InsertBefore);
2581 case UIToFP: return new UIToFPInst (S, Ty, Name, InsertBefore);
2582 case SIToFP: return new SIToFPInst (S, Ty, Name, InsertBefore);
2583 case FPToUI: return new FPToUIInst (S, Ty, Name, InsertBefore);
2584 case FPToSI: return new FPToSIInst (S, Ty, Name, InsertBefore);
2585 case PtrToInt: return new PtrToIntInst (S, Ty, Name, InsertBefore);
2586 case IntToPtr: return new IntToPtrInst (S, Ty, Name, InsertBefore);
2587 case BitCast: return new BitCastInst (S, Ty, Name, InsertBefore);
2588 case AddrSpaceCast: return new AddrSpaceCastInst (S, Ty, Name, InsertBefore);
2617 Instruction *InsertBefore) {
2619 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2620 return Create(Instruction::ZExt, S, Ty, Name, InsertBefore);
2633 Instruction *InsertBefore) {
2635 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2636 return Create(Instruction::SExt, S, Ty, Name, InsertBefore);
2649 Instruction *InsertBefore) {
2651 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2652 return Create(Instruction::Trunc, S, Ty, Name, InsertBefore);
2683 Instruction *InsertBefore) {
2693 return Create(Instruction::PtrToInt, S, Ty, Name, InsertBefore);
2695 return CreatePointerBitCastOrAddrSpaceCast(S, Ty, Name, InsertBefore);
2714 Instruction *InsertBefore) {
2719 return Create(Instruction::AddrSpaceCast, S, Ty, Name, InsertBefore);
2721 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2726 Instruction *InsertBefore) {
2728 return Create(Instruction::PtrToInt, S, Ty, Name, InsertBefore);
2730 return Create(Instruction::IntToPtr, S, Ty, Name, InsertBefore);
2732 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2737 Instruction *InsertBefore) {
2746 return Create(opcode, C, Ty, Name, InsertBefore);
2765 Instruction *InsertBefore) {
2773 return Create(opcode, C, Ty, Name, InsertBefore);
3125 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3126 ) : CastInst(Ty, Trunc, S, Name, InsertBefore) {
3137 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3138 ) : CastInst(Ty, ZExt, S, Name, InsertBefore) {
3148 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3149 ) : CastInst(Ty, SExt, S, Name, InsertBefore) {
3160 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3161 ) : CastInst(Ty, FPTrunc, S, Name, InsertBefore) {
3172 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3173 ) : CastInst(Ty, FPExt, S, Name, InsertBefore) {
3184 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3185 ) : CastInst(Ty, UIToFP, S, Name, InsertBefore) {
3196 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3197 ) : CastInst(Ty, SIToFP, S, Name, InsertBefore) {
3208 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3209 ) : CastInst(Ty, FPToUI, S, Name, InsertBefore) {
3220 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3221 ) : CastInst(Ty, FPToSI, S, Name, InsertBefore) {
3232 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3233 ) : CastInst(Ty, PtrToInt, S, Name, InsertBefore) {
3244 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3245 ) : CastInst(Ty, IntToPtr, S, Name, InsertBefore) {
3256 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3257 ) : CastInst(Ty, BitCast, S, Name, InsertBefore) {
3268 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
3269 ) : CastInst(Ty, AddrSpaceCast, S, Name, InsertBefore) {
3286 Value *RHS, const Twine &Name, Instruction *InsertBefore)
3290 InsertBefore) {
3311 const Twine &Name, Instruction *InsertBefore) {
3313 if (InsertBefore)
3314 return new ICmpInst(InsertBefore, CmpInst::Predicate(predicate),
3321 if (InsertBefore)
3322 return new FCmpInst(InsertBefore, CmpInst::Predicate(predicate),
3601 Instruction *InsertBefore)
3603 nullptr, 0, InsertBefore) {
3718 Instruction *InsertBefore)
3720 nullptr, 0, InsertBefore) {