12#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_DATAFLOWWORKLIST_H
13#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_DATAFLOWWORKLIST_H
17#include "llvm/ADT/PriorityQueue.h"
23 llvm::BitVector EnqueuedBlocks;
25 llvm::PriorityQueue<
const CFGBlock *,
31 : EnqueuedBlocks(Cfg.getNumBlockIDs()), POV(POV), WorkList(
C) {}
36 if (
Block && !EnqueuedBlocks[
Block->getBlockID()]) {
37 EnqueuedBlocks[
Block->getBlockID()] =
true;
72 for (
auto B :
Block->succs())
88 for (
auto B :
Block->preds())
AnalysisDeclContext contains the context data for the function, method or block under analysis.
Represents a single basic block in a source-level CFG.
unsigned getBlockID() const
Represents a source-level, intra-procedural CFG that represents the control-flow of a Stmt.
A worklist implementation where the enqueued blocks will be dequeued based on the order defined by 'C...
void enqueueBlock(const CFGBlock *Block)
DataflowWorklistBase(const CFG &Cfg, PostOrderCFGView *POV, Comp C)
const PostOrderCFGView * getCFGView() const
const CFGBlock * dequeue()
@ C
Languages that the frontend can parse and compile.
A worklist implementation for backward dataflow analysis.
BackwardDataflowWorklist(const CFG &Cfg, AnalysisDeclContext &Ctx)
void enqueuePredecessors(const CFGBlock *Block)
A worklist implementation for forward dataflow analysis.
void enqueueSuccessors(const CFGBlock *Block)
ForwardDataflowWorklist(const CFG &Cfg, AnalysisDeclContext &Ctx)
ForwardDataflowWorklist(const CFG &Cfg, PostOrderCFGView *POV)
PostOrderCFGView::BlockOrderCompare Cmp
bool operator()(const CFGBlock *lhs, const CFGBlock *rhs) const