Files
clang-p2996/mlir/lib/Conversion/VectorToArmSME/VectorToArmSMEPass.cpp
lorenzo chelini c1a2292526 [MLIR][NFC] Retire let constructor for passes in Conversion directory (part1) (#127403)
`let constructor` is deprecated since the table gen backend emits most
of the glue logic to build a pass. This PR retires the td method for
most (I need another pass) passes in the Conversion directory.
2025-02-17 10:55:27 +01:00

38 lines
1.2 KiB
C++

//===- VectorToArmSMEPass.cpp - Conversion from Vector to the ArmSME dialect =//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "mlir/Conversion/VectorToArmSME/VectorToArmSME.h"
#include "mlir/Dialect/ArmSME/IR/ArmSME.h"
#include "mlir/Dialect/ArmSVE/IR/ArmSVEDialect.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
namespace mlir {
#define GEN_PASS_DEF_CONVERTVECTORTOARMSMEPASS
#include "mlir/Conversion/Passes.h.inc"
} // namespace mlir
using namespace mlir;
using namespace mlir::vector;
namespace {
struct ConvertVectorToArmSMEPass
: public impl::ConvertVectorToArmSMEPassBase<ConvertVectorToArmSMEPass> {
void runOnOperation() override;
};
} // namespace
void ConvertVectorToArmSMEPass::runOnOperation() {
RewritePatternSet patterns(&getContext());
populateVectorToArmSMEPatterns(patterns, getContext());
(void)applyPatternsGreedily(getOperation(), std::move(patterns));
}