My Project
VectorOps.h
Go to the documentation of this file.
1 //===- VectorOps.h - MLIR Super Vectorizer Operations -----------*- C++ -*-===//
2 //
3 // Part of the MLIR Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the Vector dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_DIALECT_VECTOROPS_VECTOROPS_H
14 #define MLIR_DIALECT_VECTOROPS_VECTOROPS_H
15 
16 #include "mlir/IR/Attributes.h"
17 #include "mlir/IR/Dialect.h"
18 #include "mlir/IR/OpDefinition.h"
19 #include "mlir/IR/StandardTypes.h"
20 
21 namespace mlir {
22 class MLIRContext;
23 class OwningRewritePatternList;
24 namespace vector {
25 
27 class VectorOpsDialect : public Dialect {
28 public:
29  VectorOpsDialect(MLIRContext *context);
30  static StringRef getDialectNamespace() { return "vector"; }
31 
34  Operation *materializeConstant(OpBuilder &builder, Attribute value, Type type,
35  Location loc) override;
36 };
37 
40  OwningRewritePatternList &patterns, MLIRContext *context);
41 
44  OwningRewritePatternList &patterns, MLIRContext *context);
45 
48 
52 
53 #define GET_OP_CLASSES
54 #include "mlir/Dialect/VectorOps/VectorOps.h.inc"
55 
56 } // end namespace vector
57 } // end namespace mlir
58 
59 #endif // MLIR_DIALECT_VECTOROPS_VECTOROPS_H
Definition: InferTypeOpInterface.cpp:20
Definition: Operation.h:27
Integer types can have arbitrary bitwidth up to a large fixed limit.
Definition: StandardTypes.h:82
void populateVectorToVectorTransformationPatterns(OwningRewritePatternList &patterns, MLIRContext *context)
Collect a set of vector-to-vector transformation patterns.
Definition: VectorTransforms.cpp:662
Operation * materializeConstant(OpBuilder &builder, Attribute value, Type type, Location loc) override
Definition: VectorOps.cpp:46
Definition: Attributes.h:198
Definition: Location.h:52
Definition: LLVM.h:37
Definition: Attributes.h:53
Definition: Dialect.h:39
VectorOpsDialect(MLIRContext *context)
Definition: VectorOps.cpp:36
Dialect for Ops on higher-dimensional vector types.
Definition: VectorOps.h:27
Definition: Types.h:84
Definition: PatternMatch.h:418
Definition: Builders.h:47
static StringRef getDialectNamespace()
Definition: VectorOps.h:30
ArrayAttr getVectorSubscriptAttr(Builder &b, ArrayRef< int64_t > values)
Definition: VectorOps.cpp:56
Definition: MLIRContext.h:34
void populateVectorToVectorCanonicalizationPatterns(OwningRewritePatternList &patterns, MLIRContext *context)
Collect a set of vector-to-vector canonicalization patterns.
Definition: VectorOps.cpp:1812
IntegerType getVectorSubscriptType(Builder &builder)
Returns the integer type required for subscripts in the vector dialect.
Definition: VectorOps.cpp:52
Definition: Builders.h:158