Lines Matching refs:InsertBefore

182                                Instruction *InsertBefore)
183 : Instruction(RetTy, Instruction::LandingPad, 0, 0, InsertBefore) {
212 Instruction *InsertBefore) {
214 InsertBefore);
303 Instruction *InsertBefore)
308 1, InsertBefore) {
371 static Instruction *createMalloc(Instruction *InsertBefore,
376 assert(((!InsertBefore && InsertAtEnd) || (InsertBefore && !InsertAtEnd)) &&
377 "createMalloc needs either InsertBefore or InsertAtEnd");
386 if (InsertBefore)
388 "", InsertBefore);
404 if (InsertBefore)
406 "mallocsize", InsertBefore);
415 BasicBlock* BB = InsertBefore ? InsertBefore->getParent() : InsertAtEnd;
425 if (InsertBefore) {
426 MCall = CallInst::Create(MallocFunc, AllocSize, "malloccall", InsertBefore);
430 Result = new BitCastInst(MCall, AllocPtrType, Name, InsertBefore);
456 Instruction *CallInst::CreateMalloc(Instruction *InsertBefore,
461 return createMalloc(InsertBefore, NULL, IntPtrTy, AllocTy, AllocSize,
481 static Instruction* createFree(Value* Source, Instruction *InsertBefore,
483 assert(((!InsertBefore && InsertAtEnd) || (InsertBefore && !InsertAtEnd)) &&
484 "createFree needs either InsertBefore or InsertAtEnd");
488 BasicBlock* BB = InsertBefore ? InsertBefore->getParent() : InsertAtEnd;
497 if (InsertBefore) {
499 PtrCast = new BitCastInst(Source, IntPtrTy, "", InsertBefore);
500 Result = CallInst::Create(FreeFunc, PtrCast, "", InsertBefore);
514 Instruction * CallInst::CreateFree(Value* Source, Instruction *InsertBefore) {
515 return createFree(Source, InsertBefore, NULL);
625 ReturnInst::ReturnInst(LLVMContext &C, Value *retVal, Instruction *InsertBefore)
628 InsertBefore) {
671 ResumeInst::ResumeInst(Value *Exn, Instruction *InsertBefore)
673 OperandTraits<ResumeInst>::op_begin(this), 1, InsertBefore) {
700 Instruction *InsertBefore)
702 0, 0, InsertBefore) {
731 BranchInst::BranchInst(BasicBlock *IfTrue, Instruction *InsertBefore)
734 1, InsertBefore) {
739 Instruction *InsertBefore)
742 3, InsertBefore) {
835 const Twine &Name, Instruction *InsertBefore)
837 getAISize(Ty->getContext(), ArraySize), InsertBefore) {
853 Instruction *InsertBefore)
855 getAISize(Ty->getContext(), 0), InsertBefore) {
871 const Twine &Name, Instruction *InsertBefore)
873 getAISize(Ty->getContext(), ArraySize), InsertBefore) {
1090 StoreInst::StoreInst(Value *val, Value *addr, Instruction *InsertBefore)
1094 InsertBefore) {
1117 Instruction *InsertBefore)
1121 InsertBefore) {
1131 unsigned Align, Instruction *InsertBefore)
1135 InsertBefore) {
1147 Instruction *InsertBefore)
1151 InsertBefore) {
1243 Instruction *InsertBefore)
1247 InsertBefore) {
1289 Instruction *InsertBefore)
1293 InsertBefore) {
1314 Instruction *InsertBefore)
1315 : Instruction(Type::getVoidTy(C), Fence, 0, 0, InsertBefore) {
1530 Instruction *InsertBefore)
1536 InsertBefore) {
1734 Instruction *InsertBefore)
1738 InsertBefore) {
1836 Instruction *InsertBefore) {
1839 return new BinaryOperator(Op, S1, S2, S1->getType(), Name, InsertBefore);
1851 Instruction *InsertBefore) {
1855 Op->getType(), Name, InsertBefore);
1867 Instruction *InsertBefore) {
1869 return BinaryOperator::CreateNSWSub(zero, Op, Name, InsertBefore);
1879 Instruction *InsertBefore) {
1881 return BinaryOperator::CreateNUWSub(zero, Op, Name, InsertBefore);
1891 Instruction *InsertBefore) {
1894 Op->getType(), Name, InsertBefore);
1905 Instruction *InsertBefore) {
1908 Op->getType(), Name, InsertBefore);
2326 const Twine &Name, Instruction *InsertBefore) {
2330 case Trunc: return new TruncInst (S, Ty, Name, InsertBefore);
2331 case ZExt: return new ZExtInst (S, Ty, Name, InsertBefore);
2332 case SExt: return new SExtInst (S, Ty, Name, InsertBefore);
2333 case FPTrunc: return new FPTruncInst (S, Ty, Name, InsertBefore);
2334 case FPExt: return new FPExtInst (S, Ty, Name, InsertBefore);
2335 case UIToFP: return new UIToFPInst (S, Ty, Name, InsertBefore);
2336 case SIToFP: return new SIToFPInst (S, Ty, Name, InsertBefore);
2337 case FPToUI: return new FPToUIInst (S, Ty, Name, InsertBefore);
2338 case FPToSI: return new FPToSIInst (S, Ty, Name, InsertBefore);
2339 case PtrToInt: return new PtrToIntInst (S, Ty, Name, InsertBefore);
2340 case IntToPtr: return new IntToPtrInst (S, Ty, Name, InsertBefore);
2341 case BitCast: return new BitCastInst (S, Ty, Name, InsertBefore);
2369 Instruction *InsertBefore) {
2371 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2372 return Create(Instruction::ZExt, S, Ty, Name, InsertBefore);
2385 Instruction *InsertBefore) {
2387 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2388 return Create(Instruction::SExt, S, Ty, Name, InsertBefore);
2401 Instruction *InsertBefore) {
2403 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2404 return Create(Instruction::Trunc, S, Ty, Name, InsertBefore);
2434 Instruction *InsertBefore) {
2444 return Create(Instruction::PtrToInt, S, Ty, Name, InsertBefore);
2445 return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
2450 Instruction *InsertBefore) {
2459 return Create(opcode, C, Ty, Name, InsertBefore);
2478 Instruction *InsertBefore) {
2486 return Create(opcode, C, Ty, Name, InsertBefore);
2796 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2797 ) : CastInst(Ty, Trunc, S, Name, InsertBefore) {
2808 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2809 ) : CastInst(Ty, ZExt, S, Name, InsertBefore) {
2819 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2820 ) : CastInst(Ty, SExt, S, Name, InsertBefore) {
2831 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2832 ) : CastInst(Ty, FPTrunc, S, Name, InsertBefore) {
2843 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2844 ) : CastInst(Ty, FPExt, S, Name, InsertBefore) {
2855 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2856 ) : CastInst(Ty, UIToFP, S, Name, InsertBefore) {
2867 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2868 ) : CastInst(Ty, SIToFP, S, Name, InsertBefore) {
2879 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2880 ) : CastInst(Ty, FPToUI, S, Name, InsertBefore) {
2891 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2892 ) : CastInst(Ty, FPToSI, S, Name, InsertBefore) {
2903 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2904 ) : CastInst(Ty, PtrToInt, S, Name, InsertBefore) {
2915 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2916 ) : CastInst(Ty, IntToPtr, S, Name, InsertBefore) {
2927 Value *S, Type *Ty, const Twine &Name, Instruction *InsertBefore
2928 ) : CastInst(Ty, BitCast, S, Name, InsertBefore) {
2946 Instruction *InsertBefore)
2950 InsertBefore) {
2973 const Twine &Name, Instruction *InsertBefore) {
2975 if (InsertBefore)
2976 return new ICmpInst(InsertBefore, CmpInst::Predicate(predicate),
2983 if (InsertBefore)
2984 return new FCmpInst(InsertBefore, CmpInst::Predicate(predicate),
3244 Instruction *InsertBefore)
3246 0, 0, InsertBefore) {
3399 Instruction *InsertBefore)
3401 0, 0, InsertBefore) {