15 #ifndef LLVM_ANALYSIS_SPARSEPROPAGATION_H
16 #define LLVM_ANALYSIS_SPARSEPROPAGATION_H
35 template<
typename T>
class SmallVectorImpl;
48 LatticeVal UndefVal, OverdefinedVal, UntrackedVal;
53 OverdefinedVal = overdefinedVal;
54 UntrackedVal = untrackedVal;
125 std::vector<Instruction*> InstWorkList;
127 std::vector<BasicBlock*> BBWorkList;
131 typedef std::pair<BasicBlock*,BasicBlock*> Edge;
132 std::set<Edge> KnownFeasibleEdges;
138 : LatticeFunc(Lattice) {}
154 return I != ValueState.end() ? I->second : LatticeFunc->
getUntrackedVal();
171 bool AggressiveUndef =
false);
177 return BBExecutable.count(BB);
196 bool AggressiveUndef);
206 #endif // LLVM_ANALYSIS_SPARSEPROPAGATION_H
LatticeVal getOrInitValueState(Value *V)
LLVM Argument representation.
LatticeVal getUndefVal() const
virtual LatticeVal ComputeInstructionState(Instruction &I, SparseSolver &SS)
bool isEdgeFeasible(BasicBlock *From, BasicBlock *To, bool AggressiveUndef=false)
bool isBlockExecutable(BasicBlock *BB) const
virtual bool IsSpecialCasedPHI(PHINode *PN)
virtual bool IsUntrackedValue(Value *V)
virtual LatticeVal ComputeConstant(Constant *C)
virtual ~AbstractLatticeFunction()
SparseSolver(AbstractLatticeFunction *Lattice)
LatticeVal getUntrackedVal() const
LLVM Basic Block Representation.
LLVM Constant Representation.
LatticeVal getLatticeState(Value *V) const
virtual Constant * GetConstant(LatticeVal LV, Value *Val, SparseSolver &SS)
virtual LatticeVal ComputeArgument(Argument *I)
AbstractLatticeFunction(LatticeVal undefVal, LatticeVal overdefinedVal, LatticeVal untrackedVal)
void Print(Function &F, raw_ostream &OS) const
#define LLVM_DELETED_FUNCTION
virtual void PrintValue(LatticeVal V, raw_ostream &OS)
PrintValue - Render the specified lattice value to the specified stream.
virtual LatticeVal MergeValues(LatticeVal X, LatticeVal Y)
LLVM Value Representation.
static GCMetadataPrinterRegistry::Add< OcamlGCMetadataPrinter > Y("ocaml","ocaml 3.10-compatible collector")
LatticeVal getOverdefinedVal() const
static RegisterPass< NVPTXAllocaHoisting > X("alloca-hoisting","Hoisting alloca instructions in non-entry ""blocks to the entry block")