From 28a8dbc35fe6da6b7d2633529b73453aca254207 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 20 May 2008 03:39:39 +0000 Subject: Add a bool to isEdgeFeasible that tells it whether to treat unknown value as undef or untracked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51295 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/SparsePropagation.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/llvm/Analysis') diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h index dea81b1..c472213 100644 --- a/include/llvm/Analysis/SparsePropagation.h +++ b/include/llvm/Analysis/SparsePropagation.h @@ -147,8 +147,12 @@ public: LatticeVal getOrInitValueState(Value *V); /// isEdgeFeasible - Return true if the control flow edge from the 'From' - /// basic block to the 'To' basic block is currently feasible... - bool isEdgeFeasible(BasicBlock *From, BasicBlock *To); + /// basic block to the 'To' basic block is currently feasible. If + /// AggressiveUndef is true, then this treats values with unknown lattice + /// values as undefined. This is generally only useful when solving the + /// lattice, not when querying it. + bool isEdgeFeasible(BasicBlock *From, BasicBlock *To, + bool AggressiveUndef = false); private: /// UpdateState - When the state for some instruction is potentially updated, @@ -165,7 +169,8 @@ private: /// getFeasibleSuccessors - Return a vector of booleans to indicate which /// successors are reachable from a given terminator instruction. - void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl &Succs); + void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl &Succs, + bool AggressiveUndef); void visitInst(Instruction &I); void visitPHINode(PHINode &I); -- cgit v1.1