• Home
  • Raw
  • Download

Lines Matching refs:DFS

277   DataFlowSanitizer &DFS;  member
300 DFSanFunction(DataFlowSanitizer &DFS, Function *F, bool IsNativeABI) in DFSanFunction()
301 : DFS(DFS), F(F), IA(DFS.getInstrumentedABI()), in DFSanFunction()
849 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow); in runOnModule()
853 ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn); in runOnModule()
864 if (DFS.ArgTLS) in getArgTLSPtr()
865 return ArgTLSPtr = DFS.ArgTLS; in getArgTLSPtr()
868 return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLS); in getArgTLSPtr()
874 if (DFS.RetvalTLS) in getRetvalTLS()
875 return RetvalTLSPtr = DFS.RetvalTLS; in getRetvalTLS()
878 return RetvalTLSPtr = IRB.CreateCall(DFS.GetRetvalTLS); in getRetvalTLS()
888 return DFS.ZeroShadow; in getShadow()
893 return DFS.ZeroShadow; in getShadow()
898 DFS.ArgTLS ? &*F->getEntryBlock().begin() in getShadow()
910 assert(Shadow->getType() == DFS.ShadowTy); in getShadow()
916 Shadow = DFS.ZeroShadow; in getShadow()
924 assert(Shadow->getType() == DFS.ShadowTy); in setShadow()
941 if (V1 == DFS.ZeroShadow) in combineShadows()
943 if (V2 == DFS.ZeroShadow) in combineShadows()
975 CallInst *Call = IRB.CreateCall2(DFS.DFSanCheckedUnionFn, V1, V2); in combineShadows()
986 Ne, Pos, /*Unreachable=*/false, DFS.ColdCallWeights, &DT)); in combineShadows()
988 CallInst *Call = ThenIRB.CreateCall2(DFS.DFSanUnionFn, V1, V2); in combineShadows()
994 PHINode *Phi = PHINode::Create(DFS.ShadowTy, 2, "", Tail->begin()); in combineShadows()
1023 return DFS.ZeroShadow; in combineOperandShadows()
1050 uint64_t ShadowAlign = Align * DFS.ShadowWidth / 8; in loadShadow()
1065 return DFS.ZeroShadow; in loadShadow()
1067 Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos); in loadShadow()
1070 return DFS.ZeroShadow; in loadShadow()
1078 Value *ShadowAddr1 = IRB.CreateGEP(DFS.ShadowTy, ShadowAddr, in loadShadow()
1079 ConstantInt::get(DFS.IntptrTy, 1)); in loadShadow()
1084 if (!AvoidNewBlocks && Size % (64 / DFS.ShadowWidth) == 0) { in loadShadow()
1088 BasicBlock *FallbackBB = BasicBlock::Create(*DFS.Ctx, "", F); in loadShadow()
1091 DFS.DFSanUnionLoadFn, ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)); in loadShadow()
1098 IRB.CreateBitCast(ShadowAddr, Type::getInt64PtrTy(*DFS.Ctx)); in loadShadow()
1100 Value *TruncShadow = IRB.CreateTrunc(WideShadow, DFS.ShadowTy); in loadShadow()
1101 Value *ShlShadow = IRB.CreateShl(WideShadow, DFS.ShadowWidth); in loadShadow()
1102 Value *ShrShadow = IRB.CreateLShr(WideShadow, 64 - DFS.ShadowWidth); in loadShadow()
1125 for (uint64_t Ofs = 64 / DFS.ShadowWidth; Ofs != Size; in loadShadow()
1126 Ofs += 64 / DFS.ShadowWidth) { in loadShadow()
1127 BasicBlock *NextBB = BasicBlock::Create(*DFS.Ctx, "", F); in loadShadow()
1130 WideAddr = NextIRB.CreateGEP(Type::getInt64Ty(*DFS.Ctx), WideAddr, in loadShadow()
1131 ConstantInt::get(DFS.IntptrTy, 1)); in loadShadow()
1140 PHINode *Shadow = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front()); in loadShadow()
1148 DFS.DFSanUnionLoadFn, ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)); in loadShadow()
1157 DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow); in visitLoadInst()
1175 if (Shadow != DFSF.DFS.ZeroShadow) in visitLoadInst()
1193 uint64_t ShadowAlign = Align * DFS.ShadowWidth / 8; in storeShadow()
1195 Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos); in storeShadow()
1196 if (Shadow == DFS.ZeroShadow) { in storeShadow()
1197 IntegerType *ShadowTy = IntegerType::get(*DFS.Ctx, Size * DFS.ShadowWidth); in storeShadow()
1205 const unsigned ShadowVecSize = 128 / DFS.ShadowWidth; in storeShadow()
1208 VectorType *ShadowVecTy = VectorType::get(DFS.ShadowTy, ShadowVecSize); in storeShadow()
1212 ShadowVec, Shadow, ConstantInt::get(Type::getInt32Ty(*DFS.Ctx), i)); in storeShadow()
1227 IRB.CreateConstGEP1_32(DFS.ShadowTy, ShadowAddr, Offset); in storeShadow()
1305 DFSF.AllocaShadowMap[&I] = IRB.CreateAlloca(DFSF.DFS.ShadowTy); in visitAllocaInst()
1307 DFSF.setShadow(&I, DFSF.DFS.ZeroShadow); in visitAllocaInst()
1336 DFSF.DFS.DFSanSetLabelFn, ValShadow, in visitMemSetInst()
1337 IRB.CreateBitCast(I.getDest(), Type::getInt8PtrTy(*DFSF.DFS.Ctx)), in visitMemSetInst()
1338 IRB.CreateZExtOrTrunc(I.getLength(), DFSF.DFS.IntptrTy)); in visitMemSetInst()
1343 Value *DestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I); in visitMemTransferInst()
1344 Value *SrcShadow = DFSF.DFS.getShadowAddress(I.getSource(), &I); in visitMemTransferInst()
1347 ConstantInt::get(I.getLength()->getType(), DFSF.DFS.ShadowWidth / 8)); in visitMemTransferInst()
1352 DFSF.DFS.ShadowWidth / 8)); in visitMemTransferInst()
1355 DFSF.DFS.ShadowWidth / 8); in visitMemTransferInst()
1357 Type *Int8Ptr = Type::getInt8PtrTy(*DFSF.DFS.Ctx); in visitMemTransferInst()
1396 if (F == DFSF.DFS.DFSanVarargWrapperFn) in visitCallSite()
1406 DFSF.DFS.UnwrappedFnMap.find(CS.getCalledValue()); in visitCallSite()
1407 if (i != DFSF.DFS.UnwrappedFnMap.end()) { in visitCallSite()
1409 switch (DFSF.DFS.getWrapperKind(F)) { in visitCallSite()
1412 IRB.CreateCall(DFSF.DFS.DFSanUnimplementedFn, in visitCallSite()
1414 DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow); in visitCallSite()
1419 DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow); in visitCallSite()
1433 FunctionType *CustomFT = DFSF.DFS.getCustomFunctionType(FT); in visitCallSite()
1437 DFSF.DFS.Mod->getOrInsertFunction(CustomFName, CustomFT); in visitCallSite()
1444 DFSF.DFS.ReadOnlyNoneAttrs); in visitCallSite()
1461 Constant *T = DFSF.DFS.getOrBuildTrampolineFunction(ParamFT, TName); in visitCallSite()
1464 IRB.CreateBitCast(*i, Type::getInt8PtrTy(*DFSF.DFS.Ctx))); in visitCallSite()
1475 auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy, in visitCallSite()
1491 new AllocaInst(DFSF.DFS.ShadowTy, "labelreturn", in visitCallSite()
1520 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1541 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1552 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) { in visitCallSite()
1553 FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT); in visitCallSite()
1568 ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize); in visitCallSite()
1589 *DFSF.DFS.Ctx, AttributeSet::ReturnIndex, in visitCallSite()
1612 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN); in visitPHINode()
1615 Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy); in visitPHINode()