CIRCT
20.0.0git
|
Track the output verilog line,column number information for every op. More...
#include <ExportVerilogInternals.h>
Classes | |
struct | LineColPair |
struct | LocationRange |
Public Types | |
using | DataType = std::pair< Operation *, bool > |
Data that is unique to each callback. More... | |
Public Member Functions | |
OpLocMap (llvm::formatted_raw_ostream &fStream) | |
OpLocMap ()=default | |
void | setStream (llvm::formatted_raw_ostream &f) |
Set the output stream. More... | |
void | operator() (DataType data) |
Callback operator, invoked on the print events indicated by data . More... | |
void | updateIRWithLoc (unsigned lineOffset, StringAttr fileName, MLIRContext *context) |
Called after the verilog has been exported and the corresponding locations are recorded in the map. More... | |
void | clear () |
Private Types | |
using | Locations = SmallVector< LocationRange, 2 > |
Private Member Functions | |
void | addBeginLoc (Operation *op) |
Record the output location from where the op begins to print. More... | |
void | addEndLoc (Operation *op) |
Record the output location where the op ends to print. More... | |
Private Attributes | |
DenseMap< Operation *, Locations > | map |
Map to store the verilog locations for each op. More... | |
llvm::formatted_raw_ostream * | fStream |
The corresponding output stream, which provides the current print location on the stream. More... | |
StringAttr | verilogLineAttr |
Cache to store string attributes. More... | |
StringAttr | metadataAttr |
Track the output verilog line,column number information for every op.
Definition at line 190 of file ExportVerilogInternals.h.
using circt::ExportVerilog::OpLocMap::DataType = std::pair<Operation *, bool> |
Data that is unique to each callback.
The op and whether its a begin or end location.
Definition at line 206 of file ExportVerilogInternals.h.
|
private |
Definition at line 273 of file ExportVerilogInternals.h.
|
inline |
Definition at line 208 of file ExportVerilogInternals.h.
|
default |
|
inlineprivate |
Record the output location from where the op begins to print.
Definition at line 192 of file ExportVerilogInternals.h.
Referenced by operator()().
|
inlineprivate |
Record the output location where the op ends to print.
Definition at line 196 of file ExportVerilogInternals.h.
References assert(), empty, fStream, and map.
Referenced by operator()().
|
inline |
Definition at line 256 of file ExportVerilogInternals.h.
References map.
|
inline |
Callback operator, invoked on the print events indicated by data
.
Definition at line 214 of file ExportVerilogInternals.h.
References addBeginLoc(), addEndLoc(), assert(), and fStream.
|
inline |
Set the output stream.
Definition at line 212 of file ExportVerilogInternals.h.
References fStream.
Referenced by circt::ExportVerilog::SharedEmitterState::emitOps().
|
inline |
Called after the verilog has been exported and the corresponding locations are recorded in the map.
Definition at line 226 of file ExportVerilogInternals.h.
References assert(), circt::calyx::direction::get(), map, metadataAttr, and verilogLineAttr.
|
private |
The corresponding output stream, which provides the current print location on the stream.
Definition at line 278 of file ExportVerilogInternals.h.
Referenced by addBeginLoc(), addEndLoc(), operator()(), and setStream().
|
private |
Map to store the verilog locations for each op.
Definition at line 275 of file ExportVerilogInternals.h.
Referenced by addBeginLoc(), addEndLoc(), clear(), and updateIRWithLoc().
|
private |
Definition at line 280 of file ExportVerilogInternals.h.
Referenced by updateIRWithLoc().
|
private |
Cache to store string attributes.
Definition at line 280 of file ExportVerilogInternals.h.
Referenced by updateIRWithLoc().