CIRCT
20.0.0git
|
Private Member Functions | |
hw::OutputFileAttr | getOutputFile (SymbolRefAttr layerName) |
hw::OutputFileAttr | outputFileForLayer (StringRef circuitName, SymbolRefAttr layerName) |
FModuleOp | buildNewModule (OpBuilder &builder, LayerBlockOp layerBlock, SmallVectorImpl< PortInfo > &ports) |
Safely build a new module with a given namehint. More... | |
FailureOr< InnerRefMap > | runOnModuleLike (FModuleLike moduleLike) |
Strip layer colors from the module's interface. More... | |
LogicalResult | runOnModuleBody (FModuleOp moduleOp, InnerRefMap &innerRefMap) |
Extract layerblocks and strip probe colors from all ops under the module. More... | |
void | removeLayersFromPorts (FModuleLike moduleLike) |
Update the module's port types to remove any explicit layer requirements from any probe types. More... | |
void | removeLayersFromValue (Value value) |
Update the value's type to remove any layers from any probe types. More... | |
void | removeLayersFromRefCast (RefCastOp cast) |
Remove any layers from the result of the cast. More... | |
void | lowerInlineLayerBlock (LayerOp layer, LayerBlockOp layerBlock) |
Lower an inline layerblock to an ifdef block. More... | |
void | preprocessLayers (CircuitNamespace &ns, OpBuilder &b, LayerOp layer, SmallVector< FlatSymbolRefAttr > &stack) |
Preprocess layers to build macro declarations and cache information about the layers so that this can be quired later. More... | |
void | preprocessLayers (CircuitNamespace &ns, LayerOp layer) |
void | runOnOperation () override |
Entry point for the function. More... | |
Private Attributes | |
llvm::sys::SmartMutex< true > * | circuitMutex |
Indicates exclusive access to modify the circuitNamespace and the circuit. More... | |
DenseMap< LayerBlockOp, StringRef > | moduleNames |
A map of layer blocks to module name that should be created for it. More... | |
DenseMap< LayerOp, FlatSymbolRefAttr > | macroNames |
A map from inline layers to their macro names. More... | |
DenseMap< SymbolRefAttr, LayerOp > | symbolToLayer |
A mapping of symbol name to layer operation. More... | |
Definition at line 130 of file LowerLayers.cpp.
|
private |
Safely build a new module with a given namehint.
Multi-process safe function to build a module in the circuit and return it.
This handles geting a lock to modify the top-level circuit.
The name provided is only a namehint for the module—a unique name will be generated if there are conflicts with the namehint in the circuit-level namespace.
Definition at line 202 of file LowerLayers.cpp.
References assert(), circt::calyx::direction::get(), and getOutputFile().
|
inlineprivate |
Definition at line 132 of file LowerLayers.cpp.
|
private |
Lower an inline layerblock to an ifdef block.
Definition at line 302 of file LowerLayers.cpp.
|
inlineprivate |
Definition at line 139 of file LowerLayers.cpp.
References fileNameForLayer(), and getOutputFile().
|
private |
Definition at line 749 of file LowerLayers.cpp.
|
private |
Preprocess layers to build macro declarations and cache information about the layers so that this can be quired later.
Definition at line 722 of file LowerLayers.cpp.
References circt::calyx::direction::get(), macroNameForLayer(), and circt::Namespace::newName().
|
private |
Update the module's port types to remove any explicit layer requirements from any probe types.
Definition at line 243 of file LowerLayers.cpp.
References circt::calyx::direction::get().
|
private |
Remove any layers from the result of the cast.
If the cast becomes a nop, remove the cast itself from the IR.
Definition at line 227 of file LowerLayers.cpp.
|
private |
Update the value's type to remove any layers from any probe types.
Definition at line 220 of file LowerLayers.cpp.
|
private |
Extract layerblocks and strip probe colors from all ops under the module.
Definition at line 311 of file LowerLayers.cpp.
References assert(), Python.support::connect(), circt::calyx::direction::get(), circt::hw::InnerSymbolTable::get(), circt::firrtl::getFieldName(), circt::firrtl::getFieldRefForTarget(), circt::firrtl::In, instanceNameForLayer(), circt::isAncestorOfValueOwner(), and circt::firrtl::Out.
|
private |
Strip layer colors from the module's interface.
Definition at line 272 of file LowerLayers.cpp.
|
overrideprivate |
Entry point for the function.
Process a circuit to remove all layer blocks in each module and top-level layer definition.
Definition at line 757 of file LowerLayers.cpp.
References empty, circt::calyx::direction::get(), moduleNameForLayer(), circt::Namespace::newName(), and circt::firrtl::transformReduce().
|
private |
Indicates exclusive access to modify the circuitNamespace and the circuit.
Definition at line 186 of file LowerLayers.cpp.
|
private |
A map from inline layers to their macro names.
Definition at line 192 of file LowerLayers.cpp.
|
private |
A map of layer blocks to module name that should be created for it.
Definition at line 189 of file LowerLayers.cpp.
|
private |
A mapping of symbol name to layer operation.
Definition at line 195 of file LowerLayers.cpp.