• Home
  • Raw
  • Download

Lines Matching refs:DFS

284   DataFlowSanitizer &DFS;  member
307 DFSanFunction(DataFlowSanitizer &DFS, Function *F, bool IsNativeABI) in DFSanFunction()
308 : DFS(DFS), F(F), IA(DFS.getInstrumentedABI()), in DFSanFunction()
853 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow); in runOnModule()
857 ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn, {}); in runOnModule()
868 if (DFS.ArgTLS) in getArgTLSPtr()
869 return ArgTLSPtr = DFS.ArgTLS; in getArgTLSPtr()
872 return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLS, {}); in getArgTLSPtr()
878 if (DFS.RetvalTLS) in getRetvalTLS()
879 return RetvalTLSPtr = DFS.RetvalTLS; in getRetvalTLS()
882 return RetvalTLSPtr = IRB.CreateCall(DFS.GetRetvalTLS, {}); in getRetvalTLS()
892 return DFS.ZeroShadow; in getShadow()
897 return DFS.ZeroShadow; in getShadow()
902 DFS.ArgTLS ? &*F->getEntryBlock().begin() in getShadow()
914 assert(Shadow->getType() == DFS.ShadowTy); in getShadow()
920 Shadow = DFS.ZeroShadow; in getShadow()
928 assert(Shadow->getType() == DFS.ShadowTy); in setShadow()
951 if (V1 == DFS.ZeroShadow) in combineShadows()
953 if (V2 == DFS.ZeroShadow) in combineShadows()
985 CallInst *Call = IRB.CreateCall(DFS.DFSanCheckedUnionFn, {V1, V2}); in combineShadows()
996 Ne, Pos, /*Unreachable=*/false, DFS.ColdCallWeights, &DT)); in combineShadows()
998 CallInst *Call = ThenIRB.CreateCall(DFS.DFSanUnionFn, {V1, V2}); in combineShadows()
1004 PHINode *Phi = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front()); in combineShadows()
1033 return DFS.ZeroShadow; in combineOperandShadows()
1060 uint64_t ShadowAlign = Align * DFS.ShadowWidth / 8; in loadShadow()
1074 return DFS.ZeroShadow; in loadShadow()
1076 Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos); in loadShadow()
1079 return DFS.ZeroShadow; in loadShadow()
1087 Value *ShadowAddr1 = IRB.CreateGEP(DFS.ShadowTy, ShadowAddr, in loadShadow()
1088 ConstantInt::get(DFS.IntptrTy, 1)); in loadShadow()
1093 if (!AvoidNewBlocks && Size % (64 / DFS.ShadowWidth) == 0) { in loadShadow()
1097 BasicBlock *FallbackBB = BasicBlock::Create(*DFS.Ctx, "", F); in loadShadow()
1100 DFS.DFSanUnionLoadFn, in loadShadow()
1101 {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)}); in loadShadow()
1108 IRB.CreateBitCast(ShadowAddr, Type::getInt64PtrTy(*DFS.Ctx)); in loadShadow()
1110 Value *TruncShadow = IRB.CreateTrunc(WideShadow, DFS.ShadowTy); in loadShadow()
1111 Value *ShlShadow = IRB.CreateShl(WideShadow, DFS.ShadowWidth); in loadShadow()
1112 Value *ShrShadow = IRB.CreateLShr(WideShadow, 64 - DFS.ShadowWidth); in loadShadow()
1135 for (uint64_t Ofs = 64 / DFS.ShadowWidth; Ofs != Size; in loadShadow()
1136 Ofs += 64 / DFS.ShadowWidth) { in loadShadow()
1137 BasicBlock *NextBB = BasicBlock::Create(*DFS.Ctx, "", F); in loadShadow()
1140 WideAddr = NextIRB.CreateGEP(Type::getInt64Ty(*DFS.Ctx), WideAddr, in loadShadow()
1141 ConstantInt::get(DFS.IntptrTy, 1)); in loadShadow()
1150 PHINode *Shadow = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front()); in loadShadow()
1158 DFS.DFSanUnionLoadFn, {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)}); in loadShadow()
1167 DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow); in visitLoadInst()
1185 if (Shadow != DFSF.DFS.ZeroShadow) in visitLoadInst()
1203 uint64_t ShadowAlign = Align * DFS.ShadowWidth / 8; in storeShadow()
1205 Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos); in storeShadow()
1206 if (Shadow == DFS.ZeroShadow) { in storeShadow()
1207 IntegerType *ShadowTy = IntegerType::get(*DFS.Ctx, Size * DFS.ShadowWidth); in storeShadow()
1215 const unsigned ShadowVecSize = 128 / DFS.ShadowWidth; in storeShadow()
1218 VectorType *ShadowVecTy = VectorType::get(DFS.ShadowTy, ShadowVecSize); in storeShadow()
1222 ShadowVec, Shadow, ConstantInt::get(Type::getInt32Ty(*DFS.Ctx), i)); in storeShadow()
1237 IRB.CreateConstGEP1_32(DFS.ShadowTy, ShadowAddr, Offset); in storeShadow()
1315 DFSF.AllocaShadowMap[&I] = IRB.CreateAlloca(DFSF.DFS.ShadowTy); in visitAllocaInst()
1317 DFSF.setShadow(&I, DFSF.DFS.ZeroShadow); in visitAllocaInst()
1345 IRB.CreateCall(DFSF.DFS.DFSanSetLabelFn, in visitMemSetInst()
1347 *DFSF.DFS.Ctx)), in visitMemSetInst()
1348 IRB.CreateZExtOrTrunc(I.getLength(), DFSF.DFS.IntptrTy)}); in visitMemSetInst()
1353 Value *DestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I); in visitMemTransferInst()
1354 Value *SrcShadow = DFSF.DFS.getShadowAddress(I.getSource(), &I); in visitMemTransferInst()
1357 ConstantInt::get(I.getLength()->getType(), DFSF.DFS.ShadowWidth / 8)); in visitMemTransferInst()
1362 DFSF.DFS.ShadowWidth / 8)); in visitMemTransferInst()
1365 DFSF.DFS.ShadowWidth / 8); in visitMemTransferInst()
1367 Type *Int8Ptr = Type::getInt8PtrTy(*DFSF.DFS.Ctx); in visitMemTransferInst()
1406 if (F == DFSF.DFS.DFSanVarargWrapperFn) in visitCallSite()
1412 DFSF.DFS.UnwrappedFnMap.find(CS.getCalledValue()); in visitCallSite()
1413 if (i != DFSF.DFS.UnwrappedFnMap.end()) { in visitCallSite()
1415 switch (DFSF.DFS.getWrapperKind(F)) { in visitCallSite()
1418 IRB.CreateCall(DFSF.DFS.DFSanUnimplementedFn, in visitCallSite()
1420 DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow); in visitCallSite()
1425 DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow); in visitCallSite()
1439 FunctionType *CustomFT = DFSF.DFS.getCustomFunctionType(FT); in visitCallSite()
1443 DFSF.DFS.Mod->getOrInsertFunction(CustomFName, CustomFT); in visitCallSite()
1450 DFSF.DFS.ReadOnlyNoneAttrs); in visitCallSite()
1467 Constant *T = DFSF.DFS.getOrBuildTrampolineFunction(ParamFT, TName); in visitCallSite()
1470 IRB.CreateBitCast(*i, Type::getInt8PtrTy(*DFSF.DFS.Ctx))); in visitCallSite()
1481 auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy, in visitCallSite()
1497 new AllocaInst(DFSF.DFS.ShadowTy, "labelreturn", in visitCallSite()
1526 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1548 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1559 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) { in visitCallSite()
1560 FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT); in visitCallSite()
1575 ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize); in visitCallSite()
1596 *DFSF.DFS.Ctx, AttributeSet::ReturnIndex, in visitCallSite()
1618 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN); in visitPHINode()
1621 Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy); in visitPHINode()