Lines Matching refs:IRB
317 IRBuilder<> IRB(M.getContext()); in CreateSecStartEnd() local
323 auto SecStartI8Ptr = IRB.CreatePointerCast(SecStart, Int8PtrTy); in CreateSecStartEnd()
324 auto GEP = IRB.CreateGEP(Int8Ty, SecStartI8Ptr, in CreateSecStartEnd()
326 return std::make_pair(IRB.CreatePointerCast(GEP, PointerType::getUnqual(Ty)), in CreateSecStartEnd()
384 IRBuilder<> IRB(*C); in instrumentModule() local
385 Int128PtrTy = PointerType::getUnqual(IRB.getInt128Ty()); in instrumentModule()
386 Int64PtrTy = PointerType::getUnqual(IRB.getInt64Ty()); in instrumentModule()
387 Int16PtrTy = PointerType::getUnqual(IRB.getInt16Ty()); in instrumentModule()
388 Int32PtrTy = PointerType::getUnqual(IRB.getInt32Ty()); in instrumentModule()
389 Int8PtrTy = PointerType::getUnqual(IRB.getInt8Ty()); in instrumentModule()
390 Int1PtrTy = PointerType::getUnqual(IRB.getInt1Ty()); in instrumentModule()
391 Int64Ty = IRB.getInt64Ty(); in instrumentModule()
392 Int32Ty = IRB.getInt32Ty(); in instrumentModule()
393 Int16Ty = IRB.getInt16Ty(); in instrumentModule()
394 Int8Ty = IRB.getInt8Ty(); in instrumentModule()
395 Int1Ty = IRB.getInt1Ty(); in instrumentModule()
409 IRB.getInt8Ty(), IRB.getInt8Ty()); in instrumentModule()
412 IRB.getInt16Ty(), IRB.getInt16Ty()); in instrumentModule()
415 IRB.getInt32Ty(), IRB.getInt32Ty()); in instrumentModule()
454 M.getOrInsertFunction(SanCovTraceDiv4, AL, VoidTy, IRB.getInt32Ty()); in instrumentModule()
720 IRBuilder<> IRB(&*F.getEntryBlock().getFirstInsertionPt()); in CreatePCArray() local
723 PCs.push_back((Constant *)IRB.CreatePointerCast(&F, IntptrPtrTy)); in CreatePCArray()
724 PCs.push_back((Constant *)IRB.CreateIntToPtr( in CreatePCArray()
727 PCs.push_back((Constant *)IRB.CreatePointerCast( in CreatePCArray()
729 PCs.push_back((Constant *)IRB.CreateIntToPtr( in CreatePCArray()
783 IRBuilder<> IRB(I); in InjectCoverageForIndirectCalls() local
788 IRB.CreateCall(SanCovTracePCIndir, IRB.CreatePointerCast(Callee, IntptrTy)); in InjectCoverageForIndirectCalls()
800 IRBuilder<> IRB(I); in InjectTraceForSwitch() local
811 Cond = IRB.CreateIntCast(Cond, Int64Ty, false); in InjectTraceForSwitch()
829 IRB.CreateCall(SanCovTraceSwitchFunction, in InjectTraceForSwitch()
830 {Cond, IRB.CreatePointerCast(GV, Int64PtrTy)}); in InjectTraceForSwitch()
838 IRBuilder<> IRB(BO); in InjectTraceForDiv() local
848 IRB.CreateCall(SanCovTraceDivFunction[CallbackIdx], in InjectTraceForDiv()
849 {IRB.CreateIntCast(A1, Ty, true)}); in InjectTraceForDiv()
856 IRBuilder<> IRB(GEP); in InjectTraceForGep() local
859 IRB.CreateCall(SanCovTraceGepFunction, in InjectTraceForGep()
860 {IRB.CreateIntCast(Idx, IntptrTy, true)}); in InjectTraceForGep()
878 IRBuilder<> IRB(LI); in InjectTraceForLoadsAndStores() local
883 IRB.CreateCall(SanCovLoadFunction[Idx], in InjectTraceForLoadsAndStores()
884 IRB.CreatePointerCast(Ptr, PointerType[Idx])); in InjectTraceForLoadsAndStores()
887 IRBuilder<> IRB(SI); in InjectTraceForLoadsAndStores() local
892 IRB.CreateCall(SanCovStoreFunction[Idx], in InjectTraceForLoadsAndStores()
893 IRB.CreatePointerCast(Ptr, PointerType[Idx])); in InjectTraceForLoadsAndStores()
901 IRBuilder<> IRB(ICMP); in InjectTraceForCmp() local
926 IRB.CreateCall(CallbackFunc, {IRB.CreateIntCast(A0, Ty, true), in InjectTraceForCmp()
927 IRB.CreateIntCast(A1, Ty, true)}); in InjectTraceForCmp()
947 InstrumentationIRBuilder IRB(&*IP); in InjectCoverageAtBlock() local
949 IRB.SetCurrentDebugLocation(EntryLoc); in InjectCoverageAtBlock()
951 IRB.CreateCall(SanCovTracePC) in InjectCoverageAtBlock()
955 auto GuardPtr = IRB.CreateIntToPtr( in InjectCoverageAtBlock()
956 IRB.CreateAdd(IRB.CreatePointerCast(FunctionGuardArray, IntptrTy), in InjectCoverageAtBlock()
959 IRB.CreateCall(SanCovTracePCGuard, GuardPtr)->setCannotMerge(); in InjectCoverageAtBlock()
962 auto CounterPtr = IRB.CreateGEP( in InjectCoverageAtBlock()
965 auto Load = IRB.CreateLoad(Int8Ty, CounterPtr); in InjectCoverageAtBlock()
966 auto Inc = IRB.CreateAdd(Load, ConstantInt::get(Int8Ty, 1)); in InjectCoverageAtBlock()
967 auto Store = IRB.CreateStore(Inc, CounterPtr); in InjectCoverageAtBlock()
972 auto FlagPtr = IRB.CreateGEP( in InjectCoverageAtBlock()
975 auto Load = IRB.CreateLoad(Int1Ty, FlagPtr); in InjectCoverageAtBlock()
977 SplitBlockAndInsertIfThen(IRB.CreateIsNull(Load), &*IP, false); in InjectCoverageAtBlock()
988 IRB.getInt8PtrTy(M->getDataLayout().getAllocaAddrSpace())); in InjectCoverageAtBlock()
990 IRB.CreateCall(GetFrameAddr, {Constant::getNullValue(Int32Ty)}); in InjectCoverageAtBlock()
991 auto FrameAddrInt = IRB.CreatePtrToInt(FrameAddrPtr, IntptrTy); in InjectCoverageAtBlock()
992 auto LowestStack = IRB.CreateLoad(IntptrTy, SanCovLowestStack); in InjectCoverageAtBlock()
993 auto IsStackLower = IRB.CreateICmpULT(FrameAddrInt, LowestStack); in InjectCoverageAtBlock()