diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-12 04:36:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-12 04:36:58 +0000 |
commit | b52675b643db496bcea218bd3d5fc5e23f523c22 (patch) | |
tree | 941e375d7a624bfdbd253bf6811efc0813584536 /include/llvm/Analysis/LazyValueInfo.h | |
parent | 7707a0df5b00c8326a581205639d6b2871f182e9 (diff) | |
download | external_llvm-b52675b643db496bcea218bd3d5fc5e23f523c22.zip external_llvm-b52675b643db496bcea218bd3d5fc5e23f523c22.tar.gz external_llvm-b52675b643db496bcea218bd3d5fc5e23f523c22.tar.bz2 |
Add a new getPredicateOnEdge method which returns more rich information for
constant constraints. Improve the LVI lattice to include inequality
constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LazyValueInfo.h')
-rw-r--r-- | include/llvm/Analysis/LazyValueInfo.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/include/llvm/Analysis/LazyValueInfo.h b/include/llvm/Analysis/LazyValueInfo.h index d346696..dd80fce 100644 --- a/include/llvm/Analysis/LazyValueInfo.h +++ b/include/llvm/Analysis/LazyValueInfo.h @@ -31,19 +31,21 @@ public: static char ID; LazyValueInfo() : FunctionPass(&ID), PImpl(0) {} - /// Tristate - This is used to return yes/no/dunno results. + /// Tristate - This is used to return true/false/dunno results. enum Tristate { - Unknown = -1, No = 0, Yes = 1 + Unknown = -1, False = 0, True = 1 }; // Public query interface. + /// getPredicateOnEdge - Determine whether the specified value comparison + /// with a constant is known to be true or false on the specified CFG edge. + /// Pred is a CmpInst predicate. + Tristate getPredicateOnEdge(unsigned Pred, Value *V, Constant *C, + BasicBlock *FromBB, BasicBlock *ToBB); + - /// isEqual - Determine whether the specified value is known to be equal or - /// not-equal to the specified constant at the end of the specified block. - Tristate isEqual(Value *V, Constant *C, BasicBlock *BB); - /// getConstant - Determine whether the specified value is known to be a /// constant at the end of the specified block. Return null if not. Constant *getConstant(Value *V, BasicBlock *BB); |