• Home
  • Raw
  • Download

Lines Matching refs:DFSF

331   DFSanFunction &DFSF;  member in __anon267cbafd0111::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()
800 DFSanFunction DFSF(*this, i, FnsWithNativeABI.count(i)); in runOnModule() local
816 if (!DFSF.SkipInsts.count(Inst)) in runOnModule()
817 DFSanVisitor(DFSF).visit(Inst); in runOnModule()
829 i = DFSF.PHIFixups.begin(), in runOnModule()
830 e = DFSF.PHIFixups.end(); in runOnModule()
835 val, DFSF.getShadow(i->first->getIncomingValue(val))); in runOnModule()
844 for (Value *V : DFSF.NonZeroChecks) { in runOnModule()
849 Pos = &DFSF.F->getEntryBlock().front(); in runOnModule()
853 Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow); in runOnModule()
857 ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn, {}); in runOnModule()
1043 Value *CombinedShadow = DFSF.combineOperandShadows(&I); in visitOperandShadowInst()
1044 DFSF.setShadow(&I, CombinedShadow); in visitOperandShadowInst()
1167 DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow); in visitLoadInst()
1180 Value *Shadow = DFSF.loadShadow(LI.getPointerOperand(), Size, Align, &LI); in visitLoadInst()
1182 Value *PtrShadow = DFSF.getShadow(LI.getPointerOperand()); in visitLoadInst()
1183 Shadow = DFSF.combineShadows(Shadow, PtrShadow, &LI); in visitLoadInst()
1185 if (Shadow != DFSF.DFS.ZeroShadow) in visitLoadInst()
1186 DFSF.NonZeroChecks.push_back(Shadow); in visitLoadInst()
1188 DFSF.setShadow(&LI, Shadow); in visitLoadInst()
1259 Value* Shadow = DFSF.getShadow(SI.getValueOperand()); in visitStoreInst()
1261 Value *PtrShadow = DFSF.getShadow(SI.getPointerOperand()); in visitStoreInst()
1262 Shadow = DFSF.combineShadows(Shadow, PtrShadow, &SI); in visitStoreInst()
1264 DFSF.storeShadow(SI.getPointerOperand(), Size, Align, Shadow, &SI); in visitStoreInst()
1315 DFSF.AllocaShadowMap[&I] = IRB.CreateAlloca(DFSF.DFS.ShadowTy); in visitAllocaInst()
1317 DFSF.setShadow(&I, DFSF.DFS.ZeroShadow); in visitAllocaInst()
1321 Value *CondShadow = DFSF.getShadow(I.getCondition()); in visitSelectInst()
1322 Value *TrueShadow = DFSF.getShadow(I.getTrueValue()); in visitSelectInst()
1323 Value *FalseShadow = DFSF.getShadow(I.getFalseValue()); in visitSelectInst()
1326 DFSF.setShadow( in visitSelectInst()
1328 DFSF.combineShadows( in visitSelectInst()
1329 CondShadow, DFSF.combineShadows(TrueShadow, FalseShadow, &I), &I)); in visitSelectInst()
1338 DFSF.setShadow(&I, DFSF.combineShadows(CondShadow, ShadowSel, &I)); in visitSelectInst()
1344 Value *ValShadow = DFSF.getShadow(I.getValue()); in visitMemSetInst()
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()
1375 if (!DFSF.IsNativeABI && RI.getReturnValue()) { in visitReturnInst()
1376 switch (DFSF.IA) { in visitReturnInst()
1378 Value *S = DFSF.getShadow(RI.getReturnValue()); in visitReturnInst()
1380 IRB.CreateStore(S, DFSF.getRetvalTLS()); in visitReturnInst()
1385 Type *RT = DFSF.F->getFunctionType()->getReturnType(); in visitReturnInst()
1389 IRB.CreateInsertValue(InsVal, DFSF.getShadow(RI.getReturnValue()), 1); in visitReturnInst()
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()
1478 Args.push_back(DFSF.getShadow(*i)); in visitCallSite()
1481 auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy, in visitCallSite()
1484 LabelVATy, "labelva", &DFSF.F->getEntryBlock().front()); in visitCallSite()
1488 IRB.CreateStore(DFSF.getShadow(*i), LabelVAPtr); in visitCallSite()
1495 if (!DFSF.LabelReturnAlloca) { in visitCallSite()
1496 DFSF.LabelReturnAlloca = in visitCallSite()
1497 new AllocaInst(DFSF.DFS.ShadowTy, "labelreturn", in visitCallSite()
1498 &DFSF.F->getEntryBlock().front()); in visitCallSite()
1500 Args.push_back(DFSF.LabelReturnAlloca); in visitCallSite()
1511 LoadInst *LabelLoad = IRB.CreateLoad(DFSF.LabelReturnAlloca); in visitCallSite()
1512 DFSF.setShadow(CustomCI, LabelLoad); in visitCallSite()
1526 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1528 IRB.CreateStore(DFSF.getShadow(CS.getArgument(i)), in visitCallSite()
1529 DFSF.getArgTLS(i, CS.getInstruction())); in visitCallSite()
1540 SplitEdge(II->getParent(), II->getNormalDest(), &DFSF.DT); in visitCallSite()
1548 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) { in visitCallSite()
1550 LoadInst *LI = NextIRB.CreateLoad(DFSF.getRetvalTLS()); in visitCallSite()
1551 DFSF.SkipInsts.insert(LI); in visitCallSite()
1552 DFSF.setShadow(CS.getInstruction(), LI); in visitCallSite()
1553 DFSF.NonZeroChecks.push_back(LI); in visitCallSite()
1559 if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) { in visitCallSite()
1560 FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT); in visitCallSite()
1571 Args.push_back(DFSF.getShadow(*i)); in visitCallSite()
1575 ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize); in visitCallSite()
1577 new AllocaInst(VarArgArrayTy, "", &DFSF.F->getEntryBlock().front()); in visitCallSite()
1581 DFSF.getShadow(*i), in visitCallSite()
1596 *DFSF.DFS.Ctx, AttributeSet::ReturnIndex, in visitCallSite()
1602 DFSF.SkipInsts.insert(ExVal); in visitCallSite()
1605 DFSF.SkipInsts.insert(ExShadow); in visitCallSite()
1606 DFSF.setShadow(ExVal, ExShadow); in visitCallSite()
1607 DFSF.NonZeroChecks.push_back(ExShadow); in visitCallSite()
1618 PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN); in visitPHINode()
1621 Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy); in visitPHINode()
1627 DFSF.PHIFixups.push_back(std::make_pair(&PN, ShadowPN)); in visitPHINode()
1628 DFSF.setShadow(&PN, ShadowPN); in visitPHINode()