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"
38 return memRefDescriptor.
bufferPtr(rewriter, loc, typeConverter, type);
42 if (getSrc() && getConstantSrc())
43 return emitError(
"cannot use both src and constant_src");
46 return emitError(
"failed to verify that src and dst have same type");
48 if (getConstantSrc() && (getConstantSrc()->
getType() != getDst().
getType()))
50 "failed to verify that constant_src and dst have same type");
59 Adaptor adaptor(operands, *
this);
61 auto opType = adaptor.getA().getType();
63 if (adaptor.getSrc()) {
64 src = adaptor.getSrc();
65 }
else if (adaptor.getConstantSrc()) {
66 src = rewriter.
create<LLVM::ConstantOp>(loc, opType,
67 adaptor.getConstantSrcAttr());
70 src = rewriter.
create<LLVM::ConstantOp>(loc, opType, zeroAttr);
83 rewriter.
create<LLVM::ConstantOp>(getLoc(), rewriter.
getI8Type(), 0xff);
84 intrinsicOperands.push_back(scale);
86 return intrinsicOperands;
92 Adaptor adaptor(operands, *
this);
94 typeConverter, rewriter)};
100 Adaptor adaptor(operands, *
this);
102 typeConverter, rewriter)};
108 Adaptor adaptor(operands, *
this);
110 typeConverter, rewriter)};
113 #define GET_OP_CLASSES
114 #include "mlir/Dialect/X86Vector/X86Vector.cpp.inc"
static Value getMemrefBuffPtr(Location loc, MemRefType type, Value buffer, const LLVMTypeConverter &typeConverter, RewriterBase &rewriter)
TypedAttr getZeroAttr(Type type)
Conversion from types to the LLVM IR dialect.
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...
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.
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,...