MLIR  16.0.0git
Macros | Functions
Shape.cpp File Reference
#include <utility>
#include "mlir/Dialect/Shape/IR/Shape.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/CommonFolders.h"
#include "mlir/Dialect/Tensor/IR/Tensor.h"
#include "mlir/Dialect/Traits.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/FunctionImplementation.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Transforms/InliningUtils.h"
#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/raw_ostream.h"
#include "mlir/Dialect/Shape/IR/ShapeOpsDialect.cpp.inc"
#include "ShapeCanonicalization.inc"
#include "mlir/Dialect/Shape/IR/ShapeOps.cpp.inc"
#include "mlir/Dialect/Shape/IR/ShapeOpsTypes.cpp.inc"
+ Include dependency graph for Shape.cpp:

Go to the source code of this file.

Macros

#define GET_OP_LIST
 
#define GET_TYPEDEF_LIST
 
#define GET_OP_CLASSES
 
#define GET_TYPEDEF_CLASSES
 

Functions

static bool isErrorPropagationPossible (TypeRange operandTypes)
 
static LogicalResult verifySizeOrIndexOp (Operation *op)
 
static LogicalResult verifyShapeOrExtentTensorOp (Operation *op)
 
template<typename... Ty>
static bool eachHasOnlyOneOfTypes (TypeRange typeRange)
 
template<typename... Ty, typename... ranges>
static bool eachHasOnlyOneOfTypes (TypeRange l, ranges... rs)
 
static bool hasAtMostSingleNonScalar (ArrayRef< Attribute > attributes)
 

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 2001 of file Shape.cpp.

◆ GET_OP_LIST

#define GET_OP_LIST

◆ GET_TYPEDEF_CLASSES

#define GET_TYPEDEF_CLASSES

Definition at line 2004 of file Shape.cpp.

◆ GET_TYPEDEF_LIST

#define GET_TYPEDEF_LIST

Function Documentation

◆ eachHasOnlyOneOfTypes() [1/2]

template<typename... Ty>
static bool eachHasOnlyOneOfTypes ( TypeRange  typeRange)
static

Definition at line 96 of file Shape.cpp.

Referenced by eachHasOnlyOneOfTypes().

◆ eachHasOnlyOneOfTypes() [2/2]

template<typename... Ty, typename... ranges>
static bool eachHasOnlyOneOfTypes ( TypeRange  l,
ranges...  rs 
)
static

Definition at line 101 of file Shape.cpp.

References mlir::RewritePatternSet::add(), mlir::OperationState::addAttribute(), mlir::OperationState::addOperands(), mlir::OperationState::addRegion(), mlir::OperationState::addTypes(), mlir::OperationState::attributes, mlir::Block::back(), mlir::Attribute::cast(), mlir::Type::cast(), mlir::OpBuilder::create(), mlir::DialectInlinerInterface::DialectInlinerInterface(), mlir::Attribute::dyn_cast(), eachHasOnlyOneOfTypes(), mlir::Operation::emitError(), mlir::emitOptionalError(), mlir::RewriterBase::eraseOp(), mlir::failure(), mlir::Region::front(), mlir::BoolAttr::get(), mlir::OpTrait::util::getBroadcastedShape(), mlir::AsmParser::getBuilder(), mlir::shape::getExtentTensorType(), mlir::Builder::getIndexTensorAttr(), mlir::Builder::getIndexType(), mlir::OpBuilder::getInsertionBlock(), mlir::OpBuilder::getInsertionPoint(), mlir::NamedAttribute::getName(), mlir::Operation::getOperands(), getShape(), mlir::Block::getTerminator(), mlir::Builder::getType(), mlir::Value::getType(), mlir::NamedAttribute::getValue(), mlir::BoolAttr::getValue(), mlir::Operation::hasTrait(), mlir::RewriterBase::inlineRegionBefore(), mlir::Type::isa(), mlir::shape::isExtentTensorType(), isLegalToInline(), mlir::OperationState::location, mlir::SymbolTable::lookupSymbolIn(), mlir::m_Zero(), mlir::matchPattern(), materializeConstant(), max(), mlir::RewriterBase::mergeBlocks(), mlir::OperationState::operands, mlir::AsmParser::parseAttribute(), mlir::AsmParser::parseColonType(), mlir::OpAsmParser::parseOperand(), mlir::AsmParser::parseOptionalArrowTypeList(), mlir::AsmParser::parseOptionalAttrDict(), mlir::OpAsmParser::parseRegion(), print(), mlir::OpAsmPrinter::printOptionalAttrDict(), mlir::OpAsmPrinter::printRegion(), mlir::AsmPrinter::printType(), mlir::Region::push_back(), mlir::OperationState::regions, mlir::RewriterBase::replaceOp(), mlir::RewriterBase::replaceOpWithNewOp(), mlir::OpAsmParser::resolveOperand(), mlir::OpBuilder::setInsertionPoint(), mlir::OpBuilder::setInsertionPointToEnd(), mlir::OpBuilder::setInsertionPointToStart(), mlir::RewriterBase::splitBlock(), mlir::success(), mlir::OperationState::types, value, mlir::verify(), verifyShapeOrExtentTensorOp(), and verifySizeOrIndexOp().

◆ hasAtMostSingleNonScalar()

static bool hasAtMostSingleNonScalar ( ArrayRef< Attribute attributes)
static

◆ isErrorPropagationPossible()

static bool isErrorPropagationPossible ( TypeRange  operandTypes)
static

Definition at line 65 of file Shape.cpp.

References mlir::Type::isa().

Referenced by verifyShapeOrExtentTensorOp(), and verifySizeOrIndexOp().

◆ verifyShapeOrExtentTensorOp()

static LogicalResult verifyShapeOrExtentTensorOp ( Operation op)
static

◆ verifySizeOrIndexOp()

static LogicalResult verifySizeOrIndexOp ( Operation op)
static