[llvm-commits] [llvm] r91729 - in /llvm/trunk: 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

Dan Gohman gohman at apple.com
Fri Dec 18 15:42:09 PST 2009


Author: djg
Date: Fri Dec 18 17:42:08 2009
New Revision: 91729

URL: http://llvm.org/viewvc/llvm-project?rev=91729&view=rev
Log:
Eliminate unnecessary LLVMContexts.

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

Modified: llvm/trunk/include/llvm/Analysis/SparsePropagation.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/SparsePropagation.h?rev=91729&r1=91728&r2=91729&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/SparsePropagation.h (original)
+++ llvm/trunk/include/llvm/Analysis/SparsePropagation.h Fri Dec 18 17:42:08 2009
@@ -30,7 +30,6 @@
   class BasicBlock;
   class Function;
   class SparseSolver;
-  class LLVMContext;
   class raw_ostream;
 
   template<typename T> class SmallVectorImpl;
@@ -120,8 +119,6 @@
   /// 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 @@
   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;
   }

Modified: llvm/trunk/include/llvm/Analysis/ValueTracking.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ValueTracking.h?rev=91729&r1=91728&r2=91729&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/ValueTracking.h (original)
+++ llvm/trunk/include/llvm/Analysis/ValueTracking.h Fri Dec 18 17:42:08 2009
@@ -24,7 +24,6 @@
   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

Modified: llvm/trunk/include/llvm/Transforms/Utils/Cloning.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/Cloning.h?rev=91729&r1=91728&r2=91729&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/Cloning.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/Cloning.h Fri Dec 18 17:42:08 2009
@@ -38,7 +38,6 @@
 class TargetData;
 class Loop;
 class LoopInfo;
-class LLVMContext;
 class AllocaInst;
 template <typename T> class SmallVectorImpl;
 

Modified: llvm/trunk/include/llvm/Transforms/Utils/Local.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/Local.h?rev=91729&r1=91728&r2=91729&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/Local.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/Local.h Fri Dec 18 17:42:08 2009
@@ -27,7 +27,6 @@
 class AllocaInst;
 class ConstantExpr;
 class TargetData;
-class LLVMContext;
 struct DbgInfoIntrinsic;
 
 template<typename T> class SmallVectorImpl;

Modified: llvm/trunk/lib/Analysis/SparsePropagation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/SparsePropagation.cpp?rev=91729&r1=91728&r2=91729&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/SparsePropagation.cpp (original)
+++ llvm/trunk/lib/Analysis/SparsePropagation.cpp Fri Dec 18 17:42:08 2009
@@ -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 @@
     }
 
     // Constant condition variables mean the branch can only go a single way
-    Succs[C == ConstantInt::getFalse(*Context)] = true;
+    Succs[C->isNullValue()] = true;
     return;
   }
   





More information about the llvm-commits mailing list