CIRCT  19.0.0git
Public Member Functions | List of all members
circt::ExportSystemC::OpEmissionPattern< Op > Struct Template Reference

This is a convenience class providing default implementations for operation emission patterns. More...

#include <EmissionPattern.h>

Inheritance diagram for circt::ExportSystemC::OpEmissionPattern< Op >:
Inheritance graph
[legend]
Collaboration diagram for circt::ExportSystemC::OpEmissionPattern< Op >:
Collaboration graph
[legend]

Public Member Functions

 OpEmissionPattern (MLIRContext *context)
 
void emitStatement (mlir::Operation *op, EmissionPrinter &p) final
 Emit zero or more statements for the given operation. More...
 
MatchResult matchInlinable (Value value) override
 Checks if this pattern is applicable to the given value to emit an inlinable expression. More...
 
bool matchStatement (mlir::Operation *op) override
 Checks if this pattern is applicable to the given operation for statement emission. More...
 
void emitInlined (mlir::Value value, EmissionPrinter &p) override
 Emit the expression for the given value. More...
 
virtual void emitStatement (Op op, EmissionPrinter &p)
 Emit zero (default) or more statements for the given operation. More...
 
- Public Member Functions inherited from circt::ExportSystemC::OpEmissionPatternBase
 OpEmissionPatternBase (StringRef operationName, MLIRContext *context)
 
virtual ~OpEmissionPatternBase ()=default
 
- Public Member Functions inherited from circt::ExportSystemC::PatternBase
 PatternBase (const void *rootValue)
 
const void * getRootValue () const
 Get a unique identifier for the C++ type the pattern is matching on. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from circt::ExportSystemC::PatternBase
template<typename E , typename... Args>
static std::unique_ptr< E > create (Args &&...args)
 

Detailed Description

template<typename Op>
struct circt::ExportSystemC::OpEmissionPattern< Op >

This is a convenience class providing default implementations for operation emission patterns.

Definition at line 168 of file EmissionPattern.h.

Constructor & Destructor Documentation

◆ OpEmissionPattern()

template<typename Op >
circt::ExportSystemC::OpEmissionPattern< Op >::OpEmissionPattern ( MLIRContext *  context)
inlineexplicit

Definition at line 169 of file EmissionPattern.h.

Member Function Documentation

◆ emitInlined()

template<typename Op >
void circt::ExportSystemC::OpEmissionPattern< Op >::emitInlined ( mlir::Value  value,
EmissionPrinter p 
)
inlineoverridevirtual

Emit the expression for the given value.

This has to be overriden whenever the 'matchInlinable' function is overriden and emit a valid expression.

Implements circt::ExportSystemC::OpEmissionPatternBase.

Definition at line 189 of file EmissionPattern.h.

◆ emitStatement() [1/2]

template<typename Op >
void circt::ExportSystemC::OpEmissionPattern< Op >::emitStatement ( mlir::Operation *  op,
EmissionPrinter p 
)
inlinefinalvirtual

Emit zero or more statements for the given operation.

Implements circt::ExportSystemC::OpEmissionPatternBase.

Definition at line 172 of file EmissionPattern.h.

◆ emitStatement() [2/2]

template<typename Op >
virtual void circt::ExportSystemC::OpEmissionPattern< Op >::emitStatement ( Op  op,
EmissionPrinter p 
)
inlinevirtual

Emit zero (default) or more statements for the given operation.

Reimplemented in VariableEmitter, ReturnEmitter, FuncEmitter, CallEmitter, CallIndirectEmitter, BindPortEmitter, and AssignEmitter.

Definition at line 192 of file EmissionPattern.h.

◆ matchInlinable()

template<typename Op >
MatchResult circt::ExportSystemC::OpEmissionPattern< Op >::matchInlinable ( Value  value)
inlineoverridevirtual

Checks if this pattern is applicable to the given value to emit an inlinable expression.

Additionally returns information such as the precedence to the pattern where this pattern's result is to be inlined. Defaults to never match.

Implements circt::ExportSystemC::OpEmissionPatternBase.

Definition at line 180 of file EmissionPattern.h.

◆ matchStatement()

template<typename Op >
bool circt::ExportSystemC::OpEmissionPattern< Op >::matchStatement ( mlir::Operation *  op)
inlineoverridevirtual

Checks if this pattern is applicable to the given operation for statement emission.

When not overriden this matches on all operations of the type given as template parameter and emits nothing.

Implements circt::ExportSystemC::OpEmissionPatternBase.

Definition at line 185 of file EmissionPattern.h.


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