CIRCT  19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
circt::ValueMapper Class Reference

The ValueMapper class facilitates the definition and connection of SSA def-use chains between two location - a 'from' location (defining use-def chains) and a 'to' location (where new operations are created based on the 'from' location). More...

#include <ValueMapper.h>

Collaboration diagram for circt::ValueMapper:
Collaboration graph
[legend]

Public Types

using TypeTransformer = llvm::function_ref< mlir::Type(mlir::Type)>
 

Public Member Functions

 ValueMapper (BackedgeBuilder *bb=nullptr)
 
mlir::Value get (mlir::Value from, TypeTransformer typeTransformer=ValueMapper::identity)
 
llvm::SmallVector< mlir::Value > get (mlir::ValueRange from, TypeTransformer typeTransformer=ValueMapper::identity)
 
void set (mlir::Value from, mlir::Value to, bool replace=false)
 
void set (mlir::ValueRange from, mlir::ValueRange to, bool replace=false)
 

Static Public Member Functions

static mlir::Type identity (mlir::Type t)
 

Private Attributes

BackedgeBuilderbb = nullptr
 
llvm::DenseMap< mlir::Value, std::variant< mlir::Value, Backedge > > mapping
 

Detailed Description

The ValueMapper class facilitates the definition and connection of SSA def-use chains between two location - a 'from' location (defining use-def chains) and a 'to' location (where new operations are created based on the 'from' location).

ยด

Definition at line 35 of file ValueMapper.h.

Member Typedef Documentation

◆ TypeTransformer

using circt::ValueMapper::TypeTransformer = llvm::function_ref<mlir::Type(mlir::Type)>

Definition at line 37 of file ValueMapper.h.

Constructor & Destructor Documentation

◆ ValueMapper()

circt::ValueMapper::ValueMapper ( BackedgeBuilder bb = nullptr)
inlineexplicit

Definition at line 39 of file ValueMapper.h.

Member Function Documentation

◆ get() [1/2]

mlir::Value circt::ValueMapper::get ( mlir::Value  from,
TypeTransformer  typeTransformer = ValueMapper::identity 
)

Referenced by circt::ssp::saveProblem().

◆ get() [2/2]

llvm::SmallVector<mlir::Value> circt::ValueMapper::get ( mlir::ValueRange  from,
TypeTransformer  typeTransformer = ValueMapper::identity 
)

◆ identity()

static mlir::Type circt::ValueMapper::identity ( mlir::Type  t)
inlinestatic

Definition at line 38 of file ValueMapper.h.

◆ set() [1/2]

void circt::ValueMapper::set ( mlir::Value  from,
mlir::Value  to,
bool  replace = false 
)

Referenced by circt::ssp::saveProblem().

◆ set() [2/2]

void circt::ValueMapper::set ( mlir::ValueRange  from,
mlir::ValueRange  to,
bool  replace = false 
)

Member Data Documentation

◆ bb

BackedgeBuilder* circt::ValueMapper::bb = nullptr
private

Definition at line 57 of file ValueMapper.h.

◆ mapping

llvm::DenseMap<mlir::Value, std::variant<mlir::Value, Backedge> > circt::ValueMapper::mapping
private

Definition at line 58 of file ValueMapper.h.


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