|
CIRCT 22.0.0git
|
Manages a collection of rewriting patterns for combinational logic optimization. More...
#include <CutRewriter.h>

Public Member Functions | |
| CutRewritePatternSet (llvm::SmallVector< std::unique_ptr< CutRewritePattern >, 4 > patterns) | |
| Constructor that takes ownership of the provided patterns. | |
Private Attributes | |
| llvm::SmallVector< std::unique_ptr< CutRewritePattern >, 4 > | patterns |
| Owned collection of all rewriting patterns. | |
| DenseMap< std::pair< APInt, unsigned >, SmallVector< std::pair< NPNClass, const CutRewritePattern * > > > | npnToPatternMap |
| Fast lookup table mapping NPN canonical forms to matching patterns. | |
| SmallVector< const CutRewritePattern *, 4 > | nonNPNPatterns |
| Patterns that use custom matching logic instead of NPN lookup. | |
Friends | |
| class | CutRewriter |
| CutRewriter needs access to internal data structures for pattern matching. | |
Manages a collection of rewriting patterns for combinational logic optimization.
This class organizes and provides efficient access to rewriting patterns used during cut-based optimization. It maintains:
The pattern set is used by the CutRewriter to find suitable replacements for cuts in the combinational logic network.
Definition at line 454 of file CutRewriter.h.
| CutRewritePatternSet::CutRewritePatternSet | ( | llvm::SmallVector< std::unique_ptr< CutRewritePattern >, 4 > | patterns | ) |
Constructor that takes ownership of the provided patterns.
During construction, patterns are analyzed and organized for efficient lookup. Truth table matchers are indexed by their NPN canonical forms.
Definition at line 625 of file CutRewriter.cpp.
References nonNPNPatterns, npnToPatternMap, pattern, and patterns.
|
friend |
CutRewriter needs access to internal data structures for pattern matching.
Definition at line 479 of file CutRewriter.h.
|
private |
Patterns that use custom matching logic instead of NPN lookup.
These patterns are checked against every cut.
Definition at line 476 of file CutRewriter.h.
Referenced by CutRewritePatternSet().
|
private |
Fast lookup table mapping NPN canonical forms to matching patterns.
Each entry maps a truth table and input size to patterns that can handle it.
Definition at line 472 of file CutRewriter.h.
Referenced by CutRewritePatternSet().
|
private |
Owned collection of all rewriting patterns.
Definition at line 465 of file CutRewriter.h.
Referenced by CutRewritePatternSet().