aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-20 03:39:39 +0000
committerChris Lattner <sabre@nondot.org>2008-05-20 03:39:39 +0000
commit28a8dbc35fe6da6b7d2633529b73453aca254207 (patch)
tree5eb9e8186a1012adce1b5f501d5b8c51dc84f25f /include/llvm/Analysis
parent638e378f2cb62c34f306f8eadd43039e20caede4 (diff)
downloadexternal_llvm-28a8dbc35fe6da6b7d2633529b73453aca254207.zip
external_llvm-28a8dbc35fe6da6b7d2633529b73453aca254207.tar.gz
external_llvm-28a8dbc35fe6da6b7d2633529b73453aca254207.tar.bz2
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
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/SparsePropagation.h11
1 files changed, 8 insertions, 3 deletions
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<bool> &Succs);
+ void getFeasibleSuccessors(TerminatorInst &TI, SmallVectorImpl<bool> &Succs,
+ bool AggressiveUndef);
void visitInst(Instruction &I);
void visitPHINode(PHINode &I);