CIRCT
20.0.0git
|
Emit a systemc.cpp.func function. More...
Public Member Functions | |
MatchResult | matchInlinable (Value value) override |
Checks if this pattern is applicable to the given value to emit an inlinable expression. More... | |
void | emitInlined (Value value, EmissionPrinter &p) override |
void | emitStatement (FuncOp func, EmissionPrinter &p) override |
Emit zero (default) or more statements for the given operation. More... | |
Public Member Functions inherited from circt::ExportSystemC::OpEmissionPattern< FuncOp > | |
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... | |
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) |
Emit a systemc.cpp.func function.
Users of the function arguments request an expression to be inlined and we simply return the name of the argument. This name has to be passed to this emission pattern via an array of strings attribute called 'argNames' because the emitter cannot do any name uniquing as it just emits the IR statement by statement. However, relying on an attribute for the argument names also has the advantage that the names can be preserved 1-1 during a lowering pipeline and upstream passes have more control on how the arguments should be named (e.g. when they create a function and have some context to assign better names).
Definition at line 368 of file SystemCEmissionPatterns.cpp.
|
inlineoverride |
Definition at line 380 of file SystemCEmissionPatterns.cpp.
|
inlineoverridevirtual |
Emit zero (default) or more statements for the given operation.
Reimplemented from circt::ExportSystemC::OpEmissionPattern< FuncOp >.
Definition at line 391 of file SystemCEmissionPatterns.cpp.
References circt::ExportSystemC::EmissionPrinter::emitRegion(), and circt::ExportSystemC::EmissionPrinter::emitType().
|
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.
Implements circt::ExportSystemC::OpEmissionPatternBase.
Definition at line 370 of file SystemCEmissionPatterns.cpp.