forked from OSchip/llvm-project
Rename 'MaxLoop' to 'MaxVisit' in AnalysisManager to more correctly reflect that we aborted analysis may not necessarily be due to a loop.
llvm-svn: 113862
This commit is contained in:
parent
d3be2c83d5
commit
c88ed9561e
|
@ -134,7 +134,7 @@ int main(int argc, char **argv) {
|
||||||
PP.getLangOptions(), /* PathDiagnostic */ 0,
|
PP.getLangOptions(), /* PathDiagnostic */ 0,
|
||||||
CreateRegionStoreManager,
|
CreateRegionStoreManager,
|
||||||
CreateRangeConstraintManager, &Idxer,
|
CreateRangeConstraintManager, &Idxer,
|
||||||
/* MaxNodes */ 300000, /* MaxLoop */ 3,
|
/* MaxNodes */ 300000, /* MaxVisit */ 3,
|
||||||
/* VisualizeEG */ false, /* VisualizeEGUbi */ false,
|
/* VisualizeEG */ false, /* VisualizeEGUbi */ false,
|
||||||
/* PurgeDead */ true, /* EagerlyAssume */ false,
|
/* PurgeDead */ true, /* EagerlyAssume */ false,
|
||||||
/* TrimGraph */ false, /* InlineCall */ true,
|
/* TrimGraph */ false, /* InlineCall */ true,
|
||||||
|
|
|
@ -50,8 +50,8 @@ class AnalysisManager : public BugReporterData {
|
||||||
// The maximum number of exploded nodes the analyzer will generate.
|
// The maximum number of exploded nodes the analyzer will generate.
|
||||||
unsigned MaxNodes;
|
unsigned MaxNodes;
|
||||||
|
|
||||||
// The maximum number of times the analyzer will go through a loop.
|
// The maximum number of times the analyzer visit a block.
|
||||||
unsigned MaxLoop;
|
unsigned MaxVisit;
|
||||||
|
|
||||||
bool VisualizeEGDot;
|
bool VisualizeEGDot;
|
||||||
bool VisualizeEGUbi;
|
bool VisualizeEGUbi;
|
||||||
|
@ -74,14 +74,14 @@ public:
|
||||||
StoreManagerCreator storemgr,
|
StoreManagerCreator storemgr,
|
||||||
ConstraintManagerCreator constraintmgr,
|
ConstraintManagerCreator constraintmgr,
|
||||||
idx::Indexer *idxer,
|
idx::Indexer *idxer,
|
||||||
unsigned maxnodes, unsigned maxloop,
|
unsigned maxnodes, unsigned maxvisit,
|
||||||
bool vizdot, bool vizubi, bool purge, bool eager, bool trim,
|
bool vizdot, bool vizubi, bool purge, bool eager, bool trim,
|
||||||
bool inlinecall, bool useUnoptimizedCFG)
|
bool inlinecall, bool useUnoptimizedCFG)
|
||||||
|
|
||||||
: AnaCtxMgr(useUnoptimizedCFG), Ctx(ctx), Diags(diags), LangInfo(lang),
|
: AnaCtxMgr(useUnoptimizedCFG), Ctx(ctx), Diags(diags), LangInfo(lang),
|
||||||
PD(pd),
|
PD(pd),
|
||||||
CreateStoreMgr(storemgr), CreateConstraintMgr(constraintmgr),Idxer(idxer),
|
CreateStoreMgr(storemgr), CreateConstraintMgr(constraintmgr),Idxer(idxer),
|
||||||
AScope(ScopeDecl), MaxNodes(maxnodes), MaxLoop(maxloop),
|
AScope(ScopeDecl), MaxNodes(maxnodes), MaxVisit(maxvisit),
|
||||||
VisualizeEGDot(vizdot), VisualizeEGUbi(vizubi), PurgeDead(purge),
|
VisualizeEGDot(vizdot), VisualizeEGUbi(vizubi), PurgeDead(purge),
|
||||||
EagerlyAssume(eager), TrimGraph(trim), InlineCall(inlinecall) {}
|
EagerlyAssume(eager), TrimGraph(trim), InlineCall(inlinecall) {}
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ public:
|
||||||
|
|
||||||
unsigned getMaxNodes() const { return MaxNodes; }
|
unsigned getMaxNodes() const { return MaxNodes; }
|
||||||
|
|
||||||
unsigned getMaxLoop() const { return MaxLoop; }
|
unsigned getMaxVisit() const { return MaxVisit; }
|
||||||
|
|
||||||
bool shouldVisualizeGraphviz() const { return VisualizeEGDot; }
|
bool shouldVisualizeGraphviz() const { return VisualizeEGDot; }
|
||||||
|
|
||||||
|
|
|
@ -703,7 +703,7 @@ void GRCallEnterNodeBuilder::GenerateNode(const GRState *state,
|
||||||
OldMgr.getStoreManagerCreator(),
|
OldMgr.getStoreManagerCreator(),
|
||||||
OldMgr.getConstraintManagerCreator(),
|
OldMgr.getConstraintManagerCreator(),
|
||||||
OldMgr.getIndexer(),
|
OldMgr.getIndexer(),
|
||||||
OldMgr.getMaxNodes(), OldMgr.getMaxLoop(),
|
OldMgr.getMaxNodes(), OldMgr.getMaxVisit(),
|
||||||
OldMgr.shouldVisualizeGraphviz(),
|
OldMgr.shouldVisualizeGraphviz(),
|
||||||
OldMgr.shouldVisualizeUbigraph(),
|
OldMgr.shouldVisualizeUbigraph(),
|
||||||
OldMgr.shouldPurgeDead(),
|
OldMgr.shouldPurgeDead(),
|
||||||
|
|
|
@ -1213,7 +1213,7 @@ bool GRExprEngine::ProcessBlockEntrance(const CFGBlock* B,
|
||||||
const ExplodedNode *Pred,
|
const ExplodedNode *Pred,
|
||||||
GRBlockCounter BC) {
|
GRBlockCounter BC) {
|
||||||
return BC.getNumVisited(Pred->getLocationContext()->getCurrentStackFrame(),
|
return BC.getNumVisited(Pred->getLocationContext()->getCurrentStackFrame(),
|
||||||
B->getBlockID()) < AMgr.getMaxLoop();
|
B->getBlockID()) < AMgr.getMaxVisit();
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
Loading…
Reference in New Issue