LLVM 20.0.0git
|
#include "llvm/ADT/IntervalTree.h"
Classes | |
class | find_iterator |
Public Types | |
enum class | Sorting { Ascending , Descending } |
using | PointType = PointT |
using | ValueType = ValueT |
using | DataType = DataT |
using | Allocator = BumpPtrAllocator |
using | IntervalReferences = SmallVector< const DataType *, 4 > |
Public Member Functions | |
IntervalTree (Allocator &NodeAllocator) | |
~IntervalTree () | |
bool | empty () const |
Return true when no intervals are mapped. | |
void | clear () |
Remove all entries. | |
void | insert (PointType Left, PointType Right, ValueType Value) |
Add a mapping of [Left;Right] to Value. | |
IntervalReferences | getContaining (PointType Point) const |
Return all the intervals in their natural tree location, that contain the given point. | |
void | print (raw_ostream &OS, bool HexFormat=true) |
Print the interval tree. | |
void | create () |
Create the interval tree. | |
find_iterator | find (PointType Point) const |
Iterator to start a find operation; it returns find_end() if the tree has not been built. | |
find_iterator | find_end () const |
Iterator to end find operation. | |
Static Public Member Functions | |
static void | sortIntervals (IntervalReferences &IntervalSet, Sorting Sort) |
Sort the given intervals using the following sort options: Ascending: return the intervals with the smallest at the front. | |
Definition at line 248 of file IntervalTree.h.
using llvm::IntervalTree< PointT, ValueT, DataT >::Allocator = BumpPtrAllocator |
Definition at line 258 of file IntervalTree.h.
using llvm::IntervalTree< PointT, ValueT, DataT >::DataType = DataT |
Definition at line 257 of file IntervalTree.h.
using llvm::IntervalTree< PointT, ValueT, DataT >::IntervalReferences = SmallVector<const DataType *, 4> |
Definition at line 261 of file IntervalTree.h.
using llvm::IntervalTree< PointT, ValueT, DataT >::PointType = PointT |
Definition at line 255 of file IntervalTree.h.
using llvm::IntervalTree< PointT, ValueT, DataT >::ValueType = ValueT |
Definition at line 256 of file IntervalTree.h.
|
strong |
Enumerator | |
---|---|
Ascending | |
Descending |
Definition at line 260 of file IntervalTree.h.
|
inlineexplicit |
Definition at line 591 of file IntervalTree.h.
|
inline |
Definition at line 593 of file IntervalTree.h.
References llvm::IntervalTree< PointT, ValueT, DataT >::clear().
|
inline |
Remove all entries.
Definition at line 599 of file IntervalTree.h.
Referenced by llvm::logicalview::LVRange::startSearch(), and llvm::IntervalTree< PointT, ValueT, DataT >::~IntervalTree().
|
inline |
Create the interval tree.
Definition at line 646 of file IntervalTree.h.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::Data, llvm::IntervalTree< PointT, ValueT, DataT >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), llvm::Last, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::unique().
Referenced by llvm::logicalview::LVRange::startSearch().
|
inline |
Return true when no intervals are mapped.
Definition at line 596 of file IntervalTree.h.
Referenced by llvm::IntervalTree< PointT, ValueT, DataT >::create(), llvm::IntervalTree< PointT, ValueT, DataT >::find(), llvm::IntervalTree< PointT, ValueT, DataT >::getContaining(), and llvm::IntervalTree< PointT, ValueT, DataT >::insert().
|
inline |
Iterator to start a find operation; it returns find_end() if the tree has not been built.
There is no support to iterate over all the elements of the tree.
Definition at line 680 of file IntervalTree.h.
References llvm::IntervalTree< PointT, ValueT, DataT >::empty(), and llvm::IntervalTree< PointT, ValueT, DataT >::find_end().
Referenced by llvm::IntervalTree< PointT, ValueT, DataT >::getContaining(), and llvm::logicalview::LVRange::getEntry().
|
inline |
Iterator to end find operation.
Definition at line 687 of file IntervalTree.h.
References End.
Referenced by llvm::IntervalTree< PointT, ValueT, DataT >::find(), llvm::IntervalTree< PointT, ValueT, DataT >::getContaining(), and llvm::logicalview::LVRange::getEntry().
|
inline |
Return all the intervals in their natural tree location, that contain the given point.
Definition at line 616 of file IntervalTree.h.
References assert(), E, llvm::IntervalTree< PointT, ValueT, DataT >::empty(), llvm::IntervalTree< PointT, ValueT, DataT >::find(), llvm::IntervalTree< PointT, ValueT, DataT >::find_end(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
|
inline |
Add a mapping of [Left;Right] to Value.
Definition at line 609 of file IntervalTree.h.
References assert(), llvm::IntervalTree< PointT, ValueT, DataT >::empty(), llvm::Left, and llvm::Right.
Referenced by llvm::logicalview::LVRange::startSearch().
|
inline |
Print the interval tree.
When HexFormat is true, the interval tree interval ranges and associated values are printed in hexadecimal format.
Definition at line 641 of file IntervalTree.h.
References OS.
Referenced by llvm::logicalview::LVRange::startSearch().
|
inlinestatic |
Sort the given intervals using the following sort options: Ascending: return the intervals with the smallest at the front.
Descending: return the intervals with the biggest at the front.
Definition at line 627 of file IntervalTree.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), LHS, and RHS.