1 | //===- Passes.h - Pass Entrypoints ------------------------------*- C++ -*-===// |
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 | #ifndef MLIR_DIALECT_ARMSME_TRANSFORMS_PASSES_H |
10 | #define MLIR_DIALECT_ARMSME_TRANSFORMS_PASSES_H |
11 | |
12 | #include "mlir/Conversion/LLVMCommon/TypeConverter.h" |
13 | #include "mlir/Dialect/ArmSME/Transforms/PassesEnums.h.inc" |
14 | #include "mlir/Pass/Pass.h" |
15 | |
16 | namespace mlir { |
17 | |
18 | class RewritePatternSet; |
19 | |
20 | namespace arm_sme { |
21 | //===----------------------------------------------------------------------===// |
22 | // The EnableArmStreaming pass. |
23 | //===----------------------------------------------------------------------===// |
24 | #define GEN_PASS_DECL |
25 | #include "mlir/Dialect/ArmSME/Transforms/Passes.h.inc" |
26 | |
27 | /// Pass to enable Armv9 Streaming SVE mode. |
28 | std::unique_ptr<Pass> createEnableArmStreamingPass( |
29 | const ArmStreamingMode = ArmStreamingMode::Streaming, |
30 | const ArmZaMode = ArmZaMode::Disabled, bool onlyIfRequiredByOps = false); |
31 | |
32 | /// Pass that allocates tile IDs to ArmSME operations. |
33 | std::unique_ptr<Pass> createTileAllocationPass(); |
34 | |
35 | /// Pass that fuses 'arm_sme.outerproduct' ops into 2-way or 4-way widening |
36 | /// variants. |
37 | std::unique_ptr<Pass> createOuterProductFusionPass(); |
38 | |
39 | /// Pass that legalizes vectors so they can be lowered to ArmSME. |
40 | std::unique_ptr<Pass> createVectorLegalizationPass(); |
41 | |
42 | //===----------------------------------------------------------------------===// |
43 | // Registration |
44 | //===----------------------------------------------------------------------===// |
45 | |
46 | /// Generate the code for registering passes. |
47 | #define GEN_PASS_REGISTRATION |
48 | #include "mlir/Dialect/ArmSME/Transforms/Passes.h.inc" |
49 | |
50 | } // namespace arm_sme |
51 | } // namespace mlir |
52 | |
53 | #endif // MLIR_DIALECT_ARMSME_TRANSFORMS_PASSES_H |
54 | |