Lines Matching refs:IRB

326   IRBuilder<> IRB(M.getContext());  in CreateSecStartEnd()  local
333 IRB.CreatePtrAdd(SecStart, ConstantInt::get(IntptrTy, sizeof(uint64_t))); in CreateSecStartEnd()
391 IRBuilder<> IRB(*C); in instrumentModule() local
392 Int64Ty = IRB.getInt64Ty(); in instrumentModule()
393 Int32Ty = IRB.getInt32Ty(); in instrumentModule()
394 Int16Ty = IRB.getInt16Ty(); in instrumentModule()
395 Int8Ty = IRB.getInt8Ty(); in instrumentModule()
396 Int1Ty = IRB.getInt1Ty(); in instrumentModule()
410 IRB.getInt8Ty(), IRB.getInt8Ty()); in instrumentModule()
413 IRB.getInt16Ty(), IRB.getInt16Ty()); in instrumentModule()
416 IRB.getInt32Ty(), IRB.getInt32Ty()); in instrumentModule()
455 M.getOrInsertFunction(SanCovTraceDiv4, AL, VoidTy, IRB.getInt32Ty()); in instrumentModule()
733 IRBuilder<> IRB(&*F.getEntryBlock().getFirstInsertionPt()); in CreatePCArray() local
736 PCs.push_back((Constant *)IRB.CreatePointerCast(&F, PtrTy)); in CreatePCArray()
737 PCs.push_back((Constant *)IRB.CreateIntToPtr( in CreatePCArray()
740 PCs.push_back((Constant *)IRB.CreatePointerCast( in CreatePCArray()
795 InstrumentationIRBuilder IRB(I); in InjectCoverageForIndirectCalls() local
800 IRB.CreateCall(SanCovTracePCIndir, IRB.CreatePointerCast(Callee, IntptrTy)); in InjectCoverageForIndirectCalls()
812 InstrumentationIRBuilder IRB(I); in InjectTraceForSwitch() local
823 Cond = IRB.CreateIntCast(Cond, Int64Ty, false); in InjectTraceForSwitch()
840 IRB.CreateCall(SanCovTraceSwitchFunction, {Cond, GV}); in InjectTraceForSwitch()
848 InstrumentationIRBuilder IRB(BO); in InjectTraceForDiv() local
858 IRB.CreateCall(SanCovTraceDivFunction[CallbackIdx], in InjectTraceForDiv()
859 {IRB.CreateIntCast(A1, Ty, true)}); in InjectTraceForDiv()
866 InstrumentationIRBuilder IRB(GEP); in InjectTraceForGep() local
869 IRB.CreateCall(SanCovTraceGepFunction, in InjectTraceForGep()
870 {IRB.CreateIntCast(Idx, IntptrTy, true)}); in InjectTraceForGep()
886 InstrumentationIRBuilder IRB(LI); in InjectTraceForLoadsAndStores() local
891 IRB.CreateCall(SanCovLoadFunction[Idx], Ptr); in InjectTraceForLoadsAndStores()
894 InstrumentationIRBuilder IRB(SI); in InjectTraceForLoadsAndStores() local
899 IRB.CreateCall(SanCovStoreFunction[Idx], Ptr); in InjectTraceForLoadsAndStores()
907 InstrumentationIRBuilder IRB(ICMP); in InjectTraceForCmp() local
932 IRB.CreateCall(CallbackFunc, {IRB.CreateIntCast(A0, Ty, true), in InjectTraceForCmp()
933 IRB.CreateIntCast(A1, Ty, true)}); in InjectTraceForCmp()
953 InstrumentationIRBuilder IRB(&*IP); in InjectCoverageAtBlock() local
955 IRB.SetCurrentDebugLocation(EntryLoc); in InjectCoverageAtBlock()
957 IRB.CreateCall(SanCovTracePC) in InjectCoverageAtBlock()
961 auto GuardPtr = IRB.CreateIntToPtr( in InjectCoverageAtBlock()
962 IRB.CreateAdd(IRB.CreatePointerCast(FunctionGuardArray, IntptrTy), in InjectCoverageAtBlock()
965 IRB.CreateCall(SanCovTracePCGuard, GuardPtr)->setCannotMerge(); in InjectCoverageAtBlock()
968 auto CounterPtr = IRB.CreateGEP( in InjectCoverageAtBlock()
971 auto Load = IRB.CreateLoad(Int8Ty, CounterPtr); in InjectCoverageAtBlock()
972 auto Inc = IRB.CreateAdd(Load, ConstantInt::get(Int8Ty, 1)); in InjectCoverageAtBlock()
973 auto Store = IRB.CreateStore(Inc, CounterPtr); in InjectCoverageAtBlock()
978 auto FlagPtr = IRB.CreateGEP( in InjectCoverageAtBlock()
981 auto Load = IRB.CreateLoad(Int1Ty, FlagPtr); in InjectCoverageAtBlock()
983 SplitBlockAndInsertIfThen(IRB.CreateIsNull(Load), &*IP, false); in InjectCoverageAtBlock()
994 IRB.getPtrTy(M->getDataLayout().getAllocaAddrSpace())); in InjectCoverageAtBlock()
996 IRB.CreateCall(GetFrameAddr, {Constant::getNullValue(Int32Ty)}); in InjectCoverageAtBlock()
997 auto FrameAddrInt = IRB.CreatePtrToInt(FrameAddrPtr, IntptrTy); in InjectCoverageAtBlock()
998 auto LowestStack = IRB.CreateLoad(IntptrTy, SanCovLowestStack); in InjectCoverageAtBlock()
999 auto IsStackLower = IRB.CreateICmpULT(FrameAddrInt, LowestStack); in InjectCoverageAtBlock()
1040 IRBuilder<> IRB(&*F.getEntryBlock().getFirstInsertionPt()); in createFunctionControlFlow() local
1045 CFs.push_back((Constant *)IRB.CreatePointerCast(&F, PtrTy)); in createFunctionControlFlow()
1047 CFs.push_back((Constant *)IRB.CreatePointerCast(BlockAddress::get(&BB), in createFunctionControlFlow()
1052 CFs.push_back((Constant *)IRB.CreatePointerCast(BlockAddress::get(SuccBB), in createFunctionControlFlow()
1062 CFs.push_back((Constant *)IRB.CreateIntToPtr( in createFunctionControlFlow()
1068 (Constant *)IRB.CreatePointerCast(CalledF, PtrTy)); in createFunctionControlFlow()