Eliminate unnecessary LLVMContexts.
authorDan Gohman <gohman@apple.com>
Fri, 18 Dec 2009 23:42:08 +0000 (23:42 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 18 Dec 2009 23:42:08 +0000 (23:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91729 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/SparsePropagation.h
include/llvm/Analysis/ValueTracking.h
include/llvm/Transforms/Utils/Cloning.h
include/llvm/Transforms/Utils/Local.h
lib/Analysis/SparsePropagation.cpp

index 677d41d80b2203085604d051bac15c7fb885d550..c3c2f4b0668c5761d495ac8123dc13f2716aa9fd 100644 (file)
@@ -30,7 +30,6 @@ namespace llvm {
   class BasicBlock;
   class Function;
   class SparseSolver;
-  class LLVMContext;
   class raw_ostream;
 
   template<typename T> class SmallVectorImpl;
@@ -120,8 +119,6 @@ class SparseSolver {
   /// compute transfer functions.
   AbstractLatticeFunction *LatticeFunc;
   
-  LLVMContext *Context;
-  
   DenseMap<Value*, LatticeVal> ValueState;  // The state each value is in.
   SmallPtrSet<BasicBlock*, 16> BBExecutable;   // The bbs that are executable.
   
@@ -137,8 +134,8 @@ class SparseSolver {
   SparseSolver(const SparseSolver&);    // DO NOT IMPLEMENT
   void operator=(const SparseSolver&);  // DO NOT IMPLEMENT
 public:
-  explicit SparseSolver(AbstractLatticeFunction *Lattice, LLVMContext *C)
-    : LatticeFunc(Lattice), Context(C) {}
+  explicit SparseSolver(AbstractLatticeFunction *Lattice)
+    : LatticeFunc(Lattice) {}
   ~SparseSolver() {
     delete LatticeFunc;
   }
index 5f3c671d0f483543e55f011add409ac206e0d8ed..7c673c3c2fbd996ee15601548539c3afc9fa9d4b 100644 (file)
@@ -24,7 +24,6 @@ namespace llvm {
   class Instruction;
   class APInt;
   class TargetData;
-  class LLVMContext;
   
   /// ComputeMaskedBits - Determine which of the bits specified in Mask are
   /// known to be either zero or one and return them in the KnownZero/KnownOne
index e9099f878b3bff7d99c94b49de22aff526a40af1..7fbbef9c3420da490ef620055b530343a4659652 100644 (file)
@@ -38,7 +38,6 @@ class CallGraph;
 class TargetData;
 class Loop;
 class LoopInfo;
-class LLVMContext;
 class AllocaInst;
 template <typename T> class SmallVectorImpl;
 
index e6687bb24899d1ac69b201c16527a95b227ccfc5..2cdd31fb14d096fa2b930de727b26b3c3d321ea4 100644 (file)
@@ -27,7 +27,6 @@ class PHINode;
 class AllocaInst;
 class ConstantExpr;
 class TargetData;
-class LLVMContext;
 struct DbgInfoIntrinsic;
 
 template<typename T> class SmallVectorImpl;
index d7bcac2b1e2d2215f17422227266ae195b0ec917..487bdad6dc369f2514475d0c5c0173c4f7132bc5 100644 (file)
@@ -17,7 +17,6 @@
 #include "llvm/Constants.h"
 #include "llvm/Function.h"
 #include "llvm/Instructions.h"
-#include "llvm/LLVMContext.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 using namespace llvm;
@@ -155,7 +154,7 @@ void SparseSolver::getFeasibleSuccessors(TerminatorInst &TI,
     }
 
     // Constant condition variables mean the branch can only go a single way
-    Succs[C == ConstantInt::getFalse(*Context)] = true;
+    Succs[C->isNullValue()] = true;
     return;
   }