diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpander.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/SparsePropagation.h | 7 | ||||
-rw-r--r-- | include/llvm/Analysis/ValueTracking.h | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/include/llvm/Analysis/ScalarEvolutionExpander.h b/include/llvm/Analysis/ScalarEvolutionExpander.h index 4ac80d2..816d497 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpander.h +++ b/include/llvm/Analysis/ScalarEvolutionExpander.h @@ -59,6 +59,8 @@ namespace llvm { } private: + LLVMContext *getContext() const { return SE.getContext(); } + /// InsertBinop - Insert the specified binary operator, doing a small amount /// of work to avoid inserting an obviously redundant operation. Value *InsertBinop(Instruction::BinaryOps Opcode, Value *LHS, Value *RHS); diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h index c75531a..356a5ee 100644 --- a/include/llvm/Analysis/SparsePropagation.h +++ b/include/llvm/Analysis/SparsePropagation.h @@ -31,6 +31,7 @@ namespace llvm { class BasicBlock; class Function; class SparseSolver; + class LLVMContext; template<typename T> class SmallVectorImpl; @@ -113,6 +114,8 @@ 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. @@ -128,8 +131,8 @@ class SparseSolver { SparseSolver(const SparseSolver&); // DO NOT IMPLEMENT void operator=(const SparseSolver&); // DO NOT IMPLEMENT public: - explicit SparseSolver(AbstractLatticeFunction *Lattice) - : LatticeFunc(Lattice) {} + explicit SparseSolver(AbstractLatticeFunction *Lattice, LLVMContext* C) + : LatticeFunc(Lattice), Context(C) {} ~SparseSolver() { delete LatticeFunc; } diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index 5f5f77a..ec04cb1 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -23,6 +23,7 @@ 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 @@ -64,14 +65,16 @@ namespace llvm { Value *FindInsertedValue(Value *V, const unsigned *idx_begin, const unsigned *idx_end, + LLVMContext *Context, Instruction *InsertBefore = 0); /// This is a convenience wrapper for finding values indexed by a single index /// only. inline Value *FindInsertedValue(Value *V, const unsigned Idx, + LLVMContext *Context, Instruction *InsertBefore = 0) { const unsigned Idxs[1] = { Idx }; - return FindInsertedValue(V, &Idxs[0], &Idxs[1], InsertBefore); + return FindInsertedValue(V, &Idxs[0], &Idxs[1], Context, InsertBefore); } /// GetConstantStringInfo - This function computes the length of a |