MLIR  21.0.0git
Functions
Operation.cpp File Reference
#include "mlir/IR/Operation.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Interfaces/FoldInterfaces.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/ErrorHandling.h"
#include <numeric>
#include <optional>

Go to the source code of this file.

Functions

static void checkFoldResultTypes (Operation *op, SmallVectorImpl< OpFoldResult > &results)
 Assert that the folded results (in case of values) have the same type as the results of the given op. More...
 
static Type getTensorOrVectorElementType (Type type)
 If this is a vector type, or a tensor type, return the scalar element type that it is built around, otherwise return the type unmodified. More...
 
static LogicalResult verifyTerminatorSuccessors (Operation *op)
 

Function Documentation

◆ checkFoldResultTypes()

static void checkFoldResultTypes ( Operation op,
SmallVectorImpl< OpFoldResult > &  results 
)
static

Assert that the folded results (in case of values) have the same type as the results of the given op.

Definition at line 613 of file Operation.cpp.

References mlir::Operation::emitOpError(), and mlir::Operation::getResults().

Referenced by mlir::Operation::fold().

◆ getTensorOrVectorElementType()

static Type getTensorOrVectorElementType ( Type  type)
static

If this is a vector type, or a tensor type, return the scalar element type that it is built around, otherwise return the type unmodified.

Definition at line 926 of file Operation.cpp.

Referenced by mlir::OpTrait::impl::verifyOperandsAreFloatLike(), mlir::OpTrait::impl::verifyOperandsAreSignlessIntegerLike(), mlir::OpTrait::impl::verifyResultsAreBoolLike(), mlir::OpTrait::impl::verifyResultsAreFloatLike(), and mlir::OpTrait::impl::verifyResultsAreSignlessIntegerLike().

◆ verifyTerminatorSuccessors()

static LogicalResult verifyTerminatorSuccessors ( Operation op)
static