reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/Instrumentation/MemorySanitizer.cpp
 1074     if (MS.TrackOrigins <= 1) return V;
 1075     return IRB.CreateCall(MS.MsanChainOriginFn, V);
 1080     unsigned IntptrSize = DL.getTypeStoreSize(MS.IntptrTy);
 1083     Origin = IRB.CreateIntCast(Origin, MS.IntptrTy, /* isSigned */ false);
 1091     unsigned IntptrAlignment = DL.getABITypeAlignment(MS.IntptrTy);
 1092     unsigned IntptrSize = DL.getTypeStoreSize(MS.IntptrTy);
 1101           IRB.CreatePointerCast(OriginPtr, PointerType::get(MS.IntptrTy, 0));
 1103         Value *Ptr = i ? IRB.CreateConstGEP1_32(MS.IntptrTy, IntptrOriginPtr, i)
 1113           i ? IRB.CreateConstGEP1_32(MS.OriginTy, OriginPtr, i) : OriginPtr;
 1140       if (AsCall && SizeIndex < kNumberOfAccessSizes && !MS.CompileKernel) {
 1141         FunctionCallee Fn = MS.MaybeStoreOriginFn[SizeIndex];
 1151             Cmp, &*IRB.GetInsertPoint(), false, MS.OriginStoreWeights);
 1179       if (MS.TrackOrigins && !SI->isAtomic())
 1189     if (MS.CompileKernel) {
 1190       IRB.CreateCall(MS.WarningFn, Origin);
 1192       if (MS.TrackOrigins) {
 1193         IRB.CreateStore(Origin, MS.OriginTLS);
 1195       IRB.CreateCall(MS.WarningFn, {});
 1197     IRB.CreateCall(MS.EmptyAsm, {});
 1222     if (AsCall && SizeIndex < kNumberOfAccessSizes && !MS.CompileKernel) {
 1223       FunctionCallee Fn = MS.MaybeWarningFn[SizeIndex];
 1226       IRB.CreateCall(Fn, {ConvertedShadow2, MS.TrackOrigins && Origin
 1234           /* Unreachable */ !MS.Recover, MS.ColdCallWeights);
 1234           /* Unreachable */ !MS.Recover, MS.ColdCallWeights);
 1256     Value *ContextState = IRB.CreateCall(MS.MsanGetContextStateFn, {});
 1258     MS.ParamTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1258     MS.ParamTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1260     MS.RetvalTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1260     MS.RetvalTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1262     MS.VAArgTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1262     MS.VAArgTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1264     MS.VAArgOriginTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1264     MS.VAArgOriginTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1266     MS.VAArgOverflowSizeTLS =
 1267         IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1269     MS.ParamOriginTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1269     MS.ParamOriginTLS = IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1271     MS.RetvalOriginTLS =
 1272         IRB.CreateGEP(MS.MsanContextStateTy, ContextState,
 1294       PHINode *PNO = MS.TrackOrigins ? cast<PHINode>(getOrigin(PN)) : nullptr;
 1348       return VectorType::get(IntegerType::get(*MS.C, EltSize),
 1359       StructType *Res = StructType::get(*MS.C, Elements, ST->isPacked());
 1364     return IntegerType::get(*MS.C, TypeSize);
 1370       return IntegerType::get(*MS.C, vt->getBitWidth());
 1387     Value *OffsetLong = IRB.CreatePointerCast(Addr, MS.IntptrTy);
 1389     uint64_t AndMask = MS.MapParams->AndMask;
 1392           IRB.CreateAnd(OffsetLong, ConstantInt::get(MS.IntptrTy, ~AndMask));
 1394     uint64_t XorMask = MS.MapParams->XorMask;
 1397           IRB.CreateXor(OffsetLong, ConstantInt::get(MS.IntptrTy, XorMask));
 1412     uint64_t ShadowBase = MS.MapParams->ShadowBase;
 1416                       ConstantInt::get(MS.IntptrTy, ShadowBase));
 1421     if (MS.TrackOrigins) {
 1423       uint64_t OriginBase = MS.MapParams->OriginBase;
 1426                                    ConstantInt::get(MS.IntptrTy, OriginBase));
 1430             IRB.CreateAnd(OriginLong, ConstantInt::get(MS.IntptrTy, ~Mask));
 1433           IRB.CreateIntToPtr(OriginLong, PointerType::get(MS.OriginTy, 0));
 1445     FunctionCallee Getter = MS.getKmsanShadowOriginAccessFn(isStore, Size);
 1451       Value *SizeVal = ConstantInt::get(MS.IntptrTy, Size);
 1452       ShadowOriginPtrs = IRB.CreateCall(isStore ? MS.MsanMetadataPtrForStoreN
 1453                                                 : MS.MsanMetadataPtrForLoadN,
 1468     if (MS.CompileKernel)
 1480     Value *Base = IRB.CreatePointerCast(MS.ParamTLS, MS.IntptrTy);
 1480     Value *Base = IRB.CreatePointerCast(MS.ParamTLS, MS.IntptrTy);
 1482       Base = IRB.CreateAdd(Base, ConstantInt::get(MS.IntptrTy, ArgOffset));
 1490     if (!MS.TrackOrigins)
 1492     Value *Base = IRB.CreatePointerCast(MS.ParamOriginTLS, MS.IntptrTy);
 1492     Value *Base = IRB.CreatePointerCast(MS.ParamOriginTLS, MS.IntptrTy);
 1494       Base = IRB.CreateAdd(Base, ConstantInt::get(MS.IntptrTy, ArgOffset));
 1495     return IRB.CreateIntToPtr(Base, PointerType::get(MS.OriginTy, 0),
 1501     return IRB.CreatePointerCast(MS.RetvalTLS,
 1509     return MS.RetvalOriginTLS;
 1520     if (!MS.TrackOrigins) return;
 1570     return Constant::getNullValue(MS.OriginTy);
 1656           if (MS.TrackOrigins && !Overflow) {
 1659             setOrigin(A, EntryIRB.CreateLoad(MS.OriginTy, OriginPtr));
 1680     if (!MS.TrackOrigins) return nullptr;
 1802     if (MS.TrackOrigins) {
 1806             &I, IRB.CreateAlignedLoad(MS.OriginTy, OriginPtr, OriginAlignment));
 2021       if (MSV->MS.TrackOrigins) {
 2042       Value *OpOrigin = MSV->MS.TrackOrigins ? MSV->getOrigin(V) : nullptr;
 2054       if (MSV->MS.TrackOrigins) {
 2066     if (!MS.TrackOrigins) return;
 2097     Value *V1 = IRB.CreateBitCast(V, Type::getIntNTy(*MS.C, srcSizeInBits));
 2099       IRB.CreateIntCast(V1, Type::getIntNTy(*MS.C, dstSizeInBits), Signed);
 2408         MS.MemmoveFn,
 2411          IRB.CreateIntCast(I.getArgOperand(2), MS.IntptrTy, false)});
 2422         MS.MemcpyFn,
 2425          IRB.CreateIntCast(I.getArgOperand(2), MS.IntptrTy, false)});
 2433         MS.MemsetFn,
 2436          IRB.CreateIntCast(I.getArgOperand(2), MS.IntptrTy, false)});
 2468     if (MS.TrackOrigins) IRB.CreateStore(getOrigin(&I, 1), OriginPtr);
 2497     if (MS.TrackOrigins) {
 2499         setOrigin(&I, IRB.CreateLoad(MS.OriginTy, OriginPtr));
 2735     return VectorType::get(IntegerType::get(*MS.C, EltSizeInBits),
 2798       Type *X86_MMXTy = Type::getX86_MMXTy(*MS.C);
 2817     Type *ResTy = isX86_MMX ? IntegerType::get(*MS.C, 64) : I.getType();
 2901     Value *Origin = MS.TrackOrigins ? IRB.CreateLoad(MS.OriginTy, OriginPtr)
 2901     Value *Origin = MS.TrackOrigins ? IRB.CreateLoad(MS.OriginTy, OriginPtr)
 2928     if (MS.TrackOrigins) {
 2959     if (MS.TrackOrigins) {
 2976             getOrigin(PassThru), IRB.CreateLoad(MS.OriginTy, OriginPtr));
 3263       if (ClHandleAsmConservative && MS.CompileKernel)
 3336       if (MS.TrackOrigins && !ArgIsInitialized)
 3384     if (MS.TrackOrigins)
 3385       setOrigin(&I, IRBAfter.CreateLoad(MS.OriginTy,
 3413       if (MS.TrackOrigins)
 3429     if (MS.TrackOrigins)
 3430       setOrigin(&I, IRB.CreatePHI(MS.OriginTy, I.getNumIncomingValues(),
 3449       IRB.CreateCall(MS.MsanPoisonStackFn,
 3460     if (PoisonStack && MS.TrackOrigins) {
 3462       IRB.CreateCall(MS.MsanSetAllocaOrigin4Fn,
 3465                       IRB.CreatePointerCast(&F, MS.IntptrTy)});
 3472       IRB.CreateCall(MS.MsanPoisonAllocaFn,
 3476       IRB.CreateCall(MS.MsanUnpoisonAllocaFn,
 3487     Value *Len = ConstantInt::get(MS.IntptrTy, TypeSize);
 3491     if (MS.CompileKernel)
 3538     if (MS.TrackOrigins) {
 3645     Value *SizeVal = ConstantInt::get(MS.IntptrTy, Size);
 3646     IRB.CreateCall(MS.MsanInstrumentAsmStoreFn, {Ptr, SizeVal});