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

Lines Matching refs:DFSF

453   DFSanFunction &DFSF;
455 DFSanVisitor(DFSanFunction &DFSF) : DFSF(DFSF) {}
458 return DFSF.F->getParent()->getDataLayout();
732 DFSanFunction DFSF(*this, F, /*IsNativeABI=*/true);
735 DFSF.ValShadowMap[&*ValAI] = &*ShadowAI;
736 DFSanVisitor(DFSF).visitCallInst(*CI);
738 new StoreInst(DFSF.getShadow(RI->getReturnValue()),
994 DFSanFunction DFSF(*this, i, FnsWithNativeABI.count(i));
1010 if (!DFSF.SkipInsts.count(Inst))
1011 DFSanVisitor(DFSF).visit(Inst);
1023 i = DFSF.PHIFixups.begin(),
1024 e = DFSF.PHIFixups.end();
1029 val, DFSF.getShadow(i->first->getIncomingValue(val)));
1038 for (Value *V : DFSF.NonZeroChecks) {
1043 Pos = &DFSF.F->getEntryBlock().front();
1047 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow);
1051 ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn, {});
1241 Value *CombinedShadow = DFSF.combineOperandShadows(&I);
1242 DFSF.setShadow(&I, CombinedShadow);
1368 DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow);
1374 DFSF.loadShadow(LI.getPointerOperand(), Size, Alignment.value(), &LI);
1376 Value *PtrShadow = DFSF.getShadow(LI.getPointerOperand());
1377 Shadow = DFSF.combineShadows(Shadow, PtrShadow, &LI);
1379 if (Shadow != DFSF.DFS.ZeroShadow)
1380 DFSF.NonZeroChecks.push_back(Shadow);
1382 DFSF.setShadow(&LI, Shadow);
1385 IRB.CreateCall(DFSF.DFS.DFSanLoadCallbackFn, Shadow);
1450 Value* Shadow = DFSF.getShadow(SI.getValueOperand());
1452 Value *PtrShadow = DFSF.getShadow(SI.getPointerOperand());
1453 Shadow = DFSF.combineShadows(Shadow, PtrShadow, &SI);
1455 DFSF.storeShadow(SI.getPointerOperand(), Size, Alignment, Shadow, &SI);
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);
1526 Value *CondShadow = DFSF.getShadow(I.getCondition());
1527 Value *TrueShadow = DFSF.getShadow(I.getTrueValue());
1528 Value *FalseShadow = DFSF.getShadow(I.getFalseValue());
1531 DFSF.setShadow(
1533 DFSF.combineShadows(
1534 CondShadow, DFSF.combineShadows(TrueShadow, FalseShadow, &I), &I));
1543 DFSF.setShadow(&I, DFSF.combineShadows(CondShadow, ShadowSel, &I));
1549 Value *ValShadow = DFSF.getShadow(I.getValue());
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,
1583 if (!DFSF.IsNativeABI && RI.getReturnValue()) {
1584 switch (DFSF.IA) {
1586 Value *S = DFSF.getShadow(RI.getReturnValue());
1588 IRB.CreateStore(S, DFSF.getRetvalTLS());
1593 Type *RT = DFSF.F->getFunctionType()->getReturnType();
1597 IRB.CreateInsertValue(InsVal, DFSF.getShadow(RI.getReturnValue()), 1);
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)));
1684 Args.push_back(DFSF.getShadow(*i));
1687 auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy,
1691 "labelva", &DFSF.F->getEntryBlock().front());
1695 IRB.CreateStore(DFSF.getShadow(*i), LabelVAPtr);
1702 if (!DFSF.LabelReturnAlloca) {
1703 DFSF.LabelReturnAlloca =
1704 new AllocaInst(DFSF.DFS.ShadowTy,
1706 "labelreturn", &DFSF.F->getEntryBlock().front());
1708 Args.push_back(DFSF.LabelReturnAlloca);
1724 if (CustomCI->getArgOperand(ArgNo)->getType() == DFSF.DFS.ShadowTy)
1730 IRB.CreateLoad(DFSF.DFS.ShadowTy, DFSF.LabelReturnAlloca);
1731 DFSF.setShadow(CustomCI, LabelLoad);
1743 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) {
1745 IRB.CreateStore(DFSF.getShadow(CB.getArgOperand(i)),
1746 DFSF.getArgTLS(i, &CB));
1757 SplitEdge(II->getParent(), II->getNormalDest(), &DFSF.DT);
1765 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) {
1767 LoadInst *LI = NextIRB.CreateLoad(DFSF.DFS.ShadowTy, DFSF.getRetvalTLS());
1768 DFSF.SkipInsts.insert(LI);
1769 DFSF.setShadow(&CB, LI);
1770 DFSF.NonZeroChecks.push_back(LI);
1776 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) {
1777 FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT);
1788 Args.push_back(DFSF.getShadow(*i));
1792 ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize);
1795 "", &DFSF.F->getEntryBlock().front());
1799 DFSF.getShadow(*i),
1814 *DFSF.DFS.Ctx, AttributeList::ReturnIndex,
1819 DFSF.SkipInsts.insert(ExVal);
1821 DFSF.SkipInsts.insert(ExShadow);
1822 DFSF.setShadow(ExVal, ExShadow);
1823 DFSF.NonZeroChecks.push_back(ExShadow);
1834 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN);
1837 Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy);
1843 DFSF.PHIFixups.push_back(std::make_pair(&PN, ShadowPN));
1844 DFSF.setShadow(&PN, ShadowPN);