Lines Matching refs:IRB
186 Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);
300 Value *MemProfiler::memToShadow(Value *Shadow, IRBuilder<> &IRB) { in memToShadow() argument
302 Shadow = IRB.CreateAnd(Shadow, Mapping.Mask); in memToShadow()
303 Shadow = IRB.CreateLShr(Shadow, Mapping.Scale); in memToShadow()
306 return IRB.CreateAdd(Shadow, DynamicShadowOffset); in memToShadow()
311 IRBuilder<> IRB(MI); in instrumentMemIntrinsic() local
313 IRB.CreateCall( in instrumentMemIntrinsic()
315 {IRB.CreatePointerCast(MI->getOperand(0), IRB.getInt8PtrTy()), in instrumentMemIntrinsic()
316 IRB.CreatePointerCast(MI->getOperand(1), IRB.getInt8PtrTy()), in instrumentMemIntrinsic()
317 IRB.CreateIntCast(MI->getOperand(2), IntptrTy, false)}); in instrumentMemIntrinsic()
319 IRB.CreateCall( in instrumentMemIntrinsic()
321 {IRB.CreatePointerCast(MI->getOperand(0), IRB.getInt8PtrTy()), in instrumentMemIntrinsic()
322 IRB.CreateIntCast(MI->getOperand(1), IRB.getInt32Ty(), false), in instrumentMemIntrinsic()
323 IRB.CreateIntCast(MI->getOperand(2), IntptrTy, false)}); in instrumentMemIntrinsic()
445 IRBuilder<> IRB(I); in instrumentMaskedLoadOrStore() local
446 Value *MaskElem = IRB.CreateExtractElement(Mask, Idx); in instrumentMaskedLoadOrStore()
451 IRBuilder<> IRB(InsertBefore); in instrumentMaskedLoadOrStore() local
453 IRB.CreateGEP(VTy, Addr, {Zero, ConstantInt::get(IntptrTy, Idx)}); in instrumentMaskedLoadOrStore()
489 IRBuilder<> IRB(InsertBefore); in instrumentAddress() local
490 Value *AddrLong = IRB.CreatePointerCast(Addr, IntptrTy); in instrumentAddress()
493 IRB.CreateCall(MemProfMemoryAccessCallback[IsWrite], AddrLong); in instrumentAddress()
501 Value *ShadowPtr = memToShadow(AddrLong, IRB); in instrumentAddress()
502 Value *ShadowAddr = IRB.CreateIntToPtr(ShadowPtr, ShadowPtrTy); in instrumentAddress()
503 Value *ShadowValue = IRB.CreateLoad(ShadowTy, ShadowAddr); in instrumentAddress()
505 ShadowValue = IRB.CreateAdd(ShadowValue, Inc); in instrumentAddress()
506 IRB.CreateStore(ShadowValue, ShadowAddr); in instrumentAddress()
549 IRBuilder<> IRB(*C); in initializeCallbacks() local
558 FunctionType::get(IRB.getVoidTy(), Args2, false)); in initializeCallbacks()
562 FunctionType::get(IRB.getVoidTy(), Args1, false)); in initializeCallbacks()
565 ClMemoryAccessCallbackPrefix + "memmove", IRB.getInt8PtrTy(), in initializeCallbacks()
566 IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), IntptrTy); in initializeCallbacks()
568 IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), in initializeCallbacks()
569 IRB.getInt8PtrTy(), IntptrTy); in initializeCallbacks()
571 IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), in initializeCallbacks()
572 IRB.getInt32Ty(), IntptrTy); in initializeCallbacks()
586 IRBuilder<> IRB(&F.front(), F.front().begin()); in maybeInsertMemProfInitAtFunctionEntry() local
587 IRB.CreateCall(MemProfInitFunction, {}); in maybeInsertMemProfInitAtFunctionEntry()
594 IRBuilder<> IRB(&F.front().front()); in insertDynamicShadowAtFunctionEntry() local
599 DynamicShadowOffset = IRB.CreateLoad(IntptrTy, GlobalDynamicAddress); in insertDynamicShadowAtFunctionEntry()