LLVM 20.0.0git
|
This class represents a list of constant ranges. More...
#include "llvm/IR/ConstantRangeList.h"
Static Public Member Functions | |
static bool | isOrderedRanges (ArrayRef< ConstantRange > RangesRef) |
static std::optional< ConstantRangeList > | getConstantRangeList (ArrayRef< ConstantRange > RangesRef) |
This class represents a list of constant ranges.
Definition at line 30 of file ConstantRangeList.h.
|
default |
Referenced by getConstantRangeList().
|
inline |
Definition at line 35 of file ConstantRangeList.h.
References assert(), and getBitWidth().
|
inline |
Definition at line 49 of file ConstantRangeList.h.
|
inline |
Definition at line 51 of file ConstantRangeList.h.
LLVM_DUMP_METHOD void ConstantRangeList::dump | ( | ) | const |
Definition at line 239 of file ConstantRangeList.cpp.
References llvm::dbgs(), and print().
|
inline |
Return true if this list contains no members.
Definition at line 60 of file ConstantRangeList.h.
Referenced by insert(), intersectWith(), subtract(), and unionWith().
|
inline |
Definition at line 50 of file ConstantRangeList.h.
|
inline |
Definition at line 54 of file ConstantRangeList.h.
|
inline |
Get the bit width of this ConstantRangeList.
Definition at line 63 of file ConstantRangeList.h.
Referenced by insert(), intersectWith(), subtract(), and unionWith().
|
static |
Definition at line 31 of file ConstantRangeList.cpp.
References ConstantRangeList(), and isOrderedRanges().
|
inline |
Definition at line 57 of file ConstantRangeList.h.
void ConstantRangeList::insert | ( | const ConstantRange & | NewRange | ) |
Insert a new range to Ranges and keep the list ordered.
Definition at line 37 of file ConstantRangeList.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::ConstantRange::getBitWidth(), getBitWidth(), llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), llvm::ConstantRange::isEmptySet(), llvm::ConstantRange::isFullSet(), llvm::lower_bound(), llvm::APInt::sle(), llvm::APInt::slt(), and llvm::APIntOps::smax().
|
inline |
Definition at line 70 of file ConstantRangeList.h.
References llvm::Upper.
ConstantRangeList ConstantRangeList::intersectWith | ( | const ConstantRangeList & | CRL | ) | const |
Return the range list that results from the intersection of this ConstantRangeList with another ConstantRangeList, "CRL".
Definition at line 194 of file ConstantRangeList.cpp.
References assert(), empty(), End, getBitWidth(), llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), Range, size(), llvm::APInt::slt(), llvm::APIntOps::smax(), and llvm::APIntOps::smin().
|
static |
Definition at line 14 of file ConstantRangeList.cpp.
References llvm::ArrayRef< T >::empty(), llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), Range, llvm::APInt::sge(), and llvm::ArrayRef< T >::size().
Referenced by getConstantRangeList().
|
inline |
Definition at line 89 of file ConstantRangeList.h.
References llvm::operator==().
|
inline |
Return true if this range list is equal to another range list.
Definition at line 86 of file ConstantRangeList.h.
void ConstantRangeList::print | ( | raw_ostream & | OS | ) | const |
Print out the ranges to a stream.
Definition at line 232 of file ConstantRangeList.cpp.
References llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), llvm::interleaveComma(), and OS.
Referenced by dump(), and llvm::Attribute::getAsString().
|
inline |
Definition at line 48 of file ConstantRangeList.h.
Referenced by llvm::AttrBuilder::addInitializesAttr().
|
inline |
Return the number of ranges in this ConstantRangeList.
Definition at line 66 of file ConstantRangeList.h.
Referenced by intersectWith(), and unionWith().
void ConstantRangeList::subtract | ( | const ConstantRange & | SubRange | ) |
Definition at line 84 of file ConstantRangeList.cpp.
References assert(), empty(), End, llvm::ConstantRange::getBitWidth(), getBitWidth(), llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), llvm::ConstantRange::isEmptySet(), llvm::ConstantRange::isFullSet(), Range, llvm::APInt::sge(), llvm::APInt::sle(), and llvm::APInt::slt().
ConstantRangeList ConstantRangeList::unionWith | ( | const ConstantRangeList & | CRL | ) | const |
Return the range list that results from the union of this ConstantRangeList with another ConstantRangeList, "CRL".
Definition at line 144 of file ConstantRangeList.cpp.
References assert(), empty(), getBitWidth(), llvm::ConstantRange::getLower(), llvm::ConstantRange::getUpper(), size(), llvm::APInt::slt(), and llvm::APIntOps::smax().