CIRCT 24.0.0git
Loading...
Searching...
No Matches
LLHDOps.cpp File Reference
#include "circt/Dialect/LLHD/LLHDOps.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Support/CustomDirectiveImpl.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinDialect.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Region.h"
#include "mlir/IR/Types.h"
#include "mlir/IR/Value.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "circt/Dialect/LLHD/LLHD.cpp.inc"
#include "circt/Dialect/LLHD/LLHDEnums.cpp.inc"
#include "circt/Dialect/LLHD/LLHDInterfaces.cpp.inc"
Include dependency graph for LLHDOps.cpp:

Go to the source code of this file.

Macros

#define GET_OP_CLASSES

Functions

template<typename... OpTypes>
static bool hasUserOfKind (Operation *op)
static Value getValueAtIndex (OpBuilder &builder, Location loc, Value val, unsigned index, Type resultType)
static std::optional< DenseMap< Attribute, Type > > getIntegerSubelementIndexMap (Type type, Value value)
static std::optional< DenseMap< Attribute, Type > > getSubelementIndexMap (Type type, Value value)
template<class Op>
static OpFoldResult foldSigPtrExtractOp (Op op, ArrayRef< Attribute > operands)
static int64_t intervalOverlap (int64_t a1, int64_t a2, int64_t b1, int64_t b2)
static void getSortedPtrs (DenseMap< Attribute, MemorySlot > &subslots, SmallVectorImpl< std::pair< unsigned, Value > > &sorted)
static void getSortedPtrs (const DenseMap< Attribute, Type > &subslots, SmallVectorImpl< std::pair< unsigned, Type > > &sorted)
template<class Op>
static LogicalResult canonicalizeSigPtrArraySliceOp (Op op, PatternRewriter &rewriter)
static LogicalResult verifyYieldResults (Operation *op, ValueRange yieldOperands)

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1150 of file LLHDOps.cpp.

Function Documentation

◆ canonicalizeSigPtrArraySliceOp()

template<class Op>
LogicalResult canonicalizeSigPtrArraySliceOp ( Op op,
PatternRewriter & rewriter )
static

Definition at line 410 of file LLHDOps.cpp.

References hw.ConstantOp::create(), failure(), and success().

◆ foldSigPtrExtractOp()

template<class Op>
OpFoldResult foldSigPtrExtractOp ( Op op,
ArrayRef< Attribute > operands )
static

Definition at line 241 of file LLHDOps.cpp.

◆ getIntegerSubelementIndexMap()

std::optional< DenseMap< Attribute, Type > > getIntegerSubelementIndexMap ( Type type,
Value value )
static

Definition at line 109 of file LLHDOps.cpp.

Referenced by getSubelementIndexMap().

◆ getSortedPtrs() [1/2]

void getSortedPtrs ( const DenseMap< Attribute, Type > & subslots,
SmallVectorImpl< std::pair< unsigned, Type > > & sorted )
static

Definition at line 273 of file LLHDOps.cpp.

References assert().

◆ getSortedPtrs() [2/2]

void getSortedPtrs ( DenseMap< Attribute, MemorySlot > & subslots,
SmallVectorImpl< std::pair< unsigned, Value > > & sorted )
static

Definition at line 263 of file LLHDOps.cpp.

References assert().

◆ getSubelementIndexMap()

std::optional< DenseMap< Attribute, Type > > getSubelementIndexMap ( Type type,
Value value )
static

Definition at line 156 of file LLHDOps.cpp.

References getIntegerSubelementIndexMap().

◆ getValueAtIndex()

Value getValueAtIndex ( OpBuilder & builder,
Location loc,
Value val,
unsigned index,
Type resultType )
static

◆ hasUserOfKind()

template<typename... OpTypes>
bool hasUserOfKind ( Operation * op)
static

Definition at line 49 of file LLHDOps.cpp.

◆ intervalOverlap()

int64_t intervalOverlap ( int64_t a1,
int64_t a2,
int64_t b1,
int64_t b2 )
static

Definition at line 259 of file LLHDOps.cpp.

◆ verifyYieldResults()

LogicalResult verifyYieldResults ( Operation * op,
ValueRange yieldOperands )
static

Definition at line 950 of file LLHDOps.cpp.

References success().