summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-10-28 03:20:19 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-10-28 03:20:19 +0000
commit3ef1e689c9c72da61d79b5df324d46372e9ea439 (patch)
tree22327f74bcf4bd34f499108ed98a10e4538cb953 /llvm/include
parent1d1929aace4b2b3c87dca8ae87d4e890004deeb4 (diff)
downloadbcm5719-llvm-3ef1e689c9c72da61d79b5df324d46372e9ea439.tar.gz
bcm5719-llvm-3ef1e689c9c72da61d79b5df324d46372e9ea439.zip
[ValueTracking] Expose `implies` via ValueTracking, NFC
Summary: This will allow a later patch to `JumpThreading` use this functionality. Reviewers: reames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13971 llvm-svn: 251488
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Analysis/ValueTracking.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/ValueTracking.h b/llvm/include/llvm/Analysis/ValueTracking.h
index f9e0386a4ed..6d5f4ac0ad2 100644
--- a/llvm/include/llvm/Analysis/ValueTracking.h
+++ b/llvm/include/llvm/Analysis/ValueTracking.h
@@ -436,6 +436,15 @@ namespace llvm {
/// E.g. if RangeMD is !{i32 0, i32 10, i32 15, i32 20} then return [0, 20).
ConstantRange getConstantRangeFromMetadata(MDNode &RangeMD);
+ /// Return true if RHS is known to be implied by LHS. A & B must be i1
+ /// (boolean) values or a vector of such values. Note that the truth table for
+ /// implication is the same as <=u on i1 values (but not <=s!). The truth
+ /// table for both is:
+ /// | T | F (B)
+ /// T | T | F
+ /// F | T | T
+ /// (A)
+ bool isImpliedCondition(Value *LHS, Value *RHS);
} // end namespace llvm
#endif
OpenPOWER on IntegriCloud