Lines Matching refs:IRB

202   Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
259 Value *MemProfiler::memToShadow(Value *Shadow, IRBuilder<> &IRB) { in memToShadow() argument
261 Shadow = IRB.CreateAnd(Shadow, Mapping.Mask); in memToShadow()
262 Shadow = IRB.CreateLShr(Shadow, Mapping.Scale); in memToShadow()
265 return IRB.CreateAdd(Shadow, DynamicShadowOffset); in memToShadow()
270 IRBuilder<> IRB(MI); in instrumentMemIntrinsic() local
272 IRB.CreateCall(isa<MemMoveInst>(MI) ? MemProfMemmove : MemProfMemcpy, in instrumentMemIntrinsic()
274 IRB.CreateIntCast(MI->getOperand(2), IntptrTy, false)}); in instrumentMemIntrinsic()
276 IRB.CreateCall( in instrumentMemIntrinsic()
279 IRB.CreateIntCast(MI->getOperand(1), IRB.getInt32Ty(), false), in instrumentMemIntrinsic()
280 IRB.CreateIntCast(MI->getOperand(2), IntptrTy, false)}); in instrumentMemIntrinsic()
402 IRBuilder<> IRB(I); in instrumentMaskedLoadOrStore() local
403 Value *MaskElem = IRB.CreateExtractElement(Mask, Idx); in instrumentMaskedLoadOrStore()
408 IRBuilder<> IRB(InsertBefore); in instrumentMaskedLoadOrStore() local
410 IRB.CreateGEP(VTy, Addr, {Zero, ConstantInt::get(IntptrTy, Idx)}); in instrumentMaskedLoadOrStore()
446 IRBuilder<> IRB(InsertBefore); in instrumentAddress() local
447 Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy); in instrumentAddress()
450 IRB.CreateCall(MemProfMemoryAccessCallback[IsWrite], AddrLong); in instrumentAddress()
458 Value *ShadowPtr = memToShadow(AddrLong, IRB); in instrumentAddress()
459 Value *ShadowAddr = IRB.CreateIntToPtr(ShadowPtr, ShadowPtrTy); in instrumentAddress()
460 Value *ShadowValue = IRB.CreateLoad(ShadowTy, ShadowAddr); in instrumentAddress()
462 ShadowValue = IRB.CreateAdd(ShadowValue, Inc); in instrumentAddress()
463 IRB.CreateStore(ShadowValue, ShadowAddr); in instrumentAddress()
506 IRBuilder<> IRB(*C); in initializeCallbacks() local
515 FunctionType::get(IRB.getVoidTy(), Args2, false)); in initializeCallbacks()
519 FunctionType::get(IRB.getVoidTy(), Args1, false)); in initializeCallbacks()
527 PtrTy, IRB.getInt32Ty(), IntptrTy); in initializeCallbacks()
541 IRBuilder<> IRB(&F.front(), F.front().begin()); in maybeInsertMemProfInitAtFunctionEntry() local
542 IRB.CreateCall(MemProfInitFunction, {}); in maybeInsertMemProfInitAtFunctionEntry()
549 IRBuilder<> IRB(&F.front().front()); in insertDynamicShadowAtFunctionEntry() local
554 DynamicShadowOffset = IRB.CreateLoad(IntptrTy, GlobalDynamicAddress); in insertDynamicShadowAtFunctionEntry()