CIRCT  20.0.0git
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
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...

Collaboration diagram for HashTableStack< KeyT, ValueT >:
Collaboration graph
[legend]

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)
 
ScopeTgetLastScope ()
 
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 46 of file ExpandWhens.cpp.

Member Typedef Documentation

◆ iterator

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

Definition at line 80 of file ExpandWhens.cpp.

◆ ScopeT

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

Definition at line 47 of file ExpandWhens.cpp.

◆ StackT

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

Definition at line 48 of file ExpandWhens.cpp.

Constructor & Destructor Documentation

◆ HashTableStack()

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

Definition at line 75 of file ExpandWhens.cpp.

Member Function Documentation

◆ begin()

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

Definition at line 82 of file ExpandWhens.cpp.

◆ end()

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

Definition at line 86 of file ExpandWhens.cpp.

◆ find()

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

Definition at line 88 of file ExpandWhens.cpp.

◆ getLastScope()

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

Definition at line 99 of file ExpandWhens.cpp.

◆ operator[]()

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

Definition at line 109 of file ExpandWhens.cpp.

◆ popScope()

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

Definition at line 103 of file ExpandWhens.cpp.

References assert().

◆ pushScope()

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

Definition at line 101 of file ExpandWhens.cpp.

Member Data Documentation

◆ mapStack

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

Definition at line 112 of file ExpandWhens.cpp.


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