23 #include "mlir/Dialect/X86Vector/X86VectorInterfaces.cpp.inc"
25 #include "mlir/Dialect/X86Vector/X86VectorDialect.cpp.inc"
27 void x86vector::X86VectorDialect::initialize() {
30 #include "mlir/Dialect/X86Vector/X86Vector.cpp.inc"
39 auto opType = memrefVal.getType();
44 .
create<UnrealizedConversionCastOp>(loc, llvmStructType, memrefVal)
48 Value ptr = memRefDescriptor.
bufferPtr(rewriter, loc, typeConverter, opType);
49 operands.push_back(ptr);
55 if (getSrc() && getConstantSrc())
56 return emitError(
"cannot use both src and constant_src");
59 return emitError(
"failed to verify that src and dst have same type");
61 if (getConstantSrc() && (getConstantSrc()->
getType() != getDst().
getType()))
63 "failed to verify that constant_src and dst have same type");
72 auto opType = getA().getType();
76 }
else if (getConstantSrc()) {
77 src = rewriter.
create<LLVM::ConstantOp>(loc, opType, getConstantSrcAttr());
80 src = rewriter.
create<LLVM::ConstantOp>(loc, opType, zeroAttr);
87 x86vector::DotOp::getIntrinsicOperands(
RewriterBase &rewriter,
92 rewriter.
create<LLVM::ConstantOp>(getLoc(), rewriter.
getI8Type(), 0xff);
93 operands.push_back(scale);
104 x86vector::CvtPackedOddIndexedBF16ToF32Op::getIntrinsicOperands(
110 x86vector::CvtPackedEvenIndexedBF16ToF32Op::getIntrinsicOperands(
115 #define GET_OP_CLASSES
116 #include "mlir/Dialect/X86Vector/X86Vector.cpp.inc"
static SmallVector< Value > getMemrefBuffPtr(Location loc, ::mlir::TypedValue<::mlir::MemRefType > memrefVal, RewriterBase &rewriter, const LLVMTypeConverter &typeConverter)
TypedAttr getZeroAttr(Type type)
Conversion from types to the LLVM IR dialect.
LogicalResult convertType(Type t, SmallVectorImpl< Type > &results) const
Convert the given type.
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
Helper class to produce LLVM dialect operations extracting or inserting elements of a MemRef descript...
Value bufferPtr(OpBuilder &builder, Location loc, const LLVMTypeConverter &converter, MemRefType type)
Builds IR for getting the start address of the buffer represented by this memref: memref....
Operation * create(const OperationState &state)
Creates an operation given the fields represented as an OperationState.
This class coordinates the application of a rewrite on a set of IR, providing a way for clients to tr...
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Include the generated interface declarations.
Type getType(OpFoldResult ofr)
Returns the int type of the integer in ofr.
std::conditional_t< std::is_same_v< Ty, mlir::Type >, mlir::Value, detail::TypedValue< Ty > > TypedValue
If Ty is mlir::Type this will select Value instead of having a wrapper around it.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
LogicalResult verify(Operation *op, bool verifyRecursively=true)
Perform (potentially expensive) checks of invariants, used to detect compiler bugs,...