CIRCT 24.0.0git
Loading...
Searching...
No Matches
HashTableStack< KeyT, ValueT > Struct Template Reference

This is a stack of hashtables, if lookup fails in the top-most hashtable, it will attempt to lookup in lower hashtables. More...

Inheritance diagram for HashTableStack< KeyT, ValueT >:
Collaboration diagram for HashTableStack< KeyT, ValueT >:

Classes

struct  Iterator

Public Types

using ScopeT = typename llvm::MapVector<KeyT, ValueT>
using StackT = typename llvm::SmallVector<ScopeT, 3>
using iterator = Iterator

Public Member Functions

 HashTableStack ()
iterator begin ()
iterator end ()
iterator find (const KeyT &key)
ScopeT & getLastScope ()
void pushScope ()
ScopeT popScope ()
ValueT & operator[] (const KeyT &key)

Private Attributes

StackT mapStack

Detailed Description

template<typename KeyT, typename ValueT>
struct HashTableStack< KeyT, ValueT >

This is a stack of hashtables, if lookup fails in the top-most hashtable, it will attempt to lookup in lower hashtables.

This class is used instead of a ScopedHashTable so we can manually pop off a scope and keep it around.

This only allows inserting into the outermost scope.

Definition at line 62 of file ExpandWhens.cpp.

Member Typedef Documentation

◆ iterator

template<typename KeyT, typename ValueT>
using HashTableStack< KeyT, ValueT >::iterator = Iterator

Definition at line 96 of file ExpandWhens.cpp.

◆ ScopeT

template<typename KeyT, typename ValueT>
using HashTableStack< KeyT, ValueT >::ScopeT = typename llvm::MapVector<KeyT, ValueT>

Definition at line 63 of file ExpandWhens.cpp.

◆ StackT

template<typename KeyT, typename ValueT>
using HashTableStack< KeyT, ValueT >::StackT = typename llvm::SmallVector<ScopeT, 3>

Definition at line 64 of file ExpandWhens.cpp.

Constructor & Destructor Documentation

◆ HashTableStack()

template<typename KeyT, typename ValueT>
HashTableStack< KeyT, ValueT >::HashTableStack ( )
inline

Definition at line 91 of file ExpandWhens.cpp.

Member Function Documentation

◆ begin()

template<typename KeyT, typename ValueT>
iterator HashTableStack< KeyT, ValueT >::begin ( )
inline

◆ end()

template<typename KeyT, typename ValueT>
iterator HashTableStack< KeyT, ValueT >::end ( )
inline

Definition at line 102 of file ExpandWhens.cpp.

Referenced by HashTableStack< FieldRef, Operation * >::find().

◆ find()

template<typename KeyT, typename ValueT>
iterator HashTableStack< KeyT, ValueT >::find ( const KeyT & key)
inline

Definition at line 104 of file ExpandWhens.cpp.

◆ getLastScope()

template<typename KeyT, typename ValueT>
ScopeT & HashTableStack< KeyT, ValueT >::getLastScope ( )
inline

Definition at line 115 of file ExpandWhens.cpp.

◆ operator[]()

template<typename KeyT, typename ValueT>
ValueT & HashTableStack< KeyT, ValueT >::operator[] ( const KeyT & key)
inline

Definition at line 125 of file ExpandWhens.cpp.

◆ popScope()

template<typename KeyT, typename ValueT>
ScopeT HashTableStack< KeyT, ValueT >::popScope ( )
inline

Definition at line 119 of file ExpandWhens.cpp.

◆ pushScope()

template<typename KeyT, typename ValueT>
void HashTableStack< KeyT, ValueT >::pushScope ( )
inline

Member Data Documentation

◆ mapStack

template<typename KeyT, typename ValueT>
StackT HashTableStack< KeyT, ValueT >::mapStack
private

Definition at line 128 of file ExpandWhens.cpp.


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