MLIR  20.0.0git
Public Member Functions | Friends | List of all members
mlir::CyclicReplacerCache< InT, OutT >::CacheEntry Struct Reference

A possibly unresolved cache entry. More...

#include "mlir/Support/CyclicReplacerCache.h"

Public Member Functions

 ~CacheEntry ()
 
bool wasRepeated () const
 Check whether this node was repeated during recursive replacements. More...
 
void resolve (OutT result)
 Resolve an unresolved cache entry by providing the result to be stored in the cache. More...
 
const std::optional< OutT > & get () const
 Get the resolved result if one exists. More...
 

Friends

class CyclicReplacerCache
 

Detailed Description

template<typename InT, typename OutT>
struct mlir::CyclicReplacerCache< InT, OutT >::CacheEntry

A possibly unresolved cache entry.

If unresolved, the entry must be resolved before it goes out of scope.

Definition at line 65 of file CyclicReplacerCache.h.

Constructor & Destructor Documentation

◆ ~CacheEntry()

template<typename InT , typename OutT >
mlir::CyclicReplacerCache< InT, OutT >::CacheEntry::~CacheEntry ( )
inline

Definition at line 67 of file CyclicReplacerCache.h.

Member Function Documentation

◆ get()

template<typename InT , typename OutT >
const std::optional<OutT>& mlir::CyclicReplacerCache< InT, OutT >::CacheEntry::get ( ) const
inline

Get the resolved result if one exists.

Definition at line 90 of file CyclicReplacerCache.h.

◆ resolve()

template<typename InT , typename OutT >
void mlir::CyclicReplacerCache< InT, OutT >::CacheEntry::resolve ( OutT  result)
inline

Resolve an unresolved cache entry by providing the result to be stored in the cache.

Definition at line 83 of file CyclicReplacerCache.h.

◆ wasRepeated()

template<typename InT , typename OutT >
bool mlir::CyclicReplacerCache< InT, OutT >::CacheEntry::wasRepeated ( ) const
inline

Check whether this node was repeated during recursive replacements.

This only makes sense to be called after all recursive replacements are completed and the current element has resurfaced to the top of the replacement stack.

Definition at line 73 of file CyclicReplacerCache.h.

Friends And Related Function Documentation

◆ CyclicReplacerCache

template<typename InT , typename OutT >
friend class CyclicReplacerCache
friend

Definition at line 93 of file CyclicReplacerCache.h.


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