• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/

Lines Matching defs:Addr

114   bool addrPointsToConstantData(Value *Addr);
115 int getMemoryAccessFuncIndex(Value *Addr, const DataLayout &DL);
340 static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
342 Addr = Addr->stripInBoundsOffsets();
344 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Addr)) {
362 if (Addr) {
363 Type *PtrTy = cast<PointerType>(Addr->getType()->getScalarType());
371 bool ThreadSanitizer::addrPointsToConstantData(Value *Addr) {
373 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Addr))
374 Addr = GEP->getPointerOperand();
376 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(Addr)) {
382 } else if (LoadInst *L = dyn_cast<LoadInst>(Addr)) {
411 Value *Addr = Store->getPointerOperand();
412 if (!shouldInstrumentReadWriteFromAddress(I->getModule(), Addr))
414 WriteTargets.insert(Addr);
417 Value *Addr = Load->getPointerOperand();
418 if (!shouldInstrumentReadWriteFromAddress(I->getModule(), Addr))
420 if (!ClInstrumentReadBeforeWrite && WriteTargets.count(Addr)) {
425 if (addrPointsToConstantData(Addr)) {
426 // Addr points to some constant data -- it can not race with any writes.
430 Value *Addr = isa<StoreInst>(*I)
433 if (isa<AllocaInst>(GetUnderlyingObject(Addr, DL)) &&
434 !PointerMayBeCaptured(Addr, true, true)) {
560 Value *Addr = IsWrite
567 if (Addr->isSwiftError())
570 int Idx = getMemoryAccessFuncIndex(Addr, DL);
586 {IRB.CreatePointerCast(Addr, IRB.getInt8PtrTy()),
593 IRB.CreatePointerCast(Addr, IRB.getInt8PtrTy()));
603 Type *OrigTy = cast<PointerType>(Addr->getType())->getElementType();
618 IRB.CreateCall(OnAccessFunc, IRB.CreatePointerCast(Addr, IRB.getInt8PtrTy()));
680 Value *Addr = LI->getPointerOperand();
681 int Idx = getMemoryAccessFuncIndex(Addr, DL);
688 Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
690 Type *OrigTy = cast<PointerType>(Addr->getType())->getElementType();
695 Value *Addr = SI->getPointerOperand();
696 int Idx = getMemoryAccessFuncIndex(Addr, DL);
703 Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
709 Value *Addr = RMWI->getPointerOperand();
710 int Idx = getMemoryAccessFuncIndex(Addr, DL);
720 Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
726 Value *Addr = CASI->getPointerOperand();
727 int Idx = getMemoryAccessFuncIndex(Addr, DL);
738 Value *Args[] = {IRB.CreatePointerCast(Addr, PtrTy),
769 int ThreadSanitizer::getMemoryAccessFuncIndex(Value *Addr,
771 Type *OrigPtrTy = Addr->getType();