MLIR 22.0.0git
VectorToArmSMEPass.cpp
Go to the documentation of this file.
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
10
13#include "mlir/Pass/Pass.h"
15
16namespace mlir {
17#define GEN_PASS_DEF_CONVERTVECTORTOARMSMEPASS
18#include "mlir/Conversion/Passes.h.inc"
19} // namespace mlir
20
21using namespace mlir;
22using namespace mlir::vector;
23
24namespace {
25struct ConvertVectorToArmSMEPass
26 : public impl::ConvertVectorToArmSMEPassBase<ConvertVectorToArmSMEPass> {
27
28 void runOnOperation() override;
29};
30} // namespace
31
32void ConvertVectorToArmSMEPass::runOnOperation() {
33 RewritePatternSet patterns(&getContext());
35
36 (void)applyPatternsGreedily(getOperation(), std::move(patterns));
37}
b getContext())
Include the generated interface declarations.
LogicalResult applyPatternsGreedily(Region &region, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
Rewrite ops in the given region, which must be isolated from above, by repeatedly applying the highes...
const FrozenRewritePatternSet & patterns
void populateVectorToArmSMEPatterns(RewritePatternSet &patterns, MLIRContext &ctx)
Collect a set of patterns to lower Vector ops to ArmSME ops that map to LLVM intrinsics.