CIRCT  19.0.0git
Macros | Functions
PipelineOps.cpp File Reference
#include "circt/Dialect/Pipeline/PipelineOps.h"
#include "circt/Support/ParsingUtils.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/Builders.h"
#include "mlir/Interfaces/FunctionImplementation.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/FormatVariadic.h"
#include "circt/Dialect/Pipeline/PipelineDialect.cpp.inc"
#include "circt/Dialect/Pipeline/Pipeline.cpp.inc"
Include dependency graph for PipelineOps.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "pipeline-ops"
 
#define GET_OP_CLASSES
 
#define GET_OP_LIST
 

Functions

static ParseResult parseOutputList (OpAsmParser &parser, llvm::SmallVector< Type > &inputTypes, mlir::ArrayAttr &outputNames)
 
static void printOutputList (OpAsmPrinter &p, TypeRange types, ArrayAttr names)
 
static ParseResult parseKeywordAndOperand (OpAsmParser &p, StringRef keyword, OpAsmParser::UnresolvedOperand &op)
 
static ParseResult parsePipelineOp (mlir::OpAsmParser &parser, mlir::OperationState &result)
 
static void printKeywordOperand (OpAsmPrinter &p, StringRef keyword, Value value)
 
template<typename TPipelineOp >
static void printPipelineOp (OpAsmPrinter &p, TPipelineOp op)
 
static void buildPipelineLikeOp (OpBuilder &odsBuilder, OperationState &odsState, TypeRange dataOutputs, ValueRange inputs, ArrayAttr inputNames, ArrayAttr outputNames, Value clock, Value reset, Value go, Value stall, StringAttr name, ArrayAttr stallability)
 
template<typename TPipelineOp >
static void getPipelineAsmResultNames (TPipelineOp op, OpAsmSetValueNameFn setNameFn)
 
template<typename TPipelineOp >
static void getPipelineAsmBlockArgumentNames (TPipelineOp op, mlir::Region &region, mlir::OpAsmSetValueNameFn setNameFn)
 
static FailureOr< llvm::SmallVector< Block * > > getOrderedStagesFailable (ScheduledPipelineOp op)
 
static ParseResult parseOptNamedTypedAssignment (OpAsmParser &parser, OpAsmParser::UnresolvedOperand &v, Type &t, StringAttr &name)
 
static ParseResult parseSingleStageRegister (OpAsmParser &parser, OpAsmParser::UnresolvedOperand &v, Type &t, llvm::SmallVector< OpAsmParser::UnresolvedOperand > &clockGates, StringAttr &name)
 
ParseResult parseStageRegisters (OpAsmParser &parser, llvm::SmallVector< OpAsmParser::UnresolvedOperand, 4 > &registers, llvm::SmallVector< mlir::Type, 1 > &registerTypes, llvm::SmallVector< OpAsmParser::UnresolvedOperand, 4 > &clockGates, ArrayAttr &clockGatesPerRegister, ArrayAttr &registerNames)
 
void printStageRegisters (OpAsmPrinter &p, Operation *op, ValueRange registers, TypeRange registerTypes, ValueRange clockGates, ArrayAttr clockGatesPerRegister, ArrayAttr names)
 
void printPassthroughs (OpAsmPrinter &p, Operation *op, ValueRange passthroughs, TypeRange passthroughTypes, ArrayAttr names)
 
ParseResult parsePassthroughs (OpAsmParser &parser, llvm::SmallVector< OpAsmParser::UnresolvedOperand, 4 > &passthroughs, llvm::SmallVector< mlir::Type, 1 > &passthroughTypes, ArrayAttr &passthroughNames)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "pipeline-ops"

Definition at line 29 of file PipelineOps.cpp.

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 1068 of file PipelineOps.cpp.

◆ GET_OP_LIST

#define GET_OP_LIST

Function Documentation

◆ buildPipelineLikeOp()

static void buildPipelineLikeOp ( OpBuilder &  odsBuilder,
OperationState &  odsState,
TypeRange  dataOutputs,
ValueRange  inputs,
ArrayAttr  inputNames,
ArrayAttr  outputNames,
Value  clock,
Value  reset,
Value  go,
Value  stall,
StringAttr  name,
ArrayAttr  stallability 
)
static

Definition at line 290 of file PipelineOps.cpp.

References inputs.

◆ getOrderedStagesFailable()

static FailureOr<llvm::SmallVector<Block *> > getOrderedStagesFailable ( ScheduledPipelineOp  op)
static

Definition at line 483 of file PipelineOps.cpp.

◆ getPipelineAsmBlockArgumentNames()

template<typename TPipelineOp >
static void getPipelineAsmBlockArgumentNames ( TPipelineOp  op,
mlir::Region &  region,
mlir::OpAsmSetValueNameFn  setNameFn 
)
static

Definition at line 356 of file PipelineOps.cpp.

◆ getPipelineAsmResultNames()

template<typename TPipelineOp >
static void getPipelineAsmResultNames ( TPipelineOp  op,
OpAsmSetValueNameFn  setNameFn 
)
static

Definition at line 345 of file PipelineOps.cpp.

◆ parseKeywordAndOperand()

static ParseResult parseKeywordAndOperand ( OpAsmParser &  p,
StringRef  keyword,
OpAsmParser::UnresolvedOperand &  op 
)
static

Definition at line 117 of file PipelineOps.cpp.

Referenced by parsePipelineOp().

◆ parseOptNamedTypedAssignment()

static ParseResult parseOptNamedTypedAssignment ( OpAsmParser &  parser,
OpAsmParser::UnresolvedOperand &  v,
Type &  t,
StringAttr &  name 
)
static

Definition at line 685 of file PipelineOps.cpp.

Referenced by parseSingleStageRegister().

◆ parseOutputList()

static ParseResult parseOutputList ( OpAsmParser &  parser,
llvm::SmallVector< Type > &  inputTypes,
mlir::ArrayAttr &  outputNames 
)
static

Definition at line 85 of file PipelineOps.cpp.

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

Referenced by parsePipelineOp().

◆ parsePassthroughs()

ParseResult parsePassthroughs ( OpAsmParser &  parser,
llvm::SmallVector< OpAsmParser::UnresolvedOperand, 4 > &  passthroughs,
llvm::SmallVector< mlir::Type, 1 > &  passthroughTypes,
ArrayAttr &  passthroughNames 
)

Definition at line 831 of file PipelineOps.cpp.

◆ parsePipelineOp()

static ParseResult parsePipelineOp ( mlir::OpAsmParser &  parser,
mlir::OperationState &  result 
)
static

◆ parseSingleStageRegister()

static ParseResult parseSingleStageRegister ( OpAsmParser &  parser,
OpAsmParser::UnresolvedOperand &  v,
Type &  t,
llvm::SmallVector< OpAsmParser::UnresolvedOperand > &  clockGates,
StringAttr &  name 
)
static

Definition at line 712 of file PipelineOps.cpp.

References parseOptNamedTypedAssignment().

◆ parseStageRegisters()

ParseResult parseStageRegisters ( OpAsmParser &  parser,
llvm::SmallVector< OpAsmParser::UnresolvedOperand, 4 > &  registers,
llvm::SmallVector< mlir::Type, 1 > &  registerTypes,
llvm::SmallVector< OpAsmParser::UnresolvedOperand, 4 > &  clockGates,
ArrayAttr &  clockGatesPerRegister,
ArrayAttr &  registerNames 
)

Definition at line 734 of file PipelineOps.cpp.

◆ printKeywordOperand()

static void printKeywordOperand ( OpAsmPrinter &  p,
StringRef  keyword,
Value  value 
)
static

Definition at line 230 of file PipelineOps.cpp.

Referenced by printPipelineOp().

◆ printOutputList()

static void printOutputList ( OpAsmPrinter &  p,
TypeRange  types,
ArrayAttr  names 
)
static

Definition at line 107 of file PipelineOps.cpp.

Referenced by printPipelineOp().

◆ printPassthroughs()

void printPassthroughs ( OpAsmPrinter &  p,
Operation *  op,
ValueRange  passthroughs,
TypeRange  passthroughTypes,
ArrayAttr  names 
)

Definition at line 807 of file PipelineOps.cpp.

References empty, and seq::reg().

◆ printPipelineOp()

template<typename TPipelineOp >
static void printPipelineOp ( OpAsmPrinter &  p,
TPipelineOp  op 
)
static

◆ printStageRegisters()

void printStageRegisters ( OpAsmPrinter &  p,
Operation *  op,
ValueRange  registers,
TypeRange  registerTypes,
ValueRange  clockGates,
ArrayAttr  clockGatesPerRegister,
ArrayAttr  names 
)

Definition at line 774 of file PipelineOps.cpp.

References empty, and seq::reg().