LLVM  8.0.1
Classes | Public Types | Public Member Functions | Friends | List of all members
llvm::IntervalMap< KeyT, ValT, N, Traits > Class Template Reference

#include "llvm/ADT/IntervalMap.h"

Inheritance diagram for llvm::IntervalMap< KeyT, ValT, N, Traits >:
Inheritance graph
[legend]

Classes

class  const_iterator
 
class  iterator
 

Public Types

using Allocator = typename Sizer::Allocator
 
using KeyType = KeyT
 
using ValueType = ValT
 
using KeyTraits = Traits
 

Public Member Functions

 IntervalMap (Allocator &a)
 
 ~IntervalMap ()
 
bool empty () const
 empty - Return true when no intervals are mapped. More...
 
KeyT start () const
 start - Return the smallest mapped key in a non-empty map. More...
 
KeyT stop () const
 stop - Return the largest mapped key in a non-empty map. More...
 
ValT lookup (KeyT x, ValT NotFound=ValT()) const
 lookup - Return the mapped value at x or NotFound. More...
 
void insert (KeyT a, KeyT b, ValT y)
 insert - Add a mapping of [a;b] to y, coalesce with adjacent intervals. More...
 
void clear ()
 clear - Remove all entries. More...
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
const_iterator find (KeyT x) const
 find - Return an iterator pointing to the first interval ending at or after x, or end(). More...
 
iterator find (KeyT x)
 
bool overlaps (KeyT a, KeyT b)
 overlaps(a, b) - Return true if the intervals in this map overlap with the interval [a;b]. More...
 

Friends

class const_iterator
 
class iterator
 

Detailed Description

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
class llvm::IntervalMap< KeyT, ValT, N, Traits >

Definition at line 934 of file IntervalMap.h.

Member Typedef Documentation

◆ Allocator

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::Allocator = typename Sizer::Allocator

Definition at line 960 of file IntervalMap.h.

◆ KeyTraits

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::KeyTraits = Traits

Definition at line 963 of file IntervalMap.h.

◆ KeyType

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::KeyType = KeyT

Definition at line 961 of file IntervalMap.h.

◆ ValueType

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::ValueType = ValT

Definition at line 962 of file IntervalMap.h.

Constructor & Destructor Documentation

◆ IntervalMap()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::IntervalMap ( Allocator a)
inlineexplicit

Definition at line 1043 of file IntervalMap.h.

◆ ~IntervalMap()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::~IntervalMap ( )
inline

Definition at line 1049 of file IntervalMap.h.

Member Function Documentation

◆ begin() [1/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::begin ( ) const
inline

◆ begin() [2/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::begin ( )
inline

Definition at line 1106 of file IntervalMap.h.

◆ clear()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::clear ( )

◆ empty()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::empty ( ) const
inline

empty - Return true when no intervals are mapped.

Definition at line 1055 of file IntervalMap.h.

Referenced by llvm::SplitEditor::dump(), llvm::LiveIntervalUnion::empty(), and llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::erase().

◆ end() [1/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::end ( ) const
inline

Definition at line 1112 of file IntervalMap.h.

Referenced by llvm::LiveIntervalUnion::end().

◆ end() [2/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::end ( )
inline

Definition at line 1118 of file IntervalMap.h.

◆ find() [1/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::find ( KeyT  x) const
inline

find - Return an iterator pointing to the first interval ending at or after x, or end().

Definition at line 1126 of file IntervalMap.h.

Referenced by llvm::LiveIntervalUnion::extract(), llvm::LiveIntervalUnion::find(), and llvm::LiveIntervalUnion::unify().

◆ find() [2/2]

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::find ( KeyT  x)
inline

Definition at line 1132 of file IntervalMap.h.

◆ insert()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::insert ( KeyT  a,
KeyT  b,
ValT  y 
)
inline

insert - Add a mapping of [a;b] to y, coalesce with adjacent intervals.

It is assumed that no key in the interval is mapped to another value, but overlapping intervals already mapped to y will be coalesced.

Definition at line 1083 of file IntervalMap.h.

◆ lookup()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
ValT llvm::IntervalMap< KeyT, ValT, N, Traits >::lookup ( KeyT  x,
ValT  NotFound = ValT() 
) const
inline

lookup - Return the mapped value at x or NotFound.

Definition at line 1073 of file IntervalMap.h.

◆ overlaps()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::overlaps ( KeyT  a,
KeyT  b 
)
inline

overlaps(a, b) - Return true if the intervals in this map overlap with the interval [a;b].

Definition at line 1140 of file IntervalMap.h.

◆ start()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
KeyT llvm::IntervalMap< KeyT, ValT, N, Traits >::start ( ) const
inline

start - Return the smallest mapped key in a non-empty map.

Definition at line 1060 of file IntervalMap.h.

Referenced by llvm::LiveIntervalUnion::startIndex().

◆ stop()

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
KeyT llvm::IntervalMap< KeyT, ValT, N, Traits >::stop ( ) const
inline

stop - Return the largest mapped key in a non-empty map.

Definition at line 1066 of file IntervalMap.h.

Friends And Related Function Documentation

◆ const_iterator

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
friend class const_iterator
friend

Definition at line 1096 of file IntervalMap.h.

◆ iterator

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
friend class iterator
friend

Definition at line 1098 of file IntervalMap.h.


The documentation for this class was generated from the following file: