• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Instrumentation/

Lines Matching defs:DFS

407   DataFlowSanitizer &DFS;
430 DFSanFunction(DataFlowSanitizer &DFS, Function *F, bool IsNativeABI)
431 : DFS(DFS), F(F), IA(DFS.getInstrumentedABI()), IsNativeABI(IsNativeABI) {
1047 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow);
1051 ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn, {});
1063 if (DFS.ArgTLS)
1064 return ArgTLSPtr = DFS.ArgTLS;
1067 return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLSTy, DFS.GetArgTLS, {});
1073 if (DFS.RetvalTLS)
1074 return RetvalTLSPtr = DFS.RetvalTLS;
1078 IRB.CreateCall(DFS.GetRetvalTLSTy, DFS.GetRetvalTLS, {});
1083 return IRB.CreateConstGEP2_64(ArrayType::get(DFS.ShadowTy, 64),
1089 return DFS.ZeroShadow;
1094 return DFS.ZeroShadow;
1099 DFS.ArgTLS ? &*F->getEntryBlock().begin()
1103 IRB.CreateLoad(DFS.ShadowTy, getArgTLS(A->getArgNo(), ArgTLSPos));
1112 assert(Shadow->getType() == DFS.ShadowTy);
1118 Shadow = DFS.ZeroShadow;
1126 assert(Shadow->getType() == DFS.ShadowTy);
1149 if (V1 == DFS.ZeroShadow)
1151 if (V2 == DFS.ZeroShadow)
1183 CallInst *Call = IRB.CreateCall(DFS.DFSanCheckedUnionFn, {V1, V2});
1194 Ne, Pos, /*Unreachable=*/false, DFS.ColdCallWeights, &DT));
1196 CallInst *Call = ThenIRB.CreateCall(DFS.DFSanUnionFn, {V1, V2});
1202 PHINode *Phi = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
1231 return DFS.ZeroShadow;
1254 return IRB.CreateLoad(DFS.ShadowTy, i->second);
1258 const llvm::Align ShadowAlign(Align * DFS.ShadowWidthBytes);
1272 return DFS.ZeroShadow;
1274 Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos);
1277 return DFS.ZeroShadow;
1279 LoadInst *LI = new LoadInst(DFS.ShadowTy, ShadowAddr, "", Pos);
1285 Value *ShadowAddr1 = IRB.CreateGEP(DFS.ShadowTy, ShadowAddr,
1286 ConstantInt::get(DFS.IntptrTy, 1));
1288 IRB.CreateAlignedLoad(DFS.ShadowTy, ShadowAddr, ShadowAlign),
1289 IRB.CreateAlignedLoad(DFS.ShadowTy, ShadowAddr1, ShadowAlign), Pos);
1292 if (!AvoidNewBlocks && Size % (64 / DFS.ShadowWidthBits) == 0) {
1296 BasicBlock *FallbackBB = BasicBlock::Create(*DFS.Ctx, "", F);
1299 DFS.DFSanUnionLoadFn,
1300 {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)});
1307 IRB.CreateBitCast(ShadowAddr, Type::getInt64PtrTy(*DFS.Ctx));
1310 Value *TruncShadow = IRB.CreateTrunc(WideShadow, DFS.ShadowTy);
1311 Value *ShlShadow = IRB.CreateShl(WideShadow, DFS.ShadowWidthBits);
1312 Value *ShrShadow = IRB.CreateLShr(WideShadow, 64 - DFS.ShadowWidthBits);
1335 for (uint64_t Ofs = 64 / DFS.ShadowWidthBits; Ofs != Size;
1336 Ofs += 64 / DFS.ShadowWidthBits) {
1337 BasicBlock *NextBB = BasicBlock::Create(*DFS.Ctx, "", F);
1340 WideAddr = NextIRB.CreateGEP(Type::getInt64Ty(*DFS.Ctx), WideAddr,
1341 ConstantInt::get(DFS.IntptrTy, 1));
1351 PHINode *Shadow = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
1359 DFS.DFSanUnionLoadFn, {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)});
1368 DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow);
1379 if (Shadow != DFSF.DFS.ZeroShadow)
1385 IRB.CreateCall(DFSF.DFS.DFSanLoadCallbackFn, Shadow);
1400 const Align ShadowAlign(Alignment.value() * DFS.ShadowWidthBytes);
1402 Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos);
1403 if (Shadow == DFS.ZeroShadow) {
1405 IntegerType::get(*DFS.Ctx, Size * DFS.ShadowWidthBits);
1413 const unsigned ShadowVecSize = 128 / DFS.ShadowWidthBits;
1416 auto *ShadowVecTy = FixedVectorType::get(DFS.ShadowTy, ShadowVecSize);
1420 ShadowVec, Shadow, ConstantInt::get(Type::getInt32Ty(*DFS.Ctx), i));
1435 IRB.CreateConstGEP1_32(DFS.ShadowTy, ShadowAddr, Offset);
1458 IRB.CreateCall(DFSF.DFS.DFSanStoreCallbackFn, Shadow);
1476 IRB.CreateCall(DFSF.DFS.DFSanCmpCallbackFn, CombinedShadow);
1520 DFSF.AllocaShadowMap[&I] = IRB.CreateAlloca(DFSF.DFS.ShadowTy);
1522 DFSF.setShadow(&I, DFSF.DFS.ZeroShadow);
1550 IRB.CreateCall(DFSF.DFS.DFSanSetLabelFn,
1552 *DFSF.DFS.Ctx)),
1553 IRB.CreateZExtOrTrunc(I.getLength(), DFSF.DFS.IntptrTy)});
1558 Value *RawDestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I);
1559 Value *SrcShadow = DFSF.DFS.getShadowAddress(I.getSource(), &I);
1562 DFSF.DFS.ShadowWidthBytes));
1563 Type *Int8Ptr = Type::getInt8PtrTy(*DFSF.DFS.Ctx);
1570 MTI->setDestAlignment(I.getDestAlign() * DFSF.DFS.ShadowWidthBytes);
1571 MTI->setSourceAlignment(I.getSourceAlign() * DFSF.DFS.ShadowWidthBytes);
1573 MTI->setDestAlignment(Align(DFSF.DFS.ShadowWidthBytes));
1574 MTI->setSourceAlignment(Align(DFSF.DFS.ShadowWidthBytes));
1577 IRB.CreateCall(DFSF.DFS.DFSanMemTransferCallbackFn,
1614 if (F == DFSF.DFS.DFSanVarargWrapperFn.getCallee()->stripPointerCasts())
1620 DFSF.DFS.UnwrappedFnMap.find(CB.getCalledOperand());
1621 if (i != DFSF.DFS.UnwrappedFnMap.end()) {
1623 switch (DFSF.DFS.getWrapperKind(F)) {
1626 IRB.CreateCall(DFSF.DFS.DFSanUnimplementedFn,
1628 DFSF.setShadow(&CB, DFSF.DFS.ZeroShadow);
1632 DFSF.setShadow(&CB, DFSF.DFS.ZeroShadow);
1644 TransformedFunction CustomFn = DFSF.DFS.getCustomFunctionType(FT);
1647 FunctionCallee CustomF = DFSF.DFS.Mod->getOrInsertFunction(
1655 DFSF.DFS.ReadOnlyNoneAttrs);
1672 Constant *T = DFSF.DFS.getOrBuildTrampolineFunction(ParamFT, TName);
1675 IRB.CreateBitCast(*i, Type::getInt8PtrTy(*DFSF.DFS.Ctx)));
1687 auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy,
1704 new AllocaInst(DFSF.DFS.ShadowTy,
1724 if (CustomCI->getArgOperand(ArgNo)->getType() == DFSF.DFS.ShadowTy)
1730 IRB.CreateLoad(DFSF.DFS.ShadowTy, DFSF.LabelReturnAlloca);
1743 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) {
1765 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) {
1767 LoadInst *LI = NextIRB.CreateLoad(DFSF.DFS.ShadowTy, DFSF.getRetvalTLS());
1776 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) {
1777 FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT);
1792 ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize);
1814 *DFSF.DFS.Ctx, AttributeList::ReturnIndex,
1834 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN);
1837 Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy);