Lines Matching refs:DFSF

331   DFSanFunction &DFSF;  member in __anonf274973e0111::DFSanVisitor
332 DFSanVisitor(DFSanFunction &DFSF) : DFSF(DFSF) {} in DFSanVisitor() argument
591 DFSanFunction DFSF(*this, F, /*IsNativeABI=*/true); in getOrBuildTrampolineFunction() local
594 DFSF.ValShadowMap[&*ValAI] = &*ShadowAI; in getOrBuildTrampolineFunction()
595 DFSanVisitor(DFSF).visitCallInst(*CI); in getOrBuildTrampolineFunction()
597 new StoreInst(DFSF.getShadow(RI->getReturnValue()), in getOrBuildTrampolineFunction()
802 DFSanFunction DFSF(*this, *i, FnsWithNativeABI.count(*i)); in runOnModule() local
821 if (!DFSF.SkipInsts.count(Inst)) in runOnModule()
822 DFSanVisitor(DFSF).visit(Inst); in runOnModule()
834 i = DFSF.PHIFixups.begin(), in runOnModule()
835 e = DFSF.PHIFixups.end(); in runOnModule()
840 val, DFSF.getShadow(i->first->getIncomingValue(val))); in runOnModule()
849 for (Value *V : DFSF.NonZeroChecks) { in runOnModule()
854 Pos = &DFSF.F->getEntryBlock().front(); in runOnModule()
858 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow); in runOnModule()
862 ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn, {}); in runOnModule()
1048 Value *CombinedShadow = DFSF.combineOperandShadows(&I); in visitOperandShadowInst()
1049 DFSF.setShadow(&I, CombinedShadow); in visitOperandShadowInst()
1173 DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow); in visitLoadInst()
1186 Value *Shadow = DFSF.loadShadow(LI.getPointerOperand(), Size, Align, &LI); in visitLoadInst()
1188 Value *PtrShadow = DFSF.getShadow(LI.getPointerOperand()); in visitLoadInst()
1189 Shadow = DFSF.combineShadows(Shadow, PtrShadow, &LI); in visitLoadInst()
1191 if (Shadow != DFSF.DFS.ZeroShadow) in visitLoadInst()
1192 DFSF.NonZeroChecks.push_back(Shadow); in visitLoadInst()
1194 DFSF.setShadow(&LI, Shadow); in visitLoadInst()
1265 Value* Shadow = DFSF.getShadow(SI.getValueOperand()); in visitStoreInst()
1267 Value *PtrShadow = DFSF.getShadow(SI.getPointerOperand()); in visitStoreInst()
1268 Shadow = DFSF.combineShadows(Shadow, PtrShadow, &SI); in visitStoreInst()
1270 DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI); in visitStoreInst()
1321 DFSF.AllocaShadowMap[&I] = IRB.CreateAlloca(DFSF.DFS.ShadowTy); in visitAllocaInst()
1323 DFSF.setShadow(&I, DFSF.DFS.ZeroShadow); in visitAllocaInst()
1327 Value *CondShadow = DFSF.getShadow(I.getCondition()); in visitSelectInst()
1328 Value *TrueShadow = DFSF.getShadow(I.getTrueValue()); in visitSelectInst()
1329 Value *FalseShadow = DFSF.getShadow(I.getFalseValue()); in visitSelectInst()
1332 DFSF.setShadow( in visitSelectInst()
1334 DFSF.combineShadows( in visitSelectInst()
1335 CondShadow, DFSF.combineShadows(TrueShadow, FalseShadow, &I), &I)); in visitSelectInst()
1344 DFSF.setShadow(&I, DFSF.combineShadows(CondShadow, ShadowSel, &I)); in visitSelectInst()
1350 Value *ValShadow = DFSF.getShadow(I.getValue()); in visitMemSetInst()
1351 IRB.CreateCall(DFSF.DFS.DFSanSetLabelFn, in visitMemSetInst()
1353 *DFSF.DFS.Ctx)), in visitMemSetInst()
1354 IRB.CreateZExtOrTrunc(I.getLength(), DFSF.DFS.IntptrTy)}); in visitMemSetInst()
1359 Value *DestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I); in visitMemTransferInst()
1360 Value *SrcShadow = DFSF.DFS.getShadowAddress(I.getSource(), &I); in visitMemTransferInst()
1363 ConstantInt::get(I.getLength()->getType(), DFSF.DFS.ShadowWidth / 8)); in visitMemTransferInst()
1368 DFSF.DFS.ShadowWidth / 8)); in visitMemTransferInst()
1371 DFSF.DFS.ShadowWidth / 8); in visitMemTransferInst()
1373 Type *Int8Ptr = Type::getInt8PtrTy(*DFSF.DFS.Ctx); in visitMemTransferInst()
1381 if (!DFSF.IsNativeABI && RI.getReturnValue()) { in visitReturnInst()
1382 switch (DFSF.IA) { in visitReturnInst()
1384 Value *S = DFSF.getShadow(RI.getReturnValue()); in visitReturnInst()
1386 IRB.CreateStore(S, DFSF.getRetvalTLS()); in visitReturnInst()
1391 Type *RT = DFSF.F->getFunctionType()->getReturnType(); in visitReturnInst()
1395 IRB.CreateInsertValue(InsVal, DFSF.getShadow(RI.getReturnValue()), 1); in visitReturnInst()
1412 if (F == DFSF.DFS.DFSanVarargWrapperFn) in visitCallSite()
1422 DFSF.DFS.UnwrappedFnMap.find(CS.getCalledValue()); in visitCallSite()
1423 if (i != DFSF.DFS.UnwrappedFnMap.end()) { in visitCallSite()
1425 switch (DFSF.DFS.getWrapperKind(F)) { in visitCallSite()
1428 IRB.CreateCall(DFSF.DFS.DFSanUnimplementedFn, in visitCallSite()
1430 DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow); in visitCallSite()
1435 DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow); in visitCallSite()
1449 FunctionType *CustomFT = DFSF.DFS.getCustomFunctionType(FT); in visitCallSite()
1453 DFSF.DFS.Mod->getOrInsertFunction(CustomFName, CustomFT); in visitCallSite()
1460 DFSF.DFS.ReadOnlyNoneAttrs); in visitCallSite()
1477 Constant *T = DFSF.DFS.getOrBuildTrampolineFunction(ParamFT, TName); in visitCallSite()
1480 IRB.CreateBitCast(*i, Type::getInt8PtrTy(*DFSF.DFS.Ctx))); in visitCallSite()
1488 Args.push_back(DFSF.getShadow(*i)); in visitCallSite()
1491 auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy, in visitCallSite()
1494 LabelVATy, "labelva", &DFSF.F->getEntryBlock().front()); in visitCallSite()
1498 IRB.CreateStore(DFSF.getShadow(*i), LabelVAPtr); in visitCallSite()
1505 if (!DFSF.LabelReturnAlloca) { in visitCallSite()
1506 DFSF.LabelReturnAlloca = in visitCallSite()
1507 new AllocaInst(DFSF.DFS.ShadowTy, "labelreturn", in visitCallSite()
1508 &DFSF.F->getEntryBlock().front()); in visitCallSite()
1510 Args.push_back(DFSF.LabelReturnAlloca); in visitCallSite()
1521 LoadInst *LabelLoad = IRB.CreateLoad(DFSF.LabelReturnAlloca); in visitCallSite()
1522 DFSF.setShadow(CustomCI, LabelLoad); in visitCallSite()
1536 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1538 IRB.CreateStore(DFSF.getShadow(CS.getArgument(i)), in visitCallSite()
1539 DFSF.getArgTLS(i, CS.getInstruction())); in visitCallSite()
1550 SplitEdge(II->getParent(), II->getNormalDest(), &DFSF.DT); in visitCallSite()
1558 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1560 LoadInst *LI = NextIRB.CreateLoad(DFSF.getRetvalTLS()); in visitCallSite()
1561 DFSF.SkipInsts.insert(LI); in visitCallSite()
1562 DFSF.setShadow(CS.getInstruction(), LI); in visitCallSite()
1563 DFSF.NonZeroChecks.push_back(LI); in visitCallSite()
1569 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) { in visitCallSite()
1570 FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT); in visitCallSite()
1581 Args.push_back(DFSF.getShadow(*i)); in visitCallSite()
1585 ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize); in visitCallSite()
1587 new AllocaInst(VarArgArrayTy, "", &DFSF.F->getEntryBlock().front()); in visitCallSite()
1591 DFSF.getShadow(*i), in visitCallSite()
1606 *DFSF.DFS.Ctx, AttributeSet::ReturnIndex, in visitCallSite()
1612 DFSF.SkipInsts.insert(ExVal); in visitCallSite()
1615 DFSF.SkipInsts.insert(ExShadow); in visitCallSite()
1616 DFSF.setShadow(ExVal, ExShadow); in visitCallSite()
1617 DFSF.NonZeroChecks.push_back(ExShadow); in visitCallSite()
1628 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN); in visitPHINode()
1631 Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy); in visitPHINode()
1637 DFSF.PHIFixups.push_back(std::make_pair(&PN, ShadowPN)); in visitPHINode()
1638 DFSF.setShadow(&PN, ShadowPN); in visitPHINode()