1//===- VectorToArmSMEPass.cpp - Conversion from Vector to the ArmSME dialect =//
2//
3// Part of the LLVM 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#include "mlir/Conversion/VectorToArmSME/VectorToArmSME.h"
10
11#include "mlir/Dialect/ArmSME/IR/ArmSME.h"
12#include "mlir/Pass/Pass.h"
13#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
14
15namespace mlir {
16#define GEN_PASS_DEF_CONVERTVECTORTOARMSME
17#include "mlir/Conversion/Passes.h.inc"
18} // namespace mlir
19
20using namespace mlir;
21using namespace mlir::vector;
22
23namespace {
24struct ConvertVectorToArmSMEPass
25 : public impl::ConvertVectorToArmSMEBase<ConvertVectorToArmSMEPass> {
26
27 void runOnOperation() override;
28};
29} // namespace
30
31void ConvertVectorToArmSMEPass::runOnOperation() {
32 RewritePatternSet patterns(&getContext());
33 populateVectorToArmSMEPatterns(patterns, getContext());
34
35 (void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
36}
37
38std::unique_ptr<Pass> mlir::createConvertVectorToArmSMEPass() {
39 return std::make_unique<ConvertVectorToArmSMEPass>();
40}
41

source code of mlir/lib/Conversion/VectorToArmSME/VectorToArmSMEPass.cpp