diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2007-07-14 02:51:34 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2007-07-14 02:51:34 +0000 |
commit | 377b1190cbcf99e9298300d890c4b744dd2ed2c7 (patch) | |
tree | b7d6ee346df727a33ee5cf884bc9d1a884f724f9 /include/llvm/Support/ConstantRange.h | |
parent | 7722ceb7de6f64c8a7a079b80612ec15031f5483 (diff) | |
download | llvm-377b1190cbcf99e9298300d890c4b744dd2ed2c7.tar.gz llvm-377b1190cbcf99e9298300d890c4b744dd2ed2c7.tar.bz2 llvm-377b1190cbcf99e9298300d890c4b744dd2ed2c7.tar.xz |
Add alternate ConstantRange intersection algorithm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ConstantRange.h')
-rw-r--r-- | include/llvm/Support/ConstantRange.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Support/ConstantRange.h b/include/llvm/Support/ConstantRange.h index 020fb095ec..00c525ebf3 100644 --- a/include/llvm/Support/ConstantRange.h +++ b/include/llvm/Support/ConstantRange.h @@ -143,6 +143,12 @@ class ConstantRange { /// ConstantRange intersectWith(const ConstantRange &CR) const; + /// maximalIntersectWith - Return the range that results from the intersection + /// of this range with another range. The resultant range is guaranteed to + /// include all elements contained in both input ranges, and is also + /// guaranteed to be the smallest possible set that does so. + ConstantRange maximalIntersectWith(const ConstantRange &CR) const; + /// unionWith - Return the range that results from the union of this range /// with another range. The resultant range is guaranteed to include the /// elements of both sets, but may contain more. For example, [3, 9) union |