mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
[ConstantRange] Delete unused getSetSize
getSetSize returns an APInt that is 1 bit wider. The APInt is typically 65-bit and requires memory allocation. isSizeStrictlySmallerThan and isSizeLargerThan are preferred. The last use of this helper method was removed by rL302385. llvm-svn: 358347
This commit is contained in:
parent
dc90b35633
commit
9227721225
@ -205,9 +205,6 @@ public:
|
||||
/// Return true if this set contains exactly one member.
|
||||
bool isSingleElement() const { return getSingleElement() != nullptr; }
|
||||
|
||||
/// Return the number of elements in this set.
|
||||
APInt getSetSize() const;
|
||||
|
||||
/// Compare set size of this range with the range CR.
|
||||
bool isSizeStrictlySmallerThan(const ConstantRange &CR) const;
|
||||
|
||||
|
@ -349,14 +349,6 @@ bool ConstantRange::isUpperSignWrapped() const {
|
||||
return Lower.sgt(Upper);
|
||||
}
|
||||
|
||||
APInt ConstantRange::getSetSize() const {
|
||||
if (isFullSet())
|
||||
return APInt::getOneBitSet(getBitWidth()+1, getBitWidth());
|
||||
|
||||
// This is also correct for wrapped sets.
|
||||
return (Upper - Lower).zext(getBitWidth()+1);
|
||||
}
|
||||
|
||||
bool
|
||||
ConstantRange::isSizeStrictlySmallerThan(const ConstantRange &Other) const {
|
||||
assert(getBitWidth() == Other.getBitWidth());
|
||||
|
Loading…
Reference in New Issue
Block a user