CIRCT
18.0.0git
|
Classes | |
class | HandshakeLowering |
struct | MemLoadInterface |
struct | MemStoreInterface |
class | HandshakeVisitor |
HandshakeVisitor is a visitor for handshake nodes. More... | |
Typedefs | |
using | RegionLoweringFunc = llvm::function_ref< LogicalResult(Region &, ConversionPatternRewriter &)> |
using | InstanceGraph = std::map< std::string, std::set< std::string > > |
Iterates over the handshake::FuncOp's in the program to build an instance graph. More... | |
Functions | |
LogicalResult | partiallyLowerRegion (const RegionLoweringFunc &loweringFunc, MLIRContext *ctx, Region &r) |
template<typename T , typename... TArgs, typename... TArgs2> | |
LogicalResult | runPartialLowering (T &instance, LogicalResult(T::*memberFunc)(ConversionPatternRewriter &, TArgs2...), TArgs &...args) |
void | removeBasicBlocks (Region &r) |
Remove basic blocks inside the given region. More... | |
template<typename TSrcTerm , typename TDstTerm > | |
LogicalResult | lowerRegion (HandshakeLowering &hl, bool sourceConstants, bool disableTaskPipelining, Value entryCtrl) |
LogicalResult | postDataflowConvert (Operation *op) |
Lowers the mlir operations into handshake that are not part of the dataflow conversion. More... | |
Type | toValidType (Type t) |
esi::ChannelType | esiWrapper (mlir::Type t) |
hw::ModulePortInfo | getPortInfoForOpTypes (mlir::Operation *op, TypeRange inputs, TypeRange outputs) |
bool | isControlOpImpl (Operation *op) |
Default implementation for checking whether an operation is a control operation. More... | |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createHandshakeDotPrintPass () |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createHandshakeOpCountPass () |
std::unique_ptr< mlir::Pass > | createHandshakeMaterializeForksSinksPass () |
std::unique_ptr< mlir::Pass > | createHandshakeDematerializeForksSinksPass () |
std::unique_ptr< mlir::Pass > | createHandshakeRemoveBuffersPass () |
std::unique_ptr< mlir::Pass > | createHandshakeAddIDsPass () |
std::unique_ptr< mlir::Pass > | createHandshakeLowerExtmemToHWPass (std::optional< bool > createESIWrapper={}) |
std::unique_ptr< mlir::Pass > | createHandshakeLegalizeMemrefsPass () |
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > | createHandshakeInsertBuffersPass (const std::string &strategy="all", unsigned bufferSize=2) |
std::unique_ptr< mlir::Pass > | createHandshakeLockFunctionsPass () |
LogicalResult | resolveInstanceGraph (ModuleOp moduleOp, InstanceGraph &instanceGraph, std::string &topLevel, SmallVectorImpl< std::string > &sortedFuncs) |
Iterates over the handshake::FuncOp's in the program to build an instance graph. More... | |
LogicalResult | verifyAllValuesHasOneUse (handshake::FuncOp op) |
LogicalResult | addSinkOps (Region &r, OpBuilder &rewriter) |
LogicalResult | addForkOps (Region &r, OpBuilder &rewriter) |
void | insertFork (Value result, bool isLazy, OpBuilder &rewriter) |
LogicalResult | lockRegion (Region &r, OpBuilder &rewriter) |
LogicalResult | bufferRegion (Region &r, OpBuilder &rewriter, StringRef strategy, unsigned bufferSize) |
bool | simulate (llvm::StringRef toplevelFunction, llvm::ArrayRef< std::string > inputArgs, mlir::OwningOpRef< mlir::ModuleOp > &module, mlir::MLIRContext &context) |
template<typename TMemOp > | |
static bool | executeMemoryOperation (TMemOp op, unsigned buffer, int opIndex, llvm::DenseMap< mlir::Value, llvm::Any > &valueMap, llvm::DenseMap< unsigned, unsigned > &memoryMap, llvm::DenseMap< mlir::Value, double > &timeMap, std::vector< std::vector< llvm::Any >> &store, std::vector< mlir::Value > &scheduleList) |
static Type | tupleToStruct (TupleType tuple) |
esi::ChannelType | esiWrapper (Type t) |
hw::ModulePortInfo | getPortInfoForOpTypes (Operation *op, TypeRange inputs, TypeRange outputs) |
Variables | |
static constexpr const char * | kPredeclarationAttr = "handshake.module_name" |
using circt::handshake::InstanceGraph = typedef std::map<std::string, std::set<std::string> > |
Iterates over the handshake::FuncOp's in the program to build an instance graph.
In doing so, we detect whether there are any cycles in this graph, as well as infer a top function for the design by performing a topological sort of the instance graph. The result of this sort is placed in sortedFuncs.
Definition at line 50 of file HandshakePasses.h.
using circt::handshake::RegionLoweringFunc = typedef llvm::function_ref<LogicalResult(Region &, ConversionPatternRewriter &)> |
Definition at line 38 of file CFToHandshake.h.
LogicalResult circt::handshake::addForkOps | ( | Region & | r, |
OpBuilder & | rewriter | ||
) |
Definition at line 76 of file Materialization.cpp.
References insertFork().
LogicalResult circt::handshake::addSinkOps | ( | Region & | r, |
OpBuilder & | rewriter | ||
) |
Definition at line 96 of file Materialization.cpp.
References insertSink().
LogicalResult circt::handshake::bufferRegion | ( | Region & | r, |
OpBuilder & | rewriter, | ||
StringRef | strategy, | ||
unsigned | bufferSize | ||
) |
Definition at line 171 of file Buffers.cpp.
References bufferAllFIFOStrategy(), bufferAllStrategy(), bufferCyclesStrategy(), and builder.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeAddIDsPass | ( | ) |
Definition at line 618 of file Analysis.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeDematerializeForksSinksPass | ( | ) |
Definition at line 171 of file Materialization.cpp.
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > circt::handshake::createHandshakeDotPrintPass | ( | ) |
Definition at line 609 of file Analysis.cpp.
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > circt::handshake::createHandshakeInsertBuffersPass | ( | const std::string & | strategy = "all" , |
unsigned | bufferSize = 2 |
||
) |
Definition at line 215 of file Buffers.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeLegalizeMemrefsPass | ( | ) |
Definition at line 93 of file LegalizeMemrefs.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeLockFunctionsPass | ( | ) |
Definition at line 85 of file LockFunctions.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeLowerExtmemToHWPass | ( | std::optional< bool > | createESIWrapper = {} | ) |
Definition at line 473 of file LowerExtmemToHW.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeMaterializeForksSinksPass | ( | ) |
Definition at line 166 of file Materialization.cpp.
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > circt::handshake::createHandshakeOpCountPass | ( | ) |
Definition at line 614 of file Analysis.cpp.
std::unique_ptr< mlir::Pass > circt::handshake::createHandshakeRemoveBuffersPass | ( | ) |
Definition at line 210 of file Buffers.cpp.
esi::ChannelType circt::handshake::esiWrapper | ( | mlir::Type | t | ) |
Referenced by esiWrapper(), and getPortInfoForOpTypes().
esi::ChannelType circt::handshake::esiWrapper | ( | Type | t | ) |
Definition at line 182 of file PassHelpers.cpp.
References esiWrapper(), circt::calyx::direction::get(), toValidType(), and tupleToStruct().
|
static |
Definition at line 274 of file HandshakeExecutableOps.cpp.
References assert().
hw::ModulePortInfo circt::handshake::getPortInfoForOpTypes | ( | mlir::Operation * | op, |
TypeRange | inputs, | ||
TypeRange | outputs | ||
) |
Referenced by getPortInfoForOp().
hw::ModulePortInfo circt::handshake::getPortInfoForOpTypes | ( | Operation * | op, |
TypeRange | inputs, | ||
TypeRange | outputs | ||
) |
Definition at line 258 of file PassHelpers.cpp.
References esiWrapper(), circt::calyx::direction::get(), Input, inputs, Output, and outputs.
void circt::handshake::insertFork | ( | Value | result, |
bool | isLazy, | ||
OpBuilder & | rewriter | ||
) |
Definition at line 52 of file Materialization.cpp.
References replaceFirstUse().
Referenced by addForkOps().
bool circt::handshake::isControlOpImpl | ( | Operation * | op | ) |
Default implementation for checking whether an operation is a control operation.
This function cannot be defined within ControlInterface because its implementation attempts to cast the operation to an SOSTInterface, which may not be declared at the point where the default trait's method is defined. Therefore, the default implementation of ControlInterface's isControl method simply calls this function.
Definition at line 42 of file HandshakeOps.cpp.
LogicalResult circt::handshake::lockRegion | ( | Region & | r, |
OpBuilder & | rewriter | ||
) |
Definition at line 25 of file LockFunctions.cpp.
References circt::BackedgeBuilder::get().
LogicalResult circt::handshake::lowerRegion | ( | HandshakeLowering & | hl, |
bool | sourceConstants, | ||
bool | disableTaskPipelining, | ||
Value | entryCtrl | ||
) |
Definition at line 183 of file CFToHandshake.h.
References circt::handshake::HandshakeLowering::addBranchOps(), circt::handshake::HandshakeLowering::addMergeOps(), circt::handshake::HandshakeLowering::connectConstantsToControl(), circt::handshake::HandshakeLowering::connectToMemory(), circt::handshake::HandshakeLowering::feedForwardRewriting(), circt::handshake::HandshakeLowering::getRegion(), circt::handshake::HandshakeLowering::loopNetworkRewriting(), removeBasicBlocks(), circt::handshake::HandshakeLowering::replaceCallOps(), circt::handshake::HandshakeLowering::replaceMemoryOps(), and runPartialLowering().
LogicalResult circt::handshake::partiallyLowerRegion | ( | const RegionLoweringFunc & | loweringFunc, |
MLIRContext * | ctx, | ||
Region & | r | ||
) |
Definition at line 188 of file CFToHandshake.cpp.
Referenced by lowerFuncOp(), and runPartialLowering().
LogicalResult circt::handshake::postDataflowConvert | ( | Operation * | op | ) |
Lowers the mlir operations into handshake that are not part of the dataflow conversion.
void circt::handshake::removeBasicBlocks | ( | Region & | r | ) |
Remove basic blocks inside the given region.
This allows the result to be a valid graph region, since multi-basic block regions are not allowed to be graph regions currently.
Definition at line 221 of file CFToHandshake.cpp.
Referenced by lowerRegion().
LogicalResult circt::handshake::resolveInstanceGraph | ( | ModuleOp | moduleOp, |
InstanceGraph & | instanceGraph, | ||
std::string & | topLevel, | ||
SmallVectorImpl< std::string > & | sortedFuncs | ||
) |
Iterates over the handshake::FuncOp's in the program to build an instance graph.
In doing so, we detect whether there are any cycles in this graph, as well as infer a top module for the design by performing a topological sort of the instance graph. The result of this sort is placed in sortedFuncs.
Definition at line 38 of file PassHelpers.cpp.
References assert().
LogicalResult circt::handshake::runPartialLowering | ( | T & | instance, |
LogicalResult(T::*)(ConversionPatternRewriter &, TArgs2...) | memberFunc, | ||
TArgs &... | args | ||
) |
Definition at line 161 of file CFToHandshake.h.
References partiallyLowerRegion().
Referenced by lowerRegion().
bool circt::handshake::simulate | ( | llvm::StringRef | toplevelFunction, |
llvm::ArrayRef< std::string > | inputArgs, | ||
mlir::OwningOpRef< mlir::ModuleOp > & | module, | ||
mlir::MLIRContext & | context | ||
) |
Type circt::handshake::toValidType | ( | Type | t | ) |
Definition at line 157 of file PassHelpers.cpp.
References circt::calyx::direction::get(), circt::esi::innerType(), and tupleToStruct().
Referenced by esiWrapper().
|
static |
Definition at line 141 of file PassHelpers.cpp.
References circt::calyx::direction::get(), and circt::esi::innerType().
Referenced by esiWrapper(), and toValidType().
LogicalResult circt::handshake::verifyAllValuesHasOneUse | ( | handshake::FuncOp | op | ) |
Definition at line 110 of file PassHelpers.cpp.
|
staticconstexpr |
Definition at line 37 of file HandshakeToHW.h.