#include "circt/Conversion/CombToAIG.h"
#include "circt/Dialect/AIG/AIGOps.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/PointerUnion.h"
#include "circt/Conversion/Passes.h.inc"
Go to the source code of this file.
|
namespace | circt |
| The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
|
|
|
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 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 void | populateCombToAIGConversionPatterns (RewritePatternSet &patterns, uint32_t maxEmulationUnknownBits) |
|
◆ GEN_PASS_DEF_CONVERTCOMBTOAIG
#define GEN_PASS_DEF_CONVERTCOMBTOAIG |
◆ createShiftLogic()
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 |
◆ emulateBinaryOpForUnknownBits()
static LogicalResult emulateBinaryOpForUnknownBits |
( |
ConversionPatternRewriter & |
rewriter, |
|
|
int64_t |
maxEmulationUnknownBits, |
|
|
Operation * |
op, |
|
|
llvm::function_ref< APInt(const APInt &, const APInt &)> |
emulate |
|
) |
| |
|
static |
◆ extractBits()
static SmallVector< Value > extractBits |
( |
OpBuilder & |
builder, |
|
|
Value |
val |
|
) |
| |
|
static |
◆ getNumUnknownBitsAndPopulateValues()
static int64_t getNumUnknownBitsAndPopulateValues |
( |
Value |
value, |
|
|
llvm::SmallVectorImpl< ConstantOrValue > & |
values |
|
) |
| |
|
static |
◆ populateCombToAIGConversionPatterns()
static void populateCombToAIGConversionPatterns |
( |
RewritePatternSet & |
patterns, |
|
|
uint32_t |
maxEmulationUnknownBits |
|
) |
| |
|
static |
◆ substitueMaskToValues()
static APInt substitueMaskToValues |
( |
size_t |
width, |
|
|
llvm::SmallVectorImpl< ConstantOrValue > & |
constantOrValues, |
|
|
uint32_t |
mask |
|
) |
| |
|
static |