Skip to content

Commit cbebacc

Browse files
committed
working on pass
1 parent 7f5e467 commit cbebacc

File tree

6 files changed

+592
-306
lines changed

6 files changed

+592
-306
lines changed

mlir/include/mlir/Transforms/SCFVectorize.h

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
#ifndef MLIR_TRANSFORMS_SCFVECTORIZE_H_
1010
#define MLIR_TRANSFORMS_SCFVECTORIZE_H_
1111

12-
#include <memory>
1312
#include <optional>
1413

1514
namespace mlir {
16-
class OpBuilder;
17-
class Pass;
15+
class DataLayout;
1816
struct LogicalResult;
1917
namespace scf {
2018
class ParallelOp;
@@ -43,9 +41,9 @@ struct SCFVectorizeInfo {
4341
/// specified dimension.
4442
///
4543
/// `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);
4947

5048
/// Vectorization params
5149
struct SCFVectorizeParams {
@@ -64,11 +62,9 @@ struct SCFVectorizeParams {
6462
/// If `masked` is `true` and loop bound is not divisible by `factor`, instead
6563
/// of generating second loop to process remainig iterations, extend loop count
6664
/// 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 &params);
70-
71-
std::unique_ptr<mlir::Pass> createSCFVectorizePass();
65+
mlir::LogicalResult vectorizeLoop(mlir::scf::ParallelOp loop,
66+
const SCFVectorizeParams &params,
67+
const DataLayout *DL = nullptr);
7268
} // namespace mlir
7369

74-
#endif // MLIR_TRANSFORMS_SCFVECTORIZE_H_
70+
#endif // MLIR_TRANSFORMS_SCFVECTORIZE_H_

0 commit comments

Comments
 (0)