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 > | nonTruthTablePatterns |
Patterns that use custom matching logic instead of truth tables. | |
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 401 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 628 of file CutRewriter.cpp.
References nonTruthTablePatterns, npnToPatternMap, pattern, and patterns.
|
friend |
CutRewriter needs access to internal data structures for pattern matching.
Definition at line 426 of file CutRewriter.h.
|
private |
Patterns that use custom matching logic instead of truth tables.
These patterns are checked against every cut.
Definition at line 423 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 419 of file CutRewriter.h.
Referenced by CutRewritePatternSet().
|
private |
Owned collection of all rewriting patterns.
Definition at line 412 of file CutRewriter.h.
Referenced by CutRewritePatternSet().