Lines Matching defs:IRB

204   IRBuilder<> IRB(Ctx);
209 IRB.getVoidTy(), IRB.getPtrTy());
211 M.getOrInsertFunction("__tsan_func_exit", Attr, IRB.getVoidTy());
213 IRB.getVoidTy());
215 M.getOrInsertFunction("__tsan_ignore_thread_end", Attr, IRB.getVoidTy());
216 IntegerType *OrdTy = IRB.getInt32Ty();
223 TsanRead[i] = M.getOrInsertFunction(ReadName, Attr, IRB.getVoidTy(),
224 IRB.getPtrTy());
227 TsanWrite[i] = M.getOrInsertFunction(WriteName, Attr, IRB.getVoidTy(),
228 IRB.getPtrTy());
232 UnalignedReadName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
236 UnalignedWriteName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
240 VolatileReadName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
244 VolatileWriteName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
249 UnalignedVolatileReadName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
254 UnalignedVolatileWriteName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
258 CompoundRWName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
263 UnalignedCompoundRWName, Attr, IRB.getVoidTy(), IRB.getPtrTy());
282 IRB.getVoidTy(), PtrTy, Ty, OrdTy);
321 M.getOrInsertFunction("__tsan_vptr_update", Attr, IRB.getVoidTy(),
322 IRB.getPtrTy(), IRB.getPtrTy());
324 IRB.getVoidTy(), IRB.getPtrTy());
328 IRB.getVoidTy(), OrdTy);
333 IRB.getVoidTy(), OrdTy);
336 M.getOrInsertFunction("__tsan_memmove", Attr, IRB.getPtrTy(),
337 IRB.getPtrTy(), IRB.getPtrTy(), IntptrTy);
339 M.getOrInsertFunction("__tsan_memcpy", Attr, IRB.getPtrTy(),
340 IRB.getPtrTy(), IRB.getPtrTy(), IntptrTy);
344 IRB.getPtrTy(), IRB.getPtrTy(), IRB.getInt32Ty(), IntptrTy);
482 InstrumentationIRBuilder IRB(&F.getEntryBlock(),
484 IRB.CreateCall(TsanIgnoreBegin);
573 InstrumentationIRBuilder IRB(&F.getEntryBlock(),
576 IRB.CreateIntrinsic(Intrinsic::returnaddress, {}, IRB.getInt32(0));
577 IRB.CreateCall(TsanFuncEntry, ReturnAddress);
591 InstrumentationIRBuilder IRB(II.Inst);
613 StoredValue = IRB.CreateExtractElement(
614 StoredValue, ConstantInt::get(IRB.getInt32Ty(), 0));
616 StoredValue = IRB.CreateIntToPtr(StoredValue, IRB.getPtrTy());
618 IRB.CreateCall(TsanVptrUpdate, {Addr, StoredValue});
623 IRB.CreateCall(TsanVptrLoad, Addr);
655 IRB.CreateCall(OnAccessFunc, Addr);
663 static ConstantInt *createOrdering(IRBuilder<> *IRB, AtomicOrdering ord) {
677 return IRB->getInt32(v);
689 InstrumentationIRBuilder IRB(I);
691 Value *Cast1 = IRB.CreateIntCast(M->getArgOperand(1), IRB.getInt32Ty(), false);
692 Value *Cast2 = IRB.CreateIntCast(M->getArgOperand(2), IntptrTy, false);
693 IRB.CreateCall(
700 IRB.CreateCall(
704 IRB.CreateIntCast(M->getArgOperand(2), IntptrTy, false)});
719 InstrumentationIRBuilder IRB(I);
727 createOrdering(&IRB, LI->getOrdering())};
728 Value *C = IRB.CreateCall(TsanAtomicLoad[Idx], Args);
729 Value *Cast = IRB.CreateBitOrPointerCast(C, OrigTy);
739 Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize);
741 IRB.CreateBitOrPointerCast(SI->getValueOperand(), Ty),
742 createOrdering(&IRB, SI->getOrdering())};
743 IRB.CreateCall(TsanAtomicStore[Idx], Args);
756 Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize);
758 Value *Args[] = {Addr, IRB.CreateBitOrPointerCast(Val, Ty),
759 createOrdering(&IRB, RMWI->getOrdering())};
760 Value *C = IRB.CreateCall(F, Args);
761 I->replaceAllUsesWith(IRB.CreateBitOrPointerCast(C, Val->getType()));
771 Type *Ty = Type::getIntNTy(IRB.getContext(), BitSize);
773 IRB.CreateBitOrPointerCast(CASI->getCompareOperand(), Ty);
775 IRB.CreateBitOrPointerCast(CASI->getNewValOperand(), Ty);
779 createOrdering(&IRB, CASI->getSuccessOrdering()),
780 createOrdering(&IRB, CASI->getFailureOrdering())};
781 CallInst *C = IRB.CreateCall(TsanAtomicCAS[Idx], Args);
782 Value *Success = IRB.CreateICmpEQ(C, CmpOperand);
786 OldVal = IRB.CreateIntToPtr(C, OrigOldValTy);
790 IRB.CreateInsertValue(PoisonValue::get(CASI->getType()), OldVal, 0);
791 Res = IRB.CreateInsertValue(Res, Success, 1);
796 Value *Args[] = {createOrdering(&IRB, FI->getOrdering())};
800 IRB.CreateCall(F, Args);