Lines Matching refs:IRB

203   IRBuilder<> IRB(Ctx);  in initialize()  local
208 IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
210 M.getOrInsertFunction("__tsan_func_exit", Attr, IRB.getVoidTy()); in initialize()
212 IRB.getVoidTy()); in initialize()
214 M.getOrInsertFunction("__tsan_ignore_thread_end", Attr, IRB.getVoidTy()); in initialize()
215 IntegerType *OrdTy = IRB.getInt32Ty(); in initialize()
222 TsanRead[i] = M.getOrInsertFunction(ReadName, Attr, IRB.getVoidTy(), in initialize()
223 IRB.getPtrTy()); in initialize()
226 TsanWrite[i] = M.getOrInsertFunction(WriteName, Attr, IRB.getVoidTy(), in initialize()
227 IRB.getPtrTy()); in initialize()
231 UnalignedReadName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
235 UnalignedWriteName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
239 VolatileReadName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
243 VolatileWriteName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
248 UnalignedVolatileReadName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
253 UnalignedVolatileWriteName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
257 CompoundRWName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
262 UnalignedCompoundRWName, Attr, IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
281 IRB.getVoidTy(), PtrTy, Ty, OrdTy); in initialize()
320 M.getOrInsertFunction("__tsan_vptr_update", Attr, IRB.getVoidTy(), in initialize()
321 IRB.getPtrTy(), IRB.getPtrTy()); in initialize()
323 IRB.getVoidTy(), IRB.getPtrTy()); in initialize()
327 IRB.getVoidTy(), OrdTy); in initialize()
332 IRB.getVoidTy(), OrdTy); in initialize()
335 M.getOrInsertFunction("__tsan_memmove", Attr, IRB.getPtrTy(), in initialize()
336 IRB.getPtrTy(), IRB.getPtrTy(), IntptrTy); in initialize()
338 M.getOrInsertFunction("__tsan_memcpy", Attr, IRB.getPtrTy(), in initialize()
339 IRB.getPtrTy(), IRB.getPtrTy(), IntptrTy); in initialize()
343 IRB.getPtrTy(), IRB.getPtrTy(), IRB.getInt32Ty(), IntptrTy); in initialize()
481 InstrumentationIRBuilder IRB(F.getEntryBlock().getFirstNonPHI()); in InsertRuntimeIgnores() local
482 IRB.CreateCall(TsanIgnoreBegin); in InsertRuntimeIgnores()
571 InstrumentationIRBuilder IRB(F.getEntryBlock().getFirstNonPHI()); in sanitizeFunction() local
572 Value *ReturnAddress = IRB.CreateCall( in sanitizeFunction()
574 IRB.getInt32(0)); in sanitizeFunction()
575 IRB.CreateCall(TsanFuncEntry, ReturnAddress); in sanitizeFunction()
589 InstrumentationIRBuilder IRB(II.Inst); in instrumentLoadOrStore() local
611 StoredValue = IRB.CreateExtractElement( in instrumentLoadOrStore()
612 StoredValue, ConstantInt::get(IRB.getInt32Ty(), 0)); in instrumentLoadOrStore()
614 StoredValue = IRB.CreateIntToPtr(StoredValue, IRB.getPtrTy()); in instrumentLoadOrStore()
616 IRB.CreateCall(TsanVptrUpdate, {Addr, StoredValue}); in instrumentLoadOrStore()
621 IRB.CreateCall(TsanVptrLoad, Addr); in instrumentLoadOrStore()
653 IRB.CreateCall(OnAccessFunc, Addr); in instrumentLoadOrStore()
661 static ConstantInt *createOrdering(IRBuilder<> *IRB, AtomicOrdering ord) { in createOrdering() argument
675 return IRB->getInt32(v); in createOrdering()
687 InstrumentationIRBuilder IRB(I); in instrumentMemIntrinsic() local
689 Value *Cast1 = IRB.CreateIntCast(M->getArgOperand(1), IRB.getInt32Ty(), false); in instrumentMemIntrinsic()
690 Value *Cast2 = IRB.CreateIntCast(M->getArgOperand(2), IntptrTy, false); in instrumentMemIntrinsic()
691 IRB.CreateCall( in instrumentMemIntrinsic()
698 IRB.CreateCall( in instrumentMemIntrinsic()
702 IRB.CreateIntCast(M->getArgOperand(2), IntptrTy, false)}); in instrumentMemIntrinsic()
717 InstrumentationIRBuilder IRB(I); in instrumentAtomic() local
725 createOrdering(&IRB, LI->getOrdering())}; in instrumentAtomic()
726 Value *C = IRB.CreateCall(TsanAtomicLoad[Idx], Args); in instrumentAtomic()
727 Value *Cast = IRB.CreateBitOrPointerCast(C, OrigTy); in instrumentAtomic()
737 Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize); in instrumentAtomic()
739 IRB.CreateBitOrPointerCast(SI->getValueOperand(), Ty), in instrumentAtomic()
740 createOrdering(&IRB, SI->getOrdering())}; in instrumentAtomic()
754 Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize); in instrumentAtomic()
756 Value *Args[] = {Addr, IRB.CreateBitOrPointerCast(Val, Ty), in instrumentAtomic()
757 createOrdering(&IRB, RMWI->getOrdering())}; in instrumentAtomic()
758 Value *C = IRB.CreateCall(F, Args); in instrumentAtomic()
759 I->replaceAllUsesWith(IRB.CreateBitOrPointerCast(C, Val->getType())); in instrumentAtomic()
769 Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize); in instrumentAtomic()
771 IRB.CreateBitOrPointerCast(CASI->getCompareOperand(), Ty); in instrumentAtomic()
773 IRB.CreateBitOrPointerCast(CASI->getNewValOperand(), Ty); in instrumentAtomic()
777 createOrdering(&IRB, CASI->getSuccessOrdering()), in instrumentAtomic()
778 createOrdering(&IRB, CASI->getFailureOrdering())}; in instrumentAtomic()
779 CallInst *C = IRB.CreateCall(TsanAtomicCAS[Idx], Args); in instrumentAtomic()
780 Value *Success = IRB.CreateICmpEQ(C, CmpOperand); in instrumentAtomic()
784 OldVal = IRB.CreateIntToPtr(C, OrigOldValTy); in instrumentAtomic()
788 IRB.CreateInsertValue(PoisonValue::get(CASI->getType()), OldVal, 0); in instrumentAtomic()
789 Res = IRB.CreateInsertValue(Res, Success, 1); in instrumentAtomic()
794 Value *Args[] = {createOrdering(&IRB, FI->getOrdering())}; in instrumentAtomic()