MLIR 22.0.0git
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/STLExtras.h"
#include "llvm/ADT/SmallVector.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.
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.
static LogicalResult verifyTerminatorSuccessors (Operation *op)

Function Documentation

◆ checkFoldResultTypes()

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 610 of file Operation.cpp.

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

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

◆ getTensorOrVectorElementType()

Type getTensorOrVectorElementType ( Type type)
static

◆ verifyTerminatorSuccessors()