#include "circt/Dialect/Comb/CombDialect.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWDialect.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/Synth/Analysis/LongestPathAnalysis.h"
#include "circt/Dialect/Synth/SynthOps.h"
#include "circt/Dialect/Synth/Transforms/SynthPasses.h"
#include "mlir/Analysis/TopologicalSortUtils.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/LogicalResult.h"
#include "llvm/Support/raw_ostream.h"
#include <iterator>
#include <vector>
#include "circt/Dialect/Synth/Transforms/SynthPasses.h.inc"
Go to the source code of this file.
|
| using | OperandKey = llvm::SmallVector<std::pair<mlir::Value, bool>> |
|
| static LogicalResult | replaceWithBalancedTree (IncrementalLongestPathAnalysis *analysis, mlir::IRRewriter &rewriter, Operation *op, llvm::function_ref< bool(OpOperand &)> isInverted, llvm::function_ref< Value(ValueWithArrivalTime, ValueWithArrivalTime)> createBinaryOp) |
| | Construct a balanced binary tree from a variadic operation using a delay-aware algorithm.
|
| static OperandKey | getSortedOperandKey (aig::AndInverterOp op) |
| static void | simplifyWithExistingOperations (aig::AndInverterOp op, mlir::IRRewriter &rewriter, llvm::DenseMap< OperandKey, mlir::Value > &seenExpressions) |
◆ DEBUG_TYPE
| #define DEBUG_TYPE "synth-lower-variadic" |
◆ GEN_PASS_DEF_LOWERVARIADIC
| #define GEN_PASS_DEF_LOWERVARIADIC |
◆ OperandKey
| using OperandKey = llvm::SmallVector<std::pair<mlir::Value, bool>> |
◆ getSortedOperandKey()
| OperandKey getSortedOperandKey |
( |
aig::AndInverterOp | op | ) |
|
|
static |
◆ replaceWithBalancedTree()
| LogicalResult replaceWithBalancedTree |
( |
IncrementalLongestPathAnalysis * | analysis, |
|
|
mlir::IRRewriter & | rewriter, |
|
|
Operation * | op, |
|
|
llvm::function_ref< bool(OpOperand &)> | isInverted, |
|
|
llvm::function_ref< Value(ValueWithArrivalTime, ValueWithArrivalTime)> | createBinaryOp ) |
|
static |
Construct a balanced binary tree from a variadic operation using a delay-aware algorithm.
This function builds the tree by repeatedly combining the two values with the earliest arrival times, which minimizes the critical path delay.
Definition at line 64 of file LowerVariadic.cpp.
References failure(), and success().
◆ simplifyWithExistingOperations()
| void simplifyWithExistingOperations |
( |
aig::AndInverterOp | op, |
|
|
mlir::IRRewriter & | rewriter, |
|
|
llvm::DenseMap< OperandKey, mlir::Value > & | seenExpressions ) |
|
static |