CIRCT 24.0.0git
Loading...
Searching...
No Matches
DatapathFolds.cpp File Reference
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/Datapath/DatapathDialect.h"
#include "circt/Dialect/Datapath/DatapathOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/KnownBits.h"
#include <algorithm>
Include dependency graph for DatapathFolds.cpp:

Go to the source code of this file.

Classes

struct  FoldCompressIntoCompress
struct  FoldAddIntoCompress
struct  SextCompress
struct  ConstantFoldCompress
struct  ReduceNumPartialProducts
struct  SignedPartialProducts
struct  PosPartialProducts
struct  ReduceNumPosPartialProducts
struct  SignedPosPartialProducts

Functions

static FailureOr< size_t > calculateNonZeroBits (Value operand, size_t numResults)
static Value zeroPad (PatternRewriter &rewriter, Location loc, Value input, size_t targetWidth, size_t trailingZeros)
static bool areAllCompressorResultsSummed (ValueRange compressResults, ValueRange operands)

Function Documentation

◆ areAllCompressorResultsSummed()

bool areAllCompressorResultsSummed ( ValueRange compressResults,
ValueRange operands )
static

◆ calculateNonZeroBits()

FailureOr< size_t > calculateNonZeroBits ( Value operand,
size_t numResults )
static

◆ zeroPad()

Value zeroPad ( PatternRewriter & rewriter,
Location loc,
Value input,
size_t targetWidth,
size_t trailingZeros )
static