LLVM API Documentation
#include <IntervalMap.h>
Definition at line 767 of file IntervalMap.h.
bool llvm::IntervalMapImpl::Path::atBegin | ( | ) | const [inline] |
atBegin - Return true if path is at begin().
Definition at line 894 of file IntervalMap.h.
bool llvm::IntervalMapImpl::Path::atLastEntry | ( | unsigned | Level | ) | const [inline] |
atLastEntry - Return true if the path is at the last entry of the node at Level.
Level | Node to examine. |
Definition at line 904 of file IntervalMap.h.
Referenced by getRightSibling(), and moveRight().
void llvm::IntervalMapImpl::Path::fillLeft | ( | unsigned | Height | ) | [inline] |
fillLeft - Grow path to Height by taking leftmost branches.
Height | The target height. |
Definition at line 878 of file IntervalMap.h.
NodeRef llvm::IntervalMapImpl::Path::getLeftSibling | ( | unsigned | Level | ) | const |
getLeftSibling - Get the left sibling node at Level, or a null NodeRef.
Level | Get the sibling to node(Level). |
Definition at line 25 of file IntervalMap.cpp.
References offset(), llvm::IntervalMapImpl::NodeRef::size(), and llvm::IntervalMapImpl::NodeRef::subtree().
NodeRef llvm::IntervalMapImpl::Path::getRightSibling | ( | unsigned | Level | ) | const |
getLeftSibling - Get the left sibling node at Level, or a null NodeRef.
Level | Get the sinbling to node(Level). |
Definition at line 75 of file IntervalMap.cpp.
References atLastEntry(), offset(), and llvm::IntervalMapImpl::NodeRef::subtree().
unsigned llvm::IntervalMapImpl::Path::height | ( | ) | const [inline] |
height - Return the height of the tree corresponding to this path. This matches map->height in a full path.
Definition at line 813 of file IntervalMap.h.
Referenced by moveLeft().
NodeT& llvm::IntervalMapImpl::Path::leaf | ( | ) | const [inline] |
Definition at line 799 of file IntervalMap.h.
unsigned llvm::IntervalMapImpl::Path::leafOffset | ( | ) | const [inline] |
Definition at line 803 of file IntervalMap.h.
Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::erase(), llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::insert(), and llvm::IntervalMap< KeyT, ValT, N, Traits >::const_iterator::operator==().
unsigned& llvm::IntervalMapImpl::Path::leafOffset | ( | ) | [inline] |
Definition at line 804 of file IntervalMap.h.
unsigned llvm::IntervalMapImpl::Path::leafSize | ( | ) | const [inline] |
Definition at line 802 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::legalizeForInsert | ( | unsigned | Level | ) | [inline] |
legalizeForInsert - Prepare the path for an insertion at Level. When the path is at end(), node(Level) may not be a legal node. legalizeForInsert ensures that node(Level) is real by moving back to the last node at Level, and setting offset(Level) to size(Level) if required.
Level | The level where an insertion is about to take place. |
Definition at line 913 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::moveLeft | ( | unsigned | Level | ) |
moveLeft - Move path to the left sibling at Level. Leave nodes below Level unaltered.
Level | Move node(Level). |
Definition at line 48 of file IntervalMap.cpp.
References height(), offset(), llvm::SmallVectorImpl< T >::resize(), llvm::IntervalMapImpl::NodeRef::size(), llvm::IntervalMapImpl::NodeRef::subtree(), subtree(), and valid().
void llvm::IntervalMapImpl::Path::moveRight | ( | unsigned | Level | ) |
moveRight - Move path to the left sibling at Level. Leave nodes below Level unaltered.
Level | Move node(Level). |
Definition at line 98 of file IntervalMap.cpp.
References atLastEntry(), offset(), size(), llvm::IntervalMapImpl::NodeRef::subtree(), and subtree().
NodeT& llvm::IntervalMapImpl::Path::node | ( | unsigned | Level | ) | const [inline] |
Definition at line 791 of file IntervalMap.h.
unsigned llvm::IntervalMapImpl::Path::offset | ( | unsigned | Level | ) | const [inline] |
Definition at line 795 of file IntervalMap.h.
Referenced by getLeftSibling(), getRightSibling(), moveLeft(), and moveRight().
unsigned& llvm::IntervalMapImpl::Path::offset | ( | unsigned | Level | ) | [inline] |
Definition at line 796 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::pop | ( | ) | [inline] |
pop - Remove the last path entry.
Definition at line 836 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::push | ( | NodeRef | Node, |
unsigned | Offset | ||
) | [inline] |
push - Add entry to path.
Node | Node to add, should be subtree(path.size()-1). |
Offset | Offset into Node. |
Definition at line 831 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::replaceRoot | ( | void * | Root, |
unsigned | Size, | ||
IdxPair | Offsets | ||
) |
replaceRoot - Replace the current root node with two new entries after the tree height has increased.
Root | The new root node. |
Size | Number of entries in the new root. |
Offsets | Offsets into the root and first branch nodes. |
Definition at line 19 of file IntervalMap.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::front(), llvm::SmallVectorImpl< T >::insert(), and subtree().
Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::insert().
void llvm::IntervalMapImpl::Path::reset | ( | unsigned | Level | ) | [inline] |
reset - Reset cached information about node(Level) from subtree(Level -1).
Level | 1..height. THe node to update after parent node changed. |
Definition at line 824 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::setRoot | ( | void * | Node, |
unsigned | Size, | ||
unsigned | Offset | ||
) | [inline] |
setRoot - Clear the path and set a new root node.
Node | New root node. |
Size | New root size. |
Offset | Offset into root node. |
Definition at line 854 of file IntervalMap.h.
void llvm::IntervalMapImpl::Path::setSize | ( | unsigned | Level, |
unsigned | Size | ||
) | [inline] |
setSize - Set the size of a node both in the path and in the tree.
Level | 0..height. Note that setting the root size won't change map->rootSize. |
Size | New node size. |
Definition at line 844 of file IntervalMap.h.
Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::erase(), and llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::insert().
unsigned llvm::IntervalMapImpl::Path::size | ( | unsigned | Level | ) | const [inline] |
Definition at line 794 of file IntervalMap.h.
Referenced by moveRight().
NodeRef& llvm::IntervalMapImpl::Path::subtree | ( | unsigned | Level | ) | const [inline] |
subtree - Get the subtree referenced from Level. When the path is consistent, node(Level + 1) == subtree(Level).
Level | 0..height-1. The leaves have no subtrees. |
Definition at line 818 of file IntervalMap.h.
References llvm::IntervalMapImpl::NodeRef::subtree().
Referenced by moveLeft(), moveRight(), and replaceRoot().
bool llvm::IntervalMapImpl::Path::valid | ( | ) | const [inline] |
valid - Return true if path is at a valid node, not at end().
Definition at line 807 of file IntervalMap.h.
Referenced by llvm::IntervalMap< KeyT, ValT, N, Traits >::iterator::erase(), and moveLeft().