reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
  984         Value *Ne = IRB.CreateICmpNE(V, DFSF.DFS.ZeroShadow);
  988         ThenIRB.CreateCall(DFSF.DFS.DFSanNonzeroLabelFn, {});
  999   if (DFS.ArgTLS)
 1000     return ArgTLSPtr = DFS.ArgTLS;
 1003   return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLSTy, DFS.GetArgTLS, {});
 1003   return ArgTLSPtr = IRB.CreateCall(DFS.GetArgTLSTy, DFS.GetArgTLS, {});
 1009   if (DFS.RetvalTLS)
 1010     return RetvalTLSPtr = DFS.RetvalTLS;
 1014              IRB.CreateCall(DFS.GetRetvalTLSTy, DFS.GetRetvalTLS, {});
 1014              IRB.CreateCall(DFS.GetRetvalTLSTy, DFS.GetRetvalTLS, {});
 1019   return IRB.CreateConstGEP2_64(ArrayType::get(DFS.ShadowTy, 64),
 1025     return DFS.ZeroShadow;
 1030         return DFS.ZeroShadow;
 1035             DFS.ArgTLS ? &*F->getEntryBlock().begin()
 1039             IRB.CreateLoad(DFS.ShadowTy, getArgTLS(A->getArgNo(), ArgTLSPos));
 1048         assert(Shadow->getType() == DFS.ShadowTy);
 1054       Shadow = DFS.ZeroShadow;
 1062   assert(Shadow->getType() == DFS.ShadowTy);
 1085   if (V1 == DFS.ZeroShadow)
 1087   if (V2 == DFS.ZeroShadow)
 1119     CallInst *Call = IRB.CreateCall(DFS.DFSanCheckedUnionFn, {V1, V2});
 1130         Ne, Pos, /*Unreachable=*/false, DFS.ColdCallWeights, &DT));
 1132     CallInst *Call = ThenIRB.CreateCall(DFS.DFSanUnionFn, {V1, V2});
 1138     PHINode *Phi = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
 1167     return DFS.ZeroShadow;
 1189       return IRB.CreateLoad(DFS.ShadowTy, i->second);
 1193   uint64_t ShadowAlign = Align * DFS.ShadowWidth / 8;
 1207     return DFS.ZeroShadow;
 1209   Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos);
 1212     return DFS.ZeroShadow;
 1214     LoadInst *LI = new LoadInst(DFS.ShadowTy, ShadowAddr, "", Pos);
 1220     Value *ShadowAddr1 = IRB.CreateGEP(DFS.ShadowTy, ShadowAddr,
 1221                                        ConstantInt::get(DFS.IntptrTy, 1));
 1223         IRB.CreateAlignedLoad(DFS.ShadowTy, ShadowAddr, ShadowAlign),
 1224         IRB.CreateAlignedLoad(DFS.ShadowTy, ShadowAddr1, ShadowAlign), Pos);
 1227   if (!AvoidNewBlocks && Size % (64 / DFS.ShadowWidth) == 0) {
 1231     BasicBlock *FallbackBB = BasicBlock::Create(*DFS.Ctx, "", F);
 1234         DFS.DFSanUnionLoadFn,
 1235         {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)});
 1242         IRB.CreateBitCast(ShadowAddr, Type::getInt64PtrTy(*DFS.Ctx));
 1245     Value *TruncShadow = IRB.CreateTrunc(WideShadow, DFS.ShadowTy);
 1246     Value *ShlShadow = IRB.CreateShl(WideShadow, DFS.ShadowWidth);
 1247     Value *ShrShadow = IRB.CreateLShr(WideShadow, 64 - DFS.ShadowWidth);
 1270     for (uint64_t Ofs = 64 / DFS.ShadowWidth; Ofs != Size;
 1271          Ofs += 64 / DFS.ShadowWidth) {
 1272       BasicBlock *NextBB = BasicBlock::Create(*DFS.Ctx, "", F);
 1275       WideAddr = NextIRB.CreateGEP(Type::getInt64Ty(*DFS.Ctx), WideAddr,
 1276                                    ConstantInt::get(DFS.IntptrTy, 1));
 1286     PHINode *Shadow = PHINode::Create(DFS.ShadowTy, 2, "", &Tail->front());
 1294       DFS.DFSanUnionLoadFn, {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)});
 1294       DFS.DFSanUnionLoadFn, {ShadowAddr, ConstantInt::get(DFS.IntptrTy, Size)});
 1303     DFSF.setShadow(&LI, DFSF.DFS.ZeroShadow);
 1321   if (Shadow != DFSF.DFS.ZeroShadow)
 1338   uint64_t ShadowAlign = Align * DFS.ShadowWidth / 8;
 1340   Value *ShadowAddr = DFS.getShadowAddress(Addr, Pos);
 1341   if (Shadow == DFS.ZeroShadow) {
 1342     IntegerType *ShadowTy = IntegerType::get(*DFS.Ctx, Size * DFS.ShadowWidth);
 1342     IntegerType *ShadowTy = IntegerType::get(*DFS.Ctx, Size * DFS.ShadowWidth);
 1350   const unsigned ShadowVecSize = 128 / DFS.ShadowWidth;
 1353     VectorType *ShadowVecTy = VectorType::get(DFS.ShadowTy, ShadowVecSize);
 1357           ShadowVec, Shadow, ConstantInt::get(Type::getInt32Ty(*DFS.Ctx), i));
 1372         IRB.CreateConstGEP1_32(DFS.ShadowTy, ShadowAddr, Offset);
 1454     DFSF.AllocaShadowMap[&I] = IRB.CreateAlloca(DFSF.DFS.ShadowTy);
 1456   DFSF.setShadow(&I, DFSF.DFS.ZeroShadow);
 1484   IRB.CreateCall(DFSF.DFS.DFSanSetLabelFn,
 1486                                                                 *DFSF.DFS.Ctx)),
 1487                   IRB.CreateZExtOrTrunc(I.getLength(), DFSF.DFS.IntptrTy)});
 1492   Value *DestShadow = DFSF.DFS.getShadowAddress(I.getDest(), &I);
 1493   Value *SrcShadow = DFSF.DFS.getShadowAddress(I.getSource(), &I);
 1496       ConstantInt::get(I.getLength()->getType(), DFSF.DFS.ShadowWidth / 8));
 1497   Type *Int8Ptr = Type::getInt8PtrTy(*DFSF.DFS.Ctx);
 1504     MTI->setDestAlignment(I.getDestAlignment() * (DFSF.DFS.ShadowWidth / 8));
 1505     MTI->setSourceAlignment(I.getSourceAlignment() * (DFSF.DFS.ShadowWidth / 8));
 1507     MTI->setDestAlignment(DFSF.DFS.ShadowWidth / 8);
 1508     MTI->setSourceAlignment(DFSF.DFS.ShadowWidth / 8);
 1544   if (F == DFSF.DFS.DFSanVarargWrapperFn.getCallee()->stripPointerCasts())
 1550       DFSF.DFS.UnwrappedFnMap.find(CS.getCalledValue());
 1551   if (i != DFSF.DFS.UnwrappedFnMap.end()) {
 1553     switch (DFSF.DFS.getWrapperKind(F)) {
 1556       IRB.CreateCall(DFSF.DFS.DFSanUnimplementedFn,
 1558       DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow);
 1562       DFSF.setShadow(CS.getInstruction(), DFSF.DFS.ZeroShadow);
 1574         TransformedFunction CustomFn = DFSF.DFS.getCustomFunctionType(FT);
 1577         FunctionCallee CustomF = DFSF.DFS.Mod->getOrInsertFunction(
 1585                                        DFSF.DFS.ReadOnlyNoneAttrs);
 1602             Constant *T = DFSF.DFS.getOrBuildTrampolineFunction(ParamFT, TName);
 1605                 IRB.CreateBitCast(*i, Type::getInt8PtrTy(*DFSF.DFS.Ctx)));
 1617           auto *LabelVATy = ArrayType::get(DFSF.DFS.ShadowTy,
 1634               new AllocaInst(DFSF.DFS.ShadowTy,
 1654           if (CustomCI->getArgOperand(ArgNo)->getType() == DFSF.DFS.ShadowTy)
 1660               IRB.CreateLoad(DFSF.DFS.ShadowTy, DFSF.LabelReturnAlloca);
 1674   if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) {
 1696     if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_TLS) {
 1698       LoadInst *LI = NextIRB.CreateLoad(DFSF.DFS.ShadowTy, DFSF.getRetvalTLS());
 1707   if (DFSF.DFS.getInstrumentedABI() == DataFlowSanitizer::IA_Args) {
 1708     FunctionType *NewFT = DFSF.DFS.getArgsFunctionType(FT);
 1723       ArrayType *VarArgArrayTy = ArrayType::get(DFSF.DFS.ShadowTy, VarArgSize);
 1745         *DFSF.DFS.Ctx, AttributeList::ReturnIndex,
 1767       PHINode::Create(DFSF.DFS.ShadowTy, PN.getNumIncomingValues(), "", &PN);
 1770   Value *UndefShadow = UndefValue::get(DFSF.DFS.ShadowTy);