CIRCT  19.0.0git
Macros | Functions
LLHDOps.cpp File Reference
#include "circt/Dialect/LLHD/IR/LLHDOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/LLHD/IR/LLHDDialect.h"
#include "mlir/Dialect/CommonFolders.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Region.h"
#include "mlir/IR/Types.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/ADT/TypeSwitch.h"
#include "circt/Dialect/LLHD/IR/LLHDEnums.cpp.inc"
#include "circt/Dialect/LLHD/IR/LLHD.cpp.inc"
Include dependency graph for LLHDOps.cpp:

Go to the source code of this file.

Macros

#define GET_OP_CLASSES
 

Functions

template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<ElementValueT(ElementValueT)>>
static Attribute constFoldUnaryOp (ArrayRef< Attribute > operands, const CalculationT &calculate)
 
template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref< ElementValueT(ElementValueT, ElementValueT, ElementValueT)>>
static Attribute constFoldTernaryOp (ArrayRef< Attribute > operands, const CalculationT &calculate)
 
template<class Op >
static OpFoldResult foldSigPtrExtractOp (Op op, ArrayRef< Attribute > operands)
 
template<class Op >
static OpFoldResult foldSigPtrArraySliceOp (Op op, ArrayRef< Attribute > operands)
 
template<class Op >
static LogicalResult canonicalizeSigPtrArraySliceOp (Op op, PatternRewriter &rewriter)
 
template<class SigPtrType >
static LogicalResult inferReturnTypesOfStructExtractOp (MLIRContext *context, std::optional< Location > loc, ValueRange operands, DictionaryAttr attrs, mlir::OpaqueProperties properties, mlir::RegionRange regions, SmallVectorImpl< Type > &results)
 
static ParseResult parseArgumentList (OpAsmParser &parser, SmallVectorImpl< OpAsmParser::Argument > &args, SmallVectorImpl< Type > &argTypes)
 Parse an argument list of an entity operation. More...
 
static ParseResult parseEntitySignature (OpAsmParser &parser, OperationState &result, SmallVectorImpl< OpAsmParser::Argument > &args, SmallVectorImpl< Type > &argTypes)
 parse an entity signature with syntax: (arg0 : T0, arg1 : T1, <...>) -> (out0 : T0, out1 : T1, <...>) More...
 
static void printArgumentList (OpAsmPrinter &printer, std::vector< BlockArgument > args)
 
static ParseResult parseProcArgumentList (OpAsmParser &parser, SmallVectorImpl< Type > &argTypes, SmallVectorImpl< OpAsmParser::Argument > &argNames)
 
static void printProcArguments (OpAsmPrinter &p, Operation *op, ArrayRef< Type > types, uint64_t numIns)
 Print the signature of the proc unit. More...
 

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1014 of file LLHDOps.cpp.

Function Documentation

◆ canonicalizeSigPtrArraySliceOp()

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

Definition at line 228 of file LLHDOps.cpp.

◆ constFoldTernaryOp()

template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref< ElementValueT(ElementValueT, ElementValueT, ElementValueT)>>
static Attribute constFoldTernaryOp ( ArrayRef< Attribute >  operands,
const CalculationT &  calculate 
)
static

Definition at line 69 of file LLHDOps.cpp.

References assert(), and circt::calyx::direction::get().

◆ constFoldUnaryOp()

template<class AttrElementT , class ElementValueT = typename AttrElementT::ValueType, class CalculationT = function_ref<ElementValueT(ElementValueT)>>
static Attribute constFoldUnaryOp ( ArrayRef< Attribute >  operands,
const CalculationT &  calculate 
)
static

Definition at line 38 of file LLHDOps.cpp.

References assert(), and circt::calyx::direction::get().

◆ foldSigPtrArraySliceOp()

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

Definition at line 206 of file LLHDOps.cpp.

◆ foldSigPtrExtractOp()

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

Definition at line 180 of file LLHDOps.cpp.

◆ inferReturnTypesOfStructExtractOp()

template<class SigPtrType >
static LogicalResult inferReturnTypesOfStructExtractOp ( MLIRContext *  context,
std::optional< Location >  loc,
ValueRange  operands,
DictionaryAttr  attrs,
mlir::OpaqueProperties  properties,
mlir::RegionRange  regions,
SmallVectorImpl< Type > &  results 
)
static

Definition at line 266 of file LLHDOps.cpp.

References circt::calyx::direction::get().

◆ parseArgumentList()

static ParseResult parseArgumentList ( OpAsmParser &  parser,
SmallVectorImpl< OpAsmParser::Argument > &  args,
SmallVectorImpl< Type > &  argTypes 
)
static

Parse an argument list of an entity operation.

The argument list and argument types are returned in args and argTypes respectively.

Definition at line 353 of file LLHDOps.cpp.

Referenced by parseEntitySignature().

◆ parseEntitySignature()

static ParseResult parseEntitySignature ( OpAsmParser &  parser,
OperationState &  result,
SmallVectorImpl< OpAsmParser::Argument > &  args,
SmallVectorImpl< Type > &  argTypes 
)
static

parse an entity signature with syntax: (arg0 : T0, arg1 : T1, <...>) -> (out0 : T0, out1 : T1, <...>)

Definition at line 380 of file LLHDOps.cpp.

References parseArgumentList().

◆ parseProcArgumentList()

static ParseResult parseProcArgumentList ( OpAsmParser &  parser,
SmallVectorImpl< Type > &  argTypes,
SmallVectorImpl< OpAsmParser::Argument > &  argNames 
)
static

Definition at line 594 of file LLHDOps.cpp.

◆ printArgumentList()

static void printArgumentList ( OpAsmPrinter &  printer,
std::vector< BlockArgument >  args 
)
static

Definition at line 424 of file LLHDOps.cpp.

◆ printProcArguments()

static void printProcArguments ( OpAsmPrinter &  p,
Operation *  op,
ArrayRef< Type >  types,
uint64_t  numIns 
)
static

Print the signature of the proc unit.

Assumes that it passed the verification.

Definition at line 686 of file LLHDOps.cpp.