Fix GCC build problem with 288f05f related to SmallVector. (#116958)
[llvm-project.git] / mlir / lib / Conversion / VectorToArmSME / VectorToArmSMEPass.cpp
blobcc00bf4ca190a55d22181287cb26aa7e880985c3
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 //===----------------------------------------------------------------------===//
9 #include "mlir/Conversion/VectorToArmSME/VectorToArmSME.h"
11 #include "mlir/Dialect/ArmSME/IR/ArmSME.h"
12 #include "mlir/Dialect/ArmSVE/IR/ArmSVEDialect.h"
13 #include "mlir/Pass/Pass.h"
14 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
16 namespace mlir {
17 #define GEN_PASS_DEF_CONVERTVECTORTOARMSME
18 #include "mlir/Conversion/Passes.h.inc"
19 } // namespace mlir
21 using namespace mlir;
22 using namespace mlir::vector;
24 namespace {
25 struct ConvertVectorToArmSMEPass
26 : public impl::ConvertVectorToArmSMEBase<ConvertVectorToArmSMEPass> {
28 void runOnOperation() override;
30 } // namespace
32 void ConvertVectorToArmSMEPass::runOnOperation() {
33 RewritePatternSet patterns(&getContext());
34 populateVectorToArmSMEPatterns(patterns, getContext());
36 (void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
39 std::unique_ptr<Pass> mlir::createConvertVectorToArmSMEPass() {
40 return std::make_unique<ConvertVectorToArmSMEPass>();