| /freebsd/contrib/llvm-project/clang/lib/Analysis/ |
| H A D | CFG.cpp | 391 CFGBlock *block = nullptr; 395 BlockScopePosPair(CFGBlock *b, LocalScope::const_iterator scopePos) in BlockScopePosPair() 515 CFGBlock *Block = nullptr; 518 CFGBlock *Succ = nullptr; 523 CFGBlock *SwitchTerminatedBlock = nullptr; 524 CFGBlock *DefaultCaseBlock = nullptr; 530 CFGBlock *TryTerminatedBlock = nullptr; 581 CFGBlock *VisitInitListExpr(InitListExpr *ILE, AddStmtChoice asc); 582 CFGBlock *VisitAddrLabelExpr(AddrLabelExpr *A, AddStmtChoice asc); 583 CFGBlock *VisitAttributedStmt(AttributedStmt *A, AddStmtChoice asc); [all …]
|
| H A D | ReachableCode.cpp | 51 static bool isTrivialDoWhile(const CFGBlock *B, const Stmt *S) { in isTrivialDoWhile() 71 static bool isBuiltinAssumeFalse(const CFGBlock *B, const Stmt *S, in isBuiltinAssumeFalse() 86 static bool isDeadReturn(const CFGBlock *B, const Stmt *S) { in isDeadReturn() 90 const CFGBlock *Current = B; in isDeadReturn() 295 static bool shouldTreatSuccessorsAsReachable(const CFGBlock *B, in shouldTreatSuccessorsAsReachable() 316 static unsigned scanFromBlock(const CFGBlock *Start, in scanFromBlock() 323 SmallVector<const CFGBlock*, 32> WL; in scanFromBlock() 336 const CFGBlock *item = WL.pop_back_val(); in scanFromBlock() 348 for (CFGBlock::const_succ_iterator I = item->succ_begin(), in scanFromBlock() 350 const CFGBlock *B = *I; in scanFromBlock() [all …]
|
| H A D | CFGStmtMap.cpp | 22 typedef llvm::DenseMap<const Stmt*, CFGBlock*> SMap; 27 CFGBlock *CFGStmtMap::getBlock(Stmt *S) { in getBlock() 36 CFGBlock *B = I->second; in getBlock() 49 static void Accumulate(SMap &SM, CFGBlock *B) { in Accumulate() 51 for (CFGBlock::iterator I = B->begin(), E = B->end(); I != E; ++I) { in Accumulate() 57 CFGBlock *&Entry = SM[CS->getStmt()]; in Accumulate() 86 for (CFGBlock *BB : *C) in Build()
|
| H A D | CFGReachabilityAnalysis.cpp | 25 bool CFGReverseBlockReachabilityAnalysis::isReachable(const CFGBlock *Src, in isReachable() 26 const CFGBlock *Dst) { in isReachable() 41 void CFGReverseBlockReachabilityAnalysis::mapReachability(const CFGBlock *Dst) { in mapReachability() 42 SmallVector<const CFGBlock *, 11> worklist; in mapReachability() 54 const CFGBlock *block = worklist.pop_back_val(); in mapReachability() 69 for (CFGBlock::const_pred_iterator i = block->pred_begin(), in mapReachability()
|
| H A D | CalledOnceCheck.cpp | 509 static std::optional<Clarification> clarify(const CFGBlock *Conditional, in clarify() 510 const CFGBlock *SuccWithoutCall) { in clarify() 576 static unsigned getSuccessorIndex(const CFGBlock *Parent, in getSuccessorIndex() 577 const CFGBlock *Child) { in getSuccessorIndex() 578 CFGBlock::const_succ_iterator It = llvm::find(Parent->succs(), Child); in getSuccessorIndex() 596 NotCalledClarifier(const CFGBlock *Parent, const CFGBlock *SuccInQuestion) in NotCalledClarifier() 599 const CFGBlock *Parent, *SuccInQuestion; 714 const CFGBlock *Exit = &FunctionCFG.getExit(); in check() 718 while (const CFGBlock *BB = Worklist.dequeue()) { in check() 737 void check(const CFGBlock *BB) { in check() [all …]
|
| H A D | LiveVariables.cpp | 35 llvm::DenseMap<const CFGBlock *, LiveVariables::LivenessValues> blocksEndToLiveness; 36 llvm::DenseMap<const CFGBlock *, LiveVariables::LivenessValues> blocksBeginToLiveness; 46 runOnBlock(const CFGBlock *block, LiveVariables::LivenessValues val, 142 bool LiveVariables::isLive(const CFGBlock *B, const VarDecl *D) { in isLive() 163 const CFGBlock *currentBlock; 168 const CFGBlock *CurrentBlock) in TransferFunctions() 516 LiveVariablesImpl::runOnBlock(const CFGBlock *block, in runOnBlock() 527 for (CFGBlock::const_reverse_iterator it = block->rbegin(), in runOnBlock() 549 for (CFGBlock *B : *cfg) in runOnAllBlocks() 580 for (const CFGBlock *B : cfg->nodes()) { in computeLiveness() [all …]
|
| H A D | UninitializedValues.cpp | 148 ValueVector &getValueVector(const CFGBlock *block) { in getValueVector() 154 bool updateValueVectorWithScratch(const CFGBlock *block); 164 Value getValue(const CFGBlock *block, const VarDecl *vd) { in getValue() 187 static void printVector(const CFGBlock *block, ValueVector &bv, in printVector() 209 bool CFGBlockValues::updateValueVectorWithScratch(const CFGBlock *block) { in updateValueVectorWithScratch() 475 const CFGBlock *block; 483 const CFGBlock *block, AnalysisDeclContext &ac, in TransferFunctions() 565 SmallVector<const CFGBlock*, 32> Queue; in getUninitUse() 573 const CFGBlock *B = Queue.pop_back_val(); in getUninitUse() 579 for (CFGBlock::const_pred_iterator I = B->pred_begin(), E = B->pred_end(); in getUninitUse() [all …]
|
| H A D | IntervalPartition.cpp | 34 static unsigned getID(const CFGBlock &B) { return B.getBlockID(); } in getID() 125 if constexpr (std::is_same_v<std::decay_t<Node>, CFGBlock>) in fillIntervalNode() 128 std::vector<const CFGBlock *> Nodes; in fillIntervalNode() 199 std::vector<const CFGBlock *> buildInterval(const CFGBlock *Header) { in buildInterval() 213 std::optional<std::vector<const CFGBlock *>> getIntervalWTO(const CFG &Cfg) { in getIntervalWTO()
|
| H A D | LifetimeSafety.cpp | 314 llvm::ArrayRef<const Fact *> getFacts(const CFGBlock *B) const { in getFacts() 321 void addBlockFacts(const CFGBlock *B, llvm::ArrayRef<Fact *> NewFacts) { in addBlockFacts() 340 for (const CFGBlock *B : *AC.getAnalysis<PostOrderCFGView>()) { in dump() 359 llvm::DenseMap<const clang::CFGBlock *, llvm::SmallVector<const Fact *>> 374 for (const CFGBlock *Block : *AC.getAnalysis<PostOrderCFGView>()) { in run() 614 LifetimeLattice transferBlock(const CFGBlock *Block, in transferBlock() 678 llvm::DenseMap<const CFGBlock *, LifetimeLattice> BlockEntryStates; 681 llvm::DenseMap<const CFGBlock *, LifetimeLattice> BlockExitStates; 690 const CFGBlock *Entry = &Cfg.getEntry(); in run() 693 while (const CFGBlock *B = Worklist.dequeue()) { in run() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
| H A D | CoreEngine.h | 64 std::vector<std::pair<const CFGBlock *, const ExplodedNode *>>; 108 void HandleBlockExit(const CFGBlock *B, ExplodedNode *Pred); 112 void HandlePostStmt(const CFGBlock *B, unsigned StmtIdx, ExplodedNode *Pred); 114 void HandleBranch(const Stmt *Cond, const Stmt *Term, const CFGBlock *B, 117 const CFGBlock *B, ExplodedNode *Pred); 120 void HandleStaticInit(const DeclStmt *DS, const CFGBlock *B, 123 void HandleVirtualBaseBranch(const CFGBlock *B, ExplodedNode *Pred); 134 std::optional<unsigned> getCompletedIterationCount(const CFGBlock *B, 168 void addAbortedBlock(const ExplodedNode *node, const CFGBlock *block) { in addAbortedBlock() 186 void enqueue(ExplodedNodeSet &Set, const CFGBlock *Block, unsigned Idx); [all …]
|
| H A D | CallEvent.h | 161 CFGBlock::ConstCFGElementRef ElemRef = {nullptr, 0}; 185 CFGBlock::ConstCFGElementRef ElemRef) in CallEvent() 189 CFGBlock::ConstCFGElementRef ElemRef) in CallEvent() 240 const CFGBlock::ConstCFGElementRef &getCFGElementRef() const { in getCFGElementRef() 503 CFGBlock::ConstCFGElementRef ElemRef) in AnyFunctionCall() 507 CFGBlock::ConstCFGElementRef ElemRef) in AnyFunctionCall() 542 CFGBlock::ConstCFGElementRef ElemRef) in SimpleFunctionCall() 581 CFGBlock::ConstCFGElementRef ElemRef) in BlockCall() 683 CFGBlock::ConstCFGElementRef ElemRef) in CXXInstanceCall() 687 CFGBlock::ConstCFGElementRef ElemRef) in CXXInstanceCall() [all …]
|
| H A D | WorkList.h | 23 class CFGBlock; variable 30 const CFGBlock *block; 35 const CFGBlock *B, unsigned idx) in WorkListUnit() 54 const CFGBlock *getBlock() const { return block; } in getBlock() 68 void enqueue(ExplodedNode *N, const CFGBlock *B, unsigned idx) { in enqueue()
|
| /freebsd/contrib/llvm-project/clang/lib/Analysis/FlowSensitive/ |
| H A D | AdornedCFG.cpp | 28 static llvm::DenseMap<const Stmt *, const CFGBlock *> 30 llvm::DenseMap<const Stmt *, const CFGBlock *> StmtToBlock; in buildStmtToBasicBlockMap() 31 for (const CFGBlock *Block : Cfg) { in buildStmtToBasicBlockMap() 50 for (const CFGBlock *Block : Cfg) { in buildStmtToBasicBlockMap() 67 for (const CFGBlock *Block : Cfg) { in buildStmtToBasicBlockMap() 78 llvm::SmallVector<const CFGBlock *> BlocksToVisit; in findReachableBlocks() 81 const CFGBlock *Block = BlocksToVisit.back(); in findReachableBlocks() 89 for (const CFGBlock *Succ : Block->succs()) in findReachableBlocks() 97 static llvm::DenseSet<const CFGBlock *> 100 llvm::DenseSet<const CFGBlock *> Result; in buildContainsExprConsumedInDifferentBlock() [all …]
|
| H A D | TypeErasedDataflowAnalysis.cpp | 58 static int blockIndexInPredecessor(const CFGBlock &Pred, in blockIndexInPredecessor() 59 const CFGBlock &Block) { in blockIndexInPredecessor() 61 Pred.succs(), [&Block](const CFGBlock::AdjacentBlock &Succ) { in blockIndexInPredecessor() 73 static bool isBackedgeNode(const CFGBlock &B) { in isBackedgeNode() 233 computeBlockInputState(const CFGBlock &Block, AnalysisContext &AC) { in computeBlockInputState() 234 std::vector<const CFGBlock *> Preds(Block.pred_begin(), Block.pred_end()); in computeBlockInputState() 260 const CFGBlock *StmtBlock = nullptr; in computeBlockInputState() 276 for (const CFGBlock *Pred : Preds) { in computeBlockInputState() 284 for (const CFGBlock *Pred : Preds) { in computeBlockInputState() 428 transferCFGBlock(const CFGBlock &Block, AnalysisContext &AC, in transferCFGBlock() [all …]
|
| /freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/ |
| H A D | PostOrderCFGView.h | 43 struct iterator { using value_type = const CFGBlock *; }; 50 std::pair<std::nullopt_t, bool> insert(const CFGBlock *Block) { in insert() 67 bool alreadySet(const CFGBlock *Block) { in alreadySet() 84 using NodeRef = const ::clang::CFGBlock *; 85 using ChildIteratorType = ::clang::CFGBlock::const_succ_reverse_iterator; 108 std::vector<const CFGBlock *> Blocks; 110 using BlockOrderTy = llvm::DenseMap<const CFGBlock *, unsigned>; 116 using iterator = std::vector<const CFGBlock *>::reverse_iterator; 117 using const_iterator = std::vector<const CFGBlock *>::const_reverse_iterator; 135 bool operator()(const CFGBlock *b1, const CFGBlock *b2) const;
|
| H A D | Consumed.h | 179 void intersectAtLoopHead(const CFGBlock *LoopHead, const CFGBlock *LoopBack, 224 bool allBackEdgesVisited(const CFGBlock *CurrBlock, 225 const CFGBlock *TargetBlock); 227 void addInfo(const CFGBlock *Block, ConsumedStateMap *StateMap, 229 void addInfo(const CFGBlock *Block, 232 ConsumedStateMap* borrowInfo(const CFGBlock *Block); 234 void discardInfo(const CFGBlock *Block); 236 std::unique_ptr<ConsumedStateMap> getInfo(const CFGBlock *Block); 238 bool isBackEdge(const CFGBlock *From, const CFGBlock *To); 239 bool isBackEdgeTarget(const CFGBlock *Block); [all …]
|
| H A D | ThreadSafetyCommon.h | 105 void enterCFG(CFG *Cfg, const NamedDecl *D, const CFGBlock *First) {} in enterCFG() 108 void enterCFGBlock(const CFGBlock *B) {} in enterCFGBlock() 114 void handlePredecessor(const CFGBlock *Pred) {} in handlePredecessor() 117 void handlePredecessorBackEdge(const CFGBlock *Pred) {} in handlePredecessorBackEdge() 120 void enterCFGBlockBody(const CFGBlock *B) {} in enterCFGBlockBody() 129 void exitCFGBlockBody(const CFGBlock *B) {} in exitCFGBlockBody() 135 void handleSuccessor(const CFGBlock *Succ) {} in handleSuccessor() 138 void handleSuccessorBackEdge(const CFGBlock *Succ) {} in handleSuccessorBackEdge() 141 void exitCFGBlock(const CFGBlock *B) {} in exitCFGBlock() 144 void exitCFG(const CFGBlock *Last) {} in exitCFG() [all …]
|
| H A D | CFGReachabilityAnalysis.h | 24 class CFGBlock; variable 42 bool isReachable(const CFGBlock *Src, const CFGBlock *Dst); 45 void mapReachability(const CFGBlock *Dst);
|
| /freebsd/contrib/llvm-project/clang/include/clang/Analysis/ |
| H A D | CFG.h | 605 class CFGBlock { 656 std::conditional_t<IsConst, const CFGBlock *, CFGBlock *>; 712 std::conditional_t<IsConst, const CFGBlock *, CFGBlock *>; 722 using ElementRef = typename CFGBlock::ElementRefImpl<IsConst>; 762 getIndexInBlock(CFGBlock::ElementRefIterator<true, IsOtherConst> E) { in getIndexInBlock() 768 getIndexInBlock(CFGBlock::ElementRefIterator<false, IsOtherConst> E) { in getIndexInBlock() 832 CFGBlock *ReachableBlock; 833 llvm::PointerIntPair<CFGBlock *, 2> UnreachableBlock; 837 AdjacentBlock(CFGBlock *B, bool IsReachable); 841 AdjacentBlock(CFGBlock *B, CFGBlock *AlternateBlock); [all …]
|
| H A D | ProgramPoint.h | 104 CFGBlock::ConstCFGElementRef ElemRef = {nullptr, 0}; 110 CFGBlock::ConstCFGElementRef ElemRef = {nullptr, 0}) 121 CFGBlock::ConstCFGElementRef ElemRef = {nullptr, 0}) 130 CFGBlock::ConstCFGElementRef getElementRef() const { return ElemRef; } in getElementRef() 227 BlockEntrance(const CFGBlock *PrevBlock, const CFGBlock *CurrBlock, 233 const CFGBlock *getPreviousBlock() const { in getPreviousBlock() 234 return reinterpret_cast<const CFGBlock *>(getData2()); in getPreviousBlock() 237 const CFGBlock *getBlock() const { in getBlock() 238 return reinterpret_cast<const CFGBlock*>(getData1()); in getBlock() 242 const CFGBlock *B = getBlock(); in getFirstElement() [all …]
|
| H A D | AnalysisDeclContext.h | 127 const CFGBlock *getBlockForRegisteredExpression(const Stmt *stmt); 182 const Stmt *S, const CFGBlock *Blk, 306 const CFGBlock *Block; 317 const Stmt *S, const CFGBlock *Block, unsigned BlockCount, in StackFrameContext() 327 const CFGBlock *getCallSiteBlock() const { return Block; } in getCallSiteBlock() 339 const CFGBlock *Block, unsigned BlockCount, in Profile() 407 const Stmt *S, const CFGBlock *Block, 478 const Stmt *S, const CFGBlock *Block, in getStackFrame()
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | UnreachableCodeChecker.cpp | 40 static inline const Stmt *getUnreachableStmt(const CFGBlock *CB); 41 static void FindUnreachableEntryPoints(const CFGBlock *CB, 44 static bool isInvalidPath(const CFGBlock *CB, const ParentMap &PM); 45 static inline bool isEmptyCFGBlock(const CFGBlock *CB); 78 const CFGBlock *CB = BE->getBlock(); in checkEndAnalysis() 95 for (const CFGBlock *CB : *C) { in checkEndAnalysis() 129 for (CFGBlock::const_iterator ci = CB->begin(), ce = CB->end(); in checkEndAnalysis() 179 void UnreachableCodeChecker::FindUnreachableEntryPoints(const CFGBlock *CB, in FindUnreachableEntryPoints() 184 for (const CFGBlock *PredBlock : CB->preds()) { in FindUnreachableEntryPoints() 200 const Stmt *UnreachableCodeChecker::getUnreachableStmt(const CFGBlock *CB) { in getUnreachableStmt() [all …]
|
| H A D | AnalyzerStatsChecker.cpp | 45 llvm::SmallPtrSet<const CFGBlock*, 32> reachable; in checkEndAnalysis() 60 const CFGBlock *CB = BE->getBlock(); in checkEndAnalysis() 72 const CFGBlock *CB = *I; in checkEndAnalysis() 116 const CFGBlock *Exit = BE.getDst(); in checkEndAnalysis()
|
| /freebsd/contrib/llvm-project/clang/include/clang/Analysis/FlowSensitive/ |
| H A D | AdornedCFG.h | 36 const CFGBlock *lookup(const Stmt &S) const { in lookup() 41 llvm::DenseMap<const Stmt *, const CFGBlock *> StmtToBlock; 68 const CFGBlock *blockForStmt(const Stmt &S) const { in blockForStmt() 73 bool isBlockReachable(const CFGBlock &B) const { in isBlockReachable() 85 bool containsExprConsumedInDifferentBlock(const CFGBlock &B) const { in containsExprConsumedInDifferentBlock() 93 llvm::DenseSet<const CFGBlock *> ContainsExprConsumedInDifferentBlock) in AdornedCFG() 105 llvm::DenseSet<const CFGBlock *> ContainsExprConsumedInDifferentBlock;
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/ |
| H A D | CoreEngine.cpp | 93 const CFGBlock *Entry = &(L->getCFG()->getEntry()); in ExecuteWorkList() 105 const CFGBlock *Succ = *(Entry->succ_begin()); in ExecuteWorkList() 261 const CFGBlock *Blk = L.getDst(); in HandleBlockEdge() 358 void CoreEngine::HandleBlockExit(const CFGBlock * B, ExplodedNode *Pred) { in HandleBlockExit() 394 for (CFGBlock::const_succ_iterator it = B->succ_begin(), in HandleBlockExit() 396 if (const CFGBlock *succ = *it) { in HandleBlockExit() 488 const CFGBlock * B, ExplodedNode *Pred) { in HandleBranch() 500 const CFGBlock *B, in HandleCleanupTemporaryBranch() 511 void CoreEngine::HandleStaticInit(const DeclStmt *DS, const CFGBlock *B, in HandleStaticInit() 522 void CoreEngine::HandlePostStmt(const CFGBlock *B, unsigned StmtIdx, in HandlePostStmt() [all …]
|