MLIR  15.0.0git
Public Member Functions | List of all members
mlir::BlockAndValueMapping Class Reference

#include "mlir/IR/BlockAndValueMapping.h"

Public Member Functions

void map (Block *from, Block *to)
 Inserts a new mapping for 'from' to 'to'. More...
 
void map (Value from, Value to)
 
template<typename S , typename T , std::enable_if_t<!std::is_assignable< Value, S >::value &&!std::is_assignable< Block *, S >::value > * = nullptr>
void map (S &&from, T &&to)
 
void erase (Block *from)
 Erases a mapping for 'from'. More...
 
void erase (Value from)
 
bool contains (Block *from) const
 Checks to see if a mapping for 'from' exists. More...
 
bool contains (Value from) const
 
BlocklookupOrNull (Block *from) const
 Lookup a mapped value within the map. More...
 
Value lookupOrNull (Value from) const
 
BlocklookupOrDefault (Block *from) const
 Lookup a mapped value within the map. More...
 
Value lookupOrDefault (Value from) const
 
template<typename T >
lookup (T from) const
 Lookup a mapped value within the map. More...
 
void clear ()
 Clears all mappings held by the mapper. More...
 
const DenseMap< Value, Value > & getValueMap () const
 Return the held value mapping. More...
 
const DenseMap< Block *, Block * > & getBlockMap () const
 Return the held block mapping. More...
 

Detailed Description

Definition at line 26 of file BlockAndValueMapping.h.

Member Function Documentation

◆ clear()

void mlir::BlockAndValueMapping::clear ( )
inline

Clears all mappings held by the mapper.

Definition at line 73 of file BlockAndValueMapping.h.

Referenced by addExecuteResults(), and hoistAffineIfOp().

◆ contains() [1/2]

bool mlir::BlockAndValueMapping::contains ( Block from) const
inline

Checks to see if a mapping for 'from' exists.

Definition at line 47 of file BlockAndValueMapping.h.

Referenced by mlir::Region::cloneInto(), and inlineRegionImpl().

◆ contains() [2/2]

bool mlir::BlockAndValueMapping::contains ( Value  from) const
inline

Definition at line 48 of file BlockAndValueMapping.h.

◆ erase() [1/2]

void mlir::BlockAndValueMapping::erase ( Block from)
inline

Erases a mapping for 'from'.

Definition at line 43 of file BlockAndValueMapping.h.

◆ erase() [2/2]

void mlir::BlockAndValueMapping::erase ( Value  from)
inline

Definition at line 44 of file BlockAndValueMapping.h.

◆ getBlockMap()

const DenseMap<Block *, Block *>& mlir::BlockAndValueMapping::getBlockMap ( ) const
inline

Return the held block mapping.

Definition at line 79 of file BlockAndValueMapping.h.

References value.

◆ getValueMap()

const DenseMap<Value, Value>& mlir::BlockAndValueMapping::getValueMap ( ) const
inline

Return the held value mapping.

Definition at line 76 of file BlockAndValueMapping.h.

◆ lookup()

template<typename T >
T mlir::BlockAndValueMapping::lookup ( from) const
inline

◆ lookupOrDefault() [1/2]

Block* mlir::BlockAndValueMapping::lookupOrDefault ( Block from) const
inline

◆ lookupOrDefault() [2/2]

Value mlir::BlockAndValueMapping::lookupOrDefault ( Value  from) const
inline

Definition at line 62 of file BlockAndValueMapping.h.

◆ lookupOrNull() [1/2]

Block* mlir::BlockAndValueMapping::lookupOrNull ( Block from) const
inline

Lookup a mapped value within the map.

If a mapping for the provided value does not exist then return nullptr.

Definition at line 52 of file BlockAndValueMapping.h.

Referenced by mlir::spirv::Deserializer::collect(), lookup(), and remapInlinedOperands().

◆ lookupOrNull() [2/2]

Value mlir::BlockAndValueMapping::lookupOrNull ( Value  from) const
inline

Definition at line 55 of file BlockAndValueMapping.h.

◆ map() [1/3]

void mlir::BlockAndValueMapping::map ( Block from,
Block to 
)
inline

◆ map() [2/3]

void mlir::BlockAndValueMapping::map ( Value  from,
Value  to 
)
inline

Definition at line 31 of file BlockAndValueMapping.h.

References value.

◆ map() [3/3]

template<typename S , typename T , std::enable_if_t<!std::is_assignable< Value, S >::value &&!std::is_assignable< Block *, S >::value > * = nullptr>
void mlir::BlockAndValueMapping::map ( S &&  from,
T &&  to 
)
inline

Definition at line 37 of file BlockAndValueMapping.h.

References map().


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