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
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index 4242290..0b9ae60 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -115,12 +115,13 @@
 
 
 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 @@
     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;