CIRCT
17.0.0git
|
This file defines an intermediate representation for circuits acting as an abstraction for constraints defined over an SMT's solver context. More...
Classes | |
class | HWArithToHWTypeConverter |
A helper type converter class that automatically populates the relevant materializations and type conversions for converting HWArith to HW. More... | |
struct | HWToLLVMEndianessConverter |
class | SSAMaximizationStrategy |
Strategy class to control the behavior of SSA maximization. More... | |
class | LogicExporter |
A class traversing MLIR IR to extrapolate the logic of a given circuit. More... | |
class | Solver |
A satisfiability checker for circuit equivalence. More... | |
struct | Reduction |
An abstract reduction pattern. More... | |
struct | OpReduction |
struct | PassReduction |
A reduction pattern that applies an mlir::Pass . More... | |
class | ReducePatternSet |
struct | ReducePatternDialectInterface |
A dialect interface to provide reduction patterns to a reducer tool. More... | |
struct | ReducePatternInterfaceCollection |
class | Tester |
A testing environment for reduction attempts. More... | |
class | TestCase |
A single test case to be run by a tester. More... | |
class | BackedgeBuilder |
Instantiate one of these and use it to build typed backedges. More... | |
class | Backedge |
Backedge is a wrapper class around a Value . More... | |
class | StringAttrOrRef |
A helper union that can represent a StringAttr , StringRef , or Twine . More... | |
struct | TypeConversionPattern |
Generic pattern which replaces an operation by one of the same operation name, but with converted attributes, operands, and result types to eliminate illegal types. More... | |
class | FieldRef |
This class represents a reference to a specific field or element of an aggregate value. More... | |
struct | LoweringOptions |
Options which control the emission from CIRCT to Verilog. More... | |
struct | LoweringOptionsParser |
Commandline parser for LoweringOptions. More... | |
struct | LoweringOptionsOption |
class | Namespace |
A namespace that is used to store existing names and generate new names in some scope within the IR. More... | |
class | VerbosePassInstrumentation |
class | SymbolCacheBase |
Base symbol cache class to allow for cache lookup through a pointer to some abstract cache. More... | |
class | SymbolCache |
Default symbol cache implementation; stores associations between names (StringAttr's) to mlir::Operation's. More... | |
class | ValueMapper |
The ValueMapper class facilitates the definition and connection of SSA def-use chains between two location - a 'from' location (defining use-def chains) and a 'to' location (where new operations are created based on the 'from' location). More... | |
Functions | |
std::unique_ptr< mlir::Pass > | createAffineToLoopSchedule () |
std::unique_ptr< OperationPass< ModuleOp > > | createLowerArcToLLVMPass () |
std::unique_ptr< mlir::Pass > | createCalyxToFSMPass () |
std::unique_ptr< mlir::Pass > | createMaterializeCalyxToFSMPass () |
std::unique_ptr< mlir::Pass > | createRemoveGroupsFromFSMPass () |
std::unique_ptr< mlir::Pass > | createCalyxToHWPass () |
void | populateCombToArithConversionPatterns (TypeConverter &converter, RewritePatternSet &patterns) |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertCombToArithPass () |
void | populateCombToLLVMConversionPatterns (mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns) |
Get the Comb to LLVM conversion patterns. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertToArcsPass () |
std::unique_ptr< mlir::Pass > | createExportChiselInterfacePass (llvm::raw_ostream &os) |
std::unique_ptr< mlir::Pass > | createExportSplitChiselInterfacePass (mlir::StringRef outputDirectory="./") |
std::unique_ptr< mlir::Pass > | createExportChiselInterfacePass () |
std::unique_ptr< mlir::Pass > | createTestApplyLoweringOptionPass (llvm::StringRef options) |
std::unique_ptr< mlir::Pass > | createTestApplyLoweringOptionPass () |
std::unique_ptr< mlir::Pass > | createPrepareForEmissionPass () |
std::unique_ptr< mlir::Pass > | createLegalizeAnonEnumsPass () |
std::unique_ptr< mlir::Pass > | createExportVerilogPass (llvm::raw_ostream &os) |
std::unique_ptr< mlir::Pass > | createExportVerilogPass () |
std::unique_ptr< mlir::Pass > | createExportSplitVerilogPass (llvm::StringRef directory="./") |
mlir::LogicalResult | exportVerilog (mlir::ModuleOp module, llvm::raw_ostream &os) |
Export a module containing HW, and SV dialect code. More... | |
mlir::LogicalResult | exportSplitVerilog (mlir::ModuleOp module, llvm::StringRef dirname) |
Export a module containing HW, and SV dialect code, as one file per SV module. More... | |
std::unique_ptr< mlir::Pass > | createLowerFIRRTLToHWPass (bool enableAnnotationWarning=false, bool emitChiselAssertsAsSVA=false, bool addMuxPragmas=false, bool disableMemRandomization=false, bool disableRegRandomization=false) |
This is the pass constructor. More... | |
std::unique_ptr< mlir::Pass > | createConvertFSMToSVPass () |
std::unique_ptr< mlir::Pass > | createHandshakeToDCPass () |
std::unique_ptr< mlir::Pass > | createHandshakeToHWPass () |
void | populateHWArithToHWConversionPatterns (HWArithToHWTypeConverter &typeConverter, RewritePatternSet &patterns) |
Get the HWArith to HW conversion patterns. More... | |
std::unique_ptr< mlir::Pass > | createHWArithToHWPass () |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createConvertHWToLLHDPass () |
Create a HW to LLHD conversion pass. More... | |
void | populateHWToLLVMTypeConversions (mlir::LLVMTypeConverter &converter) |
Get the HW to LLVM type conversions. More... | |
void | populateHWToLLVMConversionPatterns (mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns, Namespace &globals, DenseMap< std::pair< Type, ArrayAttr >, mlir::LLVM::GlobalOp > &constAggregateGlobalsMap) |
Get the HW to LLVM conversion patterns. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertHWToLLVMPass () |
Create an HW to LLVM conversion pass. More... | |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createConvertHWToSystemCPass () |
Create a HW to SystemC dialects conversion pass. More... | |
void | populateLLHDToLLVMTypeConversions (mlir::LLVMTypeConverter &converter) |
Get the LLHD to LLVM type conversions. More... | |
void | populateLLHDToLLVMConversionPatterns (mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns, size_t &sigCounter, size_t ®Counter) |
Get the LLHD to LLVM conversion patterns. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertLLHDToLLVMPass () |
Create an LLHD to LLVM conversion pass. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createLoopScheduleToCalyxPass () |
Create a LoopSchedule to Calyx conversion pass. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createConvertMooreToCorePass () |
Create an Moore to Comb/HW/LLHD conversion pass. More... | |
std::unique_ptr< mlir::Pass > | createPipelineToHWPass () |
Create an SCF to Calyx conversion pass. More... | |
std::unique_ptr< OperationPass< ModuleOp > > | createSCFToCalyxPass () |
Create an SCF to Calyx conversion pass. More... | |
LogicalResult | maximizeSSA (Value value, PatternRewriter &rewriter) |
Converts a single value within a function into maximal SSA form. More... | |
LogicalResult | maximizeSSA (Operation *op, SSAMaximizationStrategy &strategy, PatternRewriter &rewriter) |
Considers all of an operation's results for SSA maximization, following a provided strategy. More... | |
LogicalResult | maximizeSSA (Block *block, SSAMaximizationStrategy &strategy, PatternRewriter &rewriter) |
Considers all values defined by a block (i.e., block arguments and operation results within the block) for SSA maximization, following a provided strategy. More... | |
LogicalResult | maximizeSSA (Region ®ion, SSAMaximizationStrategy &strategy, PatternRewriter &rewriter) |
Considers all blocks within a region for SSA maximization, following a provided strategy. More... | |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createHandshakeAnalysisPass () |
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > | createStandardToHandshakePass (bool sourceConstants=false, bool disableTaskPipelining=false) |
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > | createHandshakeCanonicalizePass () |
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > | createHandshakeRemoveBlockPass () |
mlir::LogicalResult | insertMergeBlocks (mlir::Region &r, mlir::ConversionPatternRewriter &rewriter) |
Insert additional blocks that serve as counterparts to the blocks that diverged the control flow. More... | |
std::unique_ptr< mlir::Pass > | createInsertMergeBlocksPass () |
bool | isRegionSSAMaximized (Region ®ion) |
std::unique_ptr< mlir::Pass > | createMaximizeSSAPass () |
ParseResult | parseInputPortList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &inputs, SmallVectorImpl< Type > &inputTypes, ArrayAttr &inputNames) |
Parse a list of instance input ports. More... | |
void | printInputPortList (OpAsmPrinter &p, Operation *op, OperandRange inputs, TypeRange inputTypes, ArrayAttr inputNames) |
Print a list of instance input ports. More... | |
ParseResult | parseOutputPortList (OpAsmParser &parser, SmallVectorImpl< Type > &resultTypes, ArrayAttr &resultNames) |
Parse a list of instance output ports. More... | |
void | printOutputPortList (OpAsmPrinter &p, Operation *op, TypeRange resultTypes, ArrayAttr resultNames) |
Print a list of instance output ports. More... | |
ParseResult | parseOptionalParameterList (OpAsmParser &parser, ArrayAttr ¶meters) |
Parse an parameter list if present. More... | |
void | printOptionalParameterList (OpAsmPrinter &p, Operation *op, ArrayAttr parameters) |
Print a parameter list for a module or instance. More... | |
void | registerAllDialects (mlir::DialectRegistry ®istry) |
void | registerAllPasses () |
void | registerAllTranslations () |
void | populateGenericReducePatterns (MLIRContext *context, ReducePatternSet &patterns) |
Populate reduction patterns that are not specific to certain operations or dialects. More... | |
APInt | sextZeroWidth (APInt value, unsigned width) |
A safe version of APInt::sext that will NOT assert on zero-width signed APSInts. More... | |
APSInt | extOrTruncZeroWidth (APSInt value, unsigned width) |
A safe version of APSInt::extOrTrunc that will NOT assert on zero-width signed APSInts. More... | |
ParseResult | parseImplicitSSAName (OpAsmParser &parser, StringAttr &attr) |
Parse an implicit SSA name string attribute. More... | |
ParseResult | parseImplicitSSAName (OpAsmParser &parser, NamedAttrList &attrs) |
Parse an attribute dictionary and ensure that it contains a name field by inferring its value from the SSA name of the operation's first result if necessary. More... | |
bool | inferImplicitSSAName (OpAsmParser &parser, NamedAttrList &attrs) |
Ensure that attrs contains a name attribute by inferring its value from the SSA name of the operation's first result if necessary. More... | |
void | printImplicitSSAName (OpAsmPrinter &p, Operation *op, StringAttr attr) |
Print an implicit SSA name string attribute. More... | |
void | printImplicitSSAName (OpAsmPrinter &p, Operation *op, DictionaryAttr attrs, ArrayRef< StringRef > extraElides={}) |
Print an attribute dictionary and elide the name field if its value matches the SSA name of the operation's first result. More... | |
void | elideImplicitSSAName (OpAsmPrinter &printer, Operation *op, DictionaryAttr attrs, SmallVectorImpl< StringRef > &elides) |
Check if the name attribute in attrs matches the SSA name of the operation's first result. More... | |
inline ::llvm::hash_code | hash_value (const FieldRef &fieldRef) |
Get a hash code for a FieldRef. More... | |
LogicalResult | convertAttributeToJSON (llvm::json::OStream &json, Attribute attr) |
Convert a simple attribute to JSON. More... | |
Attribute | convertJSONToAttribute (MLIRContext *context, llvm::json::Value &value, llvm::json::Path p) |
Convert arbitrary JSON to an MLIR Attribute. More... | |
std::unique_ptr< Pass > | createSimpleCanonicalizerPass () |
Create a simple canonicalizer pass. More... | |
void | appendPossiblyAbsolutePath (llvm::SmallVectorImpl< char > &base, const llvm::Twine &suffix) |
Append a path to an existing path, replacing it if the other path is absolute. More... | |
const char * | getCirctVersion () |
const char * | getCirctVersionComment () |
std::unique_ptr< mlir::Pass > | createFlattenMemRefPass () |
std::unique_ptr< mlir::Pass > | createFlattenMemRefCallsPass () |
std::unique_ptr< mlir::Pass > | createStripDebugInfoWithPredPass (const std::function< bool(mlir::Location)> &pred) |
Creates a pass to strip debug information from a function. More... | |
bool | isUniDimensional (mlir::MemRefType memref) |
Variables | |
constexpr const char * | circtBugReportMsg |
A generic bug report message for CIRCT-related projects. More... | |
This file defines an intermediate representation for circuits acting as an abstraction for constraints defined over an SMT's solver context.
This file defines a SMT solver interface for the circt-lec
tool.
This file defines the logic-exporting class for the circt-lec
tool.
void circt::appendPossiblyAbsolutePath | ( | llvm::SmallVectorImpl< char > & | base, |
const llvm::Twine & | suffix | ||
) |
Append a path to an existing path, replacing it if the other path is absolute.
This mimicks the behaviour of foo/bar
and /foo/bar
being used in a working directory /home
, resulting in /home/foo/bar
and /foo/bar
, respectively.
Definition at line 23 of file Path.cpp.
Referenced by createOutputFile(), circt::ExportVerilog::SharedEmitterState::gatherFiles(), and HWExportModuleHierarchyPass::runOnOperation().
LogicalResult circt::convertAttributeToJSON | ( | llvm::json::OStream & | json, |
Attribute | attr | ||
) |
Attribute circt::convertJSONToAttribute | ( | MLIRContext * | context, |
llvm::json::Value & | value, | ||
llvm::json::Path | p | ||
) |
Convert arbitrary JSON to an MLIR Attribute.
std::unique_ptr< mlir::Pass > circt::createAffineToLoopSchedule | ( | ) |
Definition at line 647 of file AffineToLoopSchedule.cpp.
std::unique_ptr< mlir::Pass > circt::createCalyxToFSMPass | ( | ) |
Definition at line 324 of file CalyxToFSM.cpp.
std::unique_ptr< mlir::Pass > circt::createCalyxToHWPass | ( | ) |
Definition at line 464 of file CalyxToHW.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertCombToArithPass | ( | ) |
Definition at line 250 of file CombToArith.cpp.
std::unique_ptr< mlir::Pass > circt::createConvertFSMToSVPass | ( | ) |
Definition at line 732 of file FSMToSV.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertHWToLLHDPass | ( | ) |
Create a HW to LLHD conversion pass.
Definition at line 285 of file HWToLLHD.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertHWToLLVMPass | ( | ) |
Create an HW to LLVM conversion pass.
Definition at line 695 of file HWToLLVM.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertHWToSystemCPass | ( | ) |
Create a HW to SystemC dialects conversion pass.
Definition at line 346 of file HWToSystemC.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertLLHDToLLVMPass | ( | ) |
Create an LLHD to LLVM conversion pass.
Definition at line 2079 of file LLHDToLLVM.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertMooreToCorePass | ( | ) |
Create an Moore to Comb/HW/LLHD conversion pass.
Create a Moore to core dialects conversion pass.
Definition at line 344 of file MooreToCore.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createConvertToArcsPass | ( | ) |
Definition at line 433 of file ConvertToArcs.cpp.
std::unique_ptr< mlir::Pass > circt::createExportChiselInterfacePass | ( | ) |
Definition at line 264 of file ExportChiselInterface.cpp.
References createExportChiselInterfacePass(), and lec::outs().
std::unique_ptr< mlir::Pass > circt::createExportChiselInterfacePass | ( | llvm::raw_ostream & | os | ) |
Definition at line 255 of file ExportChiselInterface.cpp.
Referenced by createExportChiselInterfacePass(), and circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr< mlir::Pass > circt::createExportSplitChiselInterfacePass | ( | mlir::StringRef | outputDirectory = "./" | ) |
Definition at line 260 of file ExportChiselInterface.cpp.
Referenced by circt::firtool::populateCHIRRTLToLowFIRRTL().
std::unique_ptr<mlir::Pass> circt::createExportSplitVerilogPass | ( | llvm::StringRef | directory = "./" | ) |
std::unique_ptr< mlir::Pass > circt::createExportVerilogPass | ( | ) |
Definition at line 5958 of file ExportVerilog.cpp.
References createExportVerilogPass(), and lec::outs().
std::unique_ptr< mlir::Pass > circt::createExportVerilogPass | ( | llvm::raw_ostream & | os | ) |
Definition at line 5954 of file ExportVerilog.cpp.
Referenced by createExportVerilogPass().
std::unique_ptr< mlir::Pass > circt::createFlattenMemRefCallsPass | ( | ) |
Definition at line 377 of file FlattenMemRefs.cpp.
std::unique_ptr< mlir::Pass > circt::createFlattenMemRefPass | ( | ) |
Definition at line 373 of file FlattenMemRefs.cpp.
std::unique_ptr<mlir::OperationPass<mlir::ModuleOp> > circt::createHandshakeAnalysisPass | ( | ) |
std::unique_ptr<mlir::OperationPass<handshake::FuncOp> > circt::createHandshakeCanonicalizePass | ( | ) |
std::unique_ptr< mlir::OperationPass< handshake::FuncOp > > circt::createHandshakeRemoveBlockPass | ( | ) |
Definition at line 1759 of file StandardToHandshake.cpp.
std::unique_ptr< mlir::Pass > circt::createHandshakeToDCPass | ( | ) |
Definition at line 603 of file HandshakeToDC.cpp.
std::unique_ptr< mlir::Pass > circt::createHandshakeToHWPass | ( | ) |
Definition at line 1969 of file HandshakeToHW.cpp.
std::unique_ptr< Pass > circt::createHWArithToHWPass | ( | ) |
Definition at line 446 of file HWArithToHW.cpp.
std::unique_ptr< mlir::Pass > circt::createInsertMergeBlocksPass | ( | ) |
Definition at line 368 of file InsertMergeBlocks.cpp.
std::unique_ptr< mlir::Pass > circt::createLegalizeAnonEnumsPass | ( | ) |
Definition at line 189 of file LegalizeAnonEnums.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createLoopScheduleToCalyxPass | ( | ) |
Create a LoopSchedule to Calyx conversion pass.
Definition at line 1643 of file LoopScheduleToCalyx.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createLowerArcToLLVMPass | ( | ) |
Definition at line 502 of file LowerArcToLLVM.cpp.
std::unique_ptr< mlir::Pass > circt::createLowerFIRRTLToHWPass | ( | bool | enableAnnotationWarning = false , |
bool | emitChiselAssertsAsSVA = false , |
||
bool | addMuxPragmas = false , |
||
bool | disableMemRandomization = false , |
||
bool | disableRegRandomization = false |
||
) |
This is the pass constructor.
Definition at line 452 of file LowerToHW.cpp.
Referenced by circt::firtool::populateLowFIRRTLToHW().
std::unique_ptr< mlir::Pass > circt::createMaterializeCalyxToFSMPass | ( | ) |
Definition at line 242 of file MaterializeFSM.cpp.
std::unique_ptr< mlir::Pass > circt::createMaximizeSSAPass | ( | ) |
Definition at line 243 of file MaximizeSSA.cpp.
std::unique_ptr< mlir::Pass > circt::createPipelineToHWPass | ( | ) |
Create an SCF to Calyx conversion pass.
Definition at line 97 of file PipelineToHW.cpp.
std::unique_ptr< mlir::Pass > circt::createPrepareForEmissionPass | ( | ) |
Definition at line 1170 of file PrepareForEmission.cpp.
std::unique_ptr< mlir::Pass > circt::createRemoveGroupsFromFSMPass | ( | ) |
Definition at line 306 of file RemoveGroupsFromFSM.cpp.
std::unique_ptr< OperationPass< ModuleOp > > circt::createSCFToCalyxPass | ( | ) |
Create an SCF to Calyx conversion pass.
Definition at line 1431 of file SCFToCalyx.cpp.
std::unique_ptr< Pass > circt::createSimpleCanonicalizerPass | ( | ) |
Create a simple canonicalizer pass.
Definition at line 15 of file Passes.cpp.
std::unique_ptr< mlir::OperationPass< mlir::ModuleOp > > circt::createStandardToHandshakePass | ( | bool | sourceConstants = false , |
bool | disableTaskPipelining = false |
||
) |
Definition at line 1752 of file StandardToHandshake.cpp.
std::unique_ptr< Pass > circt::createStripDebugInfoWithPredPass | ( | const std::function< bool(mlir::Location)> & | pred | ) |
Creates a pass to strip debug information from a function.
Definition at line 103 of file StripDebugInfoWithPred.cpp.
std::unique_ptr< mlir::Pass > circt::createTestApplyLoweringOptionPass | ( | ) |
Definition at line 41 of file ApplyLoweringOptions.cpp.
std::unique_ptr<mlir::Pass> circt::createTestApplyLoweringOptionPass | ( | llvm::StringRef | options | ) |
void circt::elideImplicitSSAName | ( | OpAsmPrinter & | printer, |
Operation * | op, | ||
DictionaryAttr | attrs, | ||
SmallVectorImpl< StringRef > & | elides | ||
) |
Check if the name
attribute in attrs
matches the SSA name of the operation's first result.
If it does, add name
to elides
. This is helpful during printing of attribute dictionaries in order to determine if the inclusion of the name
field would be redundant.
Definition at line 78 of file CustomDirectiveImpl.cpp.
References isdigit.
Referenced by printFIRRTLImplicitSSAName(), and printImplicitSSAName().
mlir::LogicalResult circt::exportSplitVerilog | ( | mlir::ModuleOp | module, |
llvm::StringRef | dirname | ||
) |
Export a module containing HW, and SV dialect code, as one file per SV module.
Requires that the SV dialect is loaded in to the context.
Files are created in the directory indicated by dirname
.
Referenced by mlirExportSplitVerilog().
mlir::LogicalResult circt::exportVerilog | ( | mlir::ModuleOp | module, |
llvm::raw_ostream & | os | ||
) |
Export a module containing HW, and SV dialect code.
Requires that the SV dialect is loaded in to the context.
Referenced by mlirExportVerilog().
APSInt circt::extOrTruncZeroWidth | ( | APSInt | value, |
unsigned | width | ||
) |
A safe version of APSInt::extOrTrunc that will NOT assert on zero-width signed APSInts.
Instead of asserting, this will zero extend.
Definition at line 22 of file APInt.cpp.
Referenced by getExtendedConstant().
const char* circt::getCirctVersion | ( | ) |
const char* circt::getCirctVersionComment | ( | ) |
Referenced by circt::ExportVerilog::SharedEmitterState::collectOpsForFile(), and exportChiselInterface().
inline ::llvm::hash_code circt::hash_value | ( | const FieldRef & | fieldRef | ) |
Get a hash code for a FieldRef.
Definition at line 92 of file FieldRef.h.
References circt::FieldRef::getFieldID(), and circt::FieldRef::getValue().
Referenced by llvm::DenseMapInfo< circt::FieldRef >::getHashValue(), and llvm::DenseMapInfo< ResetSignal >::getHashValue().
bool circt::inferImplicitSSAName | ( | OpAsmParser & | parser, |
NamedAttrList & | attrs | ||
) |
Ensure that attrs
contains a name
attribute by inferring its value from the SSA name of the operation's first result if necessary.
Returns true if a name was inferred, false if attrs
already contained a name
.
Definition at line 40 of file CustomDirectiveImpl.cpp.
References circt::calyx::direction::get(), and isdigit.
Referenced by parseFIRRTLImplicitSSAName(), and parseImplicitSSAName().
mlir::LogicalResult circt::insertMergeBlocks | ( | mlir::Region & | r, |
mlir::ConversionPatternRewriter & | rewriter | ||
) |
Insert additional blocks that serve as counterparts to the blocks that diverged the control flow.
The resulting merge block tree is guaranteed to be a binary tree.
This transformation does treat loops like a single block and thus does not affect them.
bool circt::isRegionSSAMaximized | ( | Region & | region | ) |
Definition at line 58 of file MaximizeSSA.cpp.
References getDefiningBlock().
bool circt::isUniDimensional | ( | mlir::MemRefType | memref | ) |
Referenced by hasMultiDimMemRef().
LogicalResult circt::maximizeSSA | ( | Block * | block, |
SSAMaximizationStrategy & | strategy, | ||
PatternRewriter & | rewriter | ||
) |
Considers all values defined by a block (i.e., block arguments and operation results within the block) for SSA maximization, following a provided strategy.
This removes any implicit dataflow of the selected values within the enclosing function. The function adds new block arguments wherever necessary to carry the values explicitly between blocks. Succeeds when it was possible to convert the selected values defined by the block into maximal SSA form.
Definition at line 167 of file MaximizeSSA.cpp.
References circt::SSAMaximizationStrategy::maximizeArgument(), circt::SSAMaximizationStrategy::maximizeOp(), and maximizeSSA().
LogicalResult circt::maximizeSSA | ( | Operation * | op, |
SSAMaximizationStrategy & | strategy, | ||
PatternRewriter & | rewriter | ||
) |
Considers all of an operation's results for SSA maximization, following a provided strategy.
This removes any implicit dataflow of the selected operation's results within the enclosing function. The function adds new block arguments wherever necessary to carry the results explicitly between blocks. Succeeds when it was possible to convert the selected operation's results into maximal SSA form.
Definition at line 155 of file MaximizeSSA.cpp.
References circt::SSAMaximizationStrategy::maximizeResult(), and maximizeSSA().
LogicalResult circt::maximizeSSA | ( | Region & | region, |
SSAMaximizationStrategy & | strategy, | ||
PatternRewriter & | rewriter | ||
) |
Considers all blocks within a region for SSA maximization, following a provided strategy.
This removes any implicit dataflow of the values defined by selected blocks within the region. The function adds new block arguments wherever necessary to carry the region's values explicitly between blocks. Succeeds when it was possible to convert all of the values defined by selected blocks into maximal SSA form.
Definition at line 185 of file MaximizeSSA.cpp.
References circt::SSAMaximizationStrategy::maximizeBlock(), and maximizeSSA().
LogicalResult circt::maximizeSSA | ( | Value | value, |
PatternRewriter & | rewriter | ||
) |
Converts a single value within a function into maximal SSA form.
This removes any implicit dataflow of this specific value within the enclosing function. The function adds new block arguments wherever necessary to carry the value explicitly between blocks. Succeeds when it was possible to convert the value into maximal SSA form.
Definition at line 82 of file MaximizeSSA.cpp.
References addArgToTerminator(), and getDefiningBlock().
Referenced by maximizeSSA(), maximizeSSANoMem(), and circt::handshake::HandshakeLowering::setControlOnlyPath().
ParseResult circt::parseImplicitSSAName | ( | OpAsmParser & | parser, |
NamedAttrList & | attrs | ||
) |
Parse an attribute dictionary and ensure that it contains a name
field by inferring its value from the SSA name of the operation's first result if necessary.
Definition at line 32 of file CustomDirectiveImpl.cpp.
References inferImplicitSSAName().
ParseResult circt::parseImplicitSSAName | ( | OpAsmParser & | parser, |
StringAttr & | attr | ||
) |
Parse an implicit SSA name string attribute.
If the name is not provided in the input text, its value is inferred from the SSA name of the operation's first result.
implicit-name ::= (name
str-attr)?
Definition at line 14 of file CustomDirectiveImpl.cpp.
References isdigit.
ParseResult circt::parseInputPortList | ( | OpAsmParser & | parser, |
SmallVectorImpl< OpAsmParser::UnresolvedOperand > & | inputs, | ||
SmallVectorImpl< Type > & | inputTypes, | ||
ArrayAttr & | inputNames | ||
) |
Parse a list of instance input ports.
input-list ::= (
( input-element (,
input-element )* )? )
input-element ::= identifier :
value :
type
Definition at line 15 of file CustomDirectiveImpl.cpp.
References circt::calyx::direction::get(), and inputs.
ParseResult circt::parseOptionalParameterList | ( | OpAsmParser & | parser, |
ArrayAttr & | parameters | ||
) |
Parse an parameter list if present.
module-parameter-list ::= <
parameter-decl (,
parameter-decl)* >
parameter-decl ::= identifier :
type parameter-decl ::= identifier :
type =
attribute
Definition at line 93 of file CustomDirectiveImpl.cpp.
References builder, and circt::calyx::direction::get().
Referenced by parseHWModuleOp().
ParseResult circt::parseOutputPortList | ( | OpAsmParser & | parser, |
SmallVectorImpl< Type > & | resultTypes, | ||
ArrayAttr & | resultNames | ||
) |
Parse a list of instance output ports.
output-list ::= (
( output-element (,
output-element )* )? )
output-element ::= identifier :
type
Definition at line 56 of file CustomDirectiveImpl.cpp.
References circt::calyx::direction::get().
void circt::populateCombToArithConversionPatterns | ( | TypeConverter & | converter, |
RewritePatternSet & | patterns | ||
) |
void circt::populateCombToLLVMConversionPatterns | ( | mlir::LLVMTypeConverter & | converter, |
RewritePatternSet & | patterns | ||
) |
Get the Comb to LLVM conversion patterns.
void circt::populateGenericReducePatterns | ( | MLIRContext * | context, |
ReducePatternSet & | patterns | ||
) |
Populate reduction patterns that are not specific to certain operations or dialects.
Definition at line 57 of file GenericReductions.cpp.
References createSimpleCanonicalizerPass().
void circt::populateHWArithToHWConversionPatterns | ( | HWArithToHWTypeConverter & | typeConverter, |
RewritePatternSet & | patterns | ||
) |
Get the HWArith to HW conversion patterns.
Definition at line 403 of file HWArithToHW.cpp.
void circt::populateHWToLLVMConversionPatterns | ( | mlir::LLVMTypeConverter & | converter, |
RewritePatternSet & | patterns, | ||
Namespace & | globals, | ||
DenseMap< std::pair< Type, ArrayAttr >, mlir::LLVM::GlobalOp > & | constAggregateGlobalsMap | ||
) |
Get the HW to LLVM conversion patterns.
void circt::populateHWToLLVMTypeConversions | ( | mlir::LLVMTypeConverter & | converter | ) |
Get the HW to LLVM type conversions.
void circt::populateLLHDToLLVMConversionPatterns | ( | mlir::LLVMTypeConverter & | converter, |
RewritePatternSet & | patterns, | ||
size_t & | sigCounter, | ||
size_t & | regCounter | ||
) |
Get the LLHD to LLVM conversion patterns.
void circt::populateLLHDToLLVMTypeConversions | ( | mlir::LLVMTypeConverter & | converter | ) |
Get the LLHD to LLVM type conversions.
void circt::printImplicitSSAName | ( | OpAsmPrinter & | p, |
Operation * | op, | ||
DictionaryAttr | attrs, | ||
ArrayRef< StringRef > | extraElides = {} |
||
) |
Print an attribute dictionary and elide the name
field if its value matches the SSA name of the operation's first result.
Definition at line 70 of file CustomDirectiveImpl.cpp.
References elideImplicitSSAName().
void circt::printImplicitSSAName | ( | OpAsmPrinter & | p, |
Operation * | op, | ||
StringAttr | attr | ||
) |
Print an implicit SSA name string attribute.
If the given string attribute does not match the SSA name of the operation's first result, the name is explicitly printed. Prints a leading space in front of name
if any name is present.
implicit-name ::= (name
str-attr)?
Definition at line 55 of file CustomDirectiveImpl.cpp.
References isdigit.
void circt::printInputPortList | ( | OpAsmPrinter & | p, |
Operation * | op, | ||
OperandRange | inputs, | ||
TypeRange | inputTypes, | ||
ArrayAttr | inputNames | ||
) |
Print a list of instance input ports.
Definition at line 42 of file CustomDirectiveImpl.cpp.
References inputs.
void circt::printOptionalParameterList | ( | OpAsmPrinter & | p, |
Operation * | op, | ||
ArrayAttr | parameters | ||
) |
Print a parameter list for a module or instance.
Definition at line 126 of file CustomDirectiveImpl.cpp.
Referenced by printModuleOp().
void circt::printOutputPortList | ( | OpAsmPrinter & | p, |
Operation * | op, | ||
TypeRange | resultTypes, | ||
ArrayAttr | resultNames | ||
) |
Print a list of instance output ports.
Definition at line 80 of file CustomDirectiveImpl.cpp.
|
inline |
Definition at line 46 of file InitAllDialects.h.
|
inline |
Definition at line 38 of file InitAllPasses.h.
References circt::llhd::initLLHDTransformationPasses(), circt::esi::registerESIPasses(), and registerPasses().
|
inline |
Definition at line 29 of file InitAllTranslations.h.
References circt::esi::registerESITranslations(), circt::ExportSystemC::registerExportSystemCTranslation(), circt::firrtl::registerFromFIRFileTranslation(), circt::calyx::registerToCalyxTranslation(), and circt::firrtl::registerToFIRFileTranslation().
APInt circt::sextZeroWidth | ( | APInt | value, |
unsigned | width | ||
) |