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 | ff944a8c481d6c0f1ad2633e4be9bf8b1dd2a09f (patch) | |
tree | 4796ad443954b4f34c3e12ed8ee3b9950b12b39e /lib/Analysis/GRExprEngine.cpp | |
parent | 1b76b80f7509657e9f5b68ccac50033a6afbb684 (diff) |
Add an option to make 'RemoveDeadBindings' a configurable behavior. This enables
us to measure the effect of this optimization.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 424229019e..0b9ae6088b 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/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; |