diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-12-22 01:52:37 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-12-22 01:52:37 +0000 |
commit | 5b0ae81ab18243a6f2e5ee889514f1f3dee181de (patch) | |
tree | a98ef7b4ab330da5d3d40ee2e688e157c238322a /clang/lib/Analysis/GRExprEngine.cpp | |
parent | 1e4a9b7c0d8128012ab0b0f4547ea4c4199f776b (diff) | |
download | bcm5719-llvm-5b0ae81ab18243a6f2e5ee889514f1f3dee181de.tar.gz bcm5719-llvm-5b0ae81ab18243a6f2e5ee889514f1f3dee181de.zip |
Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.
llvm-svn: 61319
Diffstat (limited to 'clang/lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index 424229019ec..0b9ae6088b5 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -115,12 +115,13 @@ static inline Selector GetNullarySelector(const char* name, ASTContext& Ctx) { GRExprEngine::GRExprEngine(CFG& cfg, Decl& CD, ASTContext& Ctx, - LiveVariables& L, + LiveVariables& L, bool purgeDead, StoreManagerCreator SMC, ConstraintManagerCreator CMC) : CoreEngine(cfg, CD, Ctx, *this), G(CoreEngine.getGraph()), Liveness(L), + PurgeDead(purgeDead), Builder(NULL), StateMgr(G.getContext(), SMC, CMC, G.getAllocator(), cfg, CD, L), SymMgr(StateMgr.getSymbolManager()), @@ -211,8 +212,12 @@ void GRExprEngine::ProcessStmt(Stmt* S, StmtNodeBuilder& builder) { Builder->setAuditor(BatchAuditor.get()); // Create the cleaned state. - CleanedState = StateMgr.RemoveDeadBindings(EntryNode->getState(), CurrentStmt, - Liveness, DeadSymbols); + if (PurgeDead) + CleanedState = StateMgr.RemoveDeadBindings(EntryNode->getState(), + CurrentStmt, + Liveness, DeadSymbols); + else + CleanedState = EntryNode->getState(); // Process any special transfer function for dead symbols. NodeSet Tmp; |