9
9
#ifndef MLIR_TRANSFORMS_SCFVECTORIZE_H_
10
10
#define MLIR_TRANSFORMS_SCFVECTORIZE_H_
11
11
12
- #include < memory>
13
12
#include < optional>
14
13
15
14
namespace mlir {
16
- class OpBuilder ;
17
- class Pass ;
15
+ class DataLayout ;
18
16
struct LogicalResult ;
19
17
namespace scf {
20
18
class ParallelOp ;
@@ -43,9 +41,9 @@ struct SCFVectorizeInfo {
43
41
// / specified dimension.
44
42
// /
45
43
// / `vectorBitwidth` - maximum vector size, in bits.
46
- std::optional<SCFVectorizeInfo> getLoopVectorizeInfo (mlir::scf::ParallelOp loop,
47
- unsigned dim,
48
- unsigned vectorBitwidth );
44
+ std::optional<SCFVectorizeInfo>
45
+ getLoopVectorizeInfo (mlir::scf::ParallelOp loop, unsigned dim,
46
+ unsigned vectorBitwidth, const DataLayout *DL = nullptr );
49
47
50
48
// / Vectorization params
51
49
struct SCFVectorizeParams {
@@ -64,11 +62,9 @@ struct SCFVectorizeParams {
64
62
// / If `masked` is `true` and loop bound is not divisible by `factor`, instead
65
63
// / of generating second loop to process remainig iterations, extend loop count
66
64
// / and generate masked vector ops to handle out-of bounds memory accesses.
67
- mlir::LogicalResult vectorizeLoop (mlir::OpBuilder &builder,
68
- mlir::scf::ParallelOp loop,
69
- const SCFVectorizeParams ¶ms);
70
-
71
- std::unique_ptr<mlir::Pass> createSCFVectorizePass ();
65
+ mlir::LogicalResult vectorizeLoop (mlir::scf::ParallelOp loop,
66
+ const SCFVectorizeParams ¶ms,
67
+ const DataLayout *DL = nullptr );
72
68
} // namespace mlir
73
69
74
- #endif // MLIR_TRANSFORMS_SCFVECTORIZE_H_
70
+ #endif // MLIR_TRANSFORMS_SCFVECTORIZE_H_
0 commit comments