|
CIRCT 23.0.0git
|
#include "circt/Conversion/CombToSynth.h"#include "circt/Dialect/Comb/CombOps.h"#include "circt/Dialect/Datapath/DatapathOps.h"#include "circt/Dialect/HW/HWOps.h"#include "circt/Dialect/Synth/SynthDialect.h"#include "circt/Dialect/Synth/SynthOps.h"#include "circt/Support/Naming.h"#include "mlir/Pass/Pass.h"#include "mlir/Transforms/DialectConversion.h"#include "llvm/ADT/APInt.h"#include "llvm/ADT/PointerUnion.h"#include "llvm/Support/Debug.h"#include "llvm/Support/DivisionByConstantInfo.h"#include <array>#include "circt/Conversion/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
| namespace | circt |
| The InstanceGraph op interface, see InstanceGraphInterface.td for more details. | |
Macros | |
| #define | DEBUG_TYPE "comb-to-synth" |
| #define | GEN_PASS_DEF_CONVERTCOMBTOSYNTH |
Functions | |
| static SmallVector< Value > | extractBits (OpBuilder &builder, Value val) |
| template<bool isLeftShift> | |
| static Value | createShiftLogic (ConversionPatternRewriter &rewriter, Location loc, Value shiftAmount, int64_t maxShiftAmount, llvm::function_ref< Value(int64_t)> getPadding, llvm::function_ref< Value(int64_t)> getExtract) |
| static Value | createMajorityFunction (OpBuilder &rewriter, Location loc, Value a, Value b, Value carry) |
| static Value | extractMSB (OpBuilder &builder, Value val) |
| static Value | extractOtherThanMSB (OpBuilder &builder, Value val) |
| static int64_t | getNumUnknownBitsAndPopulateValues (Value value, llvm::SmallVectorImpl< ConstantOrValue > &values) |
| static APInt | substitueMaskToValues (size_t width, llvm::SmallVectorImpl< ConstantOrValue > &constantOrValues, uint32_t mask) |
| static LogicalResult | emulateBinaryOpForUnknownBits (ConversionPatternRewriter &rewriter, int64_t maxEmulationUnknownBits, Operation *op, llvm::function_ref< APInt(const APInt &, const APInt &)> emulate) |
| static Value | createLShrByConstant (OpBuilder &builder, Location loc, Value value, unsigned amount) |
| static Value | createAShrByConstant (OpBuilder &builder, Location loc, Value value, unsigned amount) |
| template<bool isSigned> | |
| static Value | createMulHigh (OpBuilder &builder, Location loc, Value lhs, const APInt &rhs) |
| static Value | lowerUnsignedDivByConstant (OpBuilder &builder, Location loc, Value lhs, const APInt &divisor) |
| static Value | lowerSignedDivByConstant (OpBuilder &builder, Location loc, Value lhs, const APInt &divisor) |
| static void | populateCombToAIGConversionPatterns (RewritePatternSet &patterns, uint32_t maxEmulationUnknownBits, bool forceAIG) |
| #define DEBUG_TYPE "comb-to-synth" |
Definition at line 39 of file CombToSynth.cpp.
| #define GEN_PASS_DEF_CONVERTCOMBTOSYNTH |
Definition at line 42 of file CombToSynth.cpp.
|
static |
Definition at line 284 of file CombToSynth.cpp.
References hw.ConstantOp::create().
Referenced by lowerSignedDivByConstant().
|
static |
Definition at line 273 of file CombToSynth.cpp.
References hw.ConstantOp::create().
Referenced by lowerUnsignedDivByConstant().
|
static |
Definition at line 116 of file CombToSynth.cpp.
|
static |
Definition at line 296 of file CombToSynth.cpp.
References hw.ConstantOp::create().
|
static |
Definition at line 68 of file CombToSynth.cpp.
References assert(), hw.ConstantOp::create(), and extractBits().
|
static |
Definition at line 203 of file CombToSynth.cpp.
References assert(), hw.ConstantOp::create(), extractBits(), getConstant(), getNumUnknownBitsAndPopulateValues(), circt::replaceOpAndCopyNamehint(), and substitueMaskToValues().
|
static |
Definition at line 54 of file CombToSynth.cpp.
Referenced by createShiftLogic(), and emulateBinaryOpForUnknownBits().
|
static |
Definition at line 126 of file CombToSynth.cpp.
|
static |
Definition at line 131 of file CombToSynth.cpp.
|
static |
Definition at line 142 of file CombToSynth.cpp.
References getNumUnknownBitsAndPopulateValues().
Referenced by emulateBinaryOpForUnknownBits(), and getNumUnknownBitsAndPopulateValues().
|
static |
Definition at line 324 of file CombToSynth.cpp.
References createAShrByConstant().
|
static |
Definition at line 311 of file CombToSynth.cpp.
References createLShrByConstant().
|
static |
Definition at line 1539 of file CombToSynth.cpp.
|
static |
Definition at line 175 of file CombToSynth.cpp.
References assert().
Referenced by emulateBinaryOpForUnknownBits().