| 1 | //===- Transforms.h - ArmSVE Dialect Transformation 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_ARMSVE_TRANSFORMS_H |
| 10 | #define MLIR_DIALECT_ARMSVE_TRANSFORMS_H |
| 11 | |
| 12 | namespace mlir { |
| 13 | |
| 14 | class LLVMConversionTarget; |
| 15 | class LLVMTypeConverter; |
| 16 | class RewritePatternSet; |
| 17 | |
| 18 | namespace arm_sve { |
| 19 | void populateLowerContractionToSVEI8MMPatterns(RewritePatternSet &patterns); |
| 20 | void populateLowerContractionToSVEBFMMLAPatterns(RewritePatternSet &patterns); |
| 21 | void populateLowerContractionToSVEIndexedFMLAPatterns( |
| 22 | RewritePatternSet &patterns); |
| 23 | } // namespace arm_sve |
| 24 | |
| 25 | /// Collect a set of patterns to lower ArmSVE ops to ops that map to LLVM |
| 26 | /// intrinsics. |
| 27 | void populateArmSVELegalizeForLLVMExportPatterns( |
| 28 | const LLVMTypeConverter &converter, RewritePatternSet &patterns); |
| 29 | |
| 30 | /// Configure the target to support lowering ArmSVE ops to ops that map to LLVM |
| 31 | /// intrinsics. |
| 32 | void configureArmSVELegalizeForExportTarget(LLVMConversionTarget &target); |
| 33 | |
| 34 | } // namespace mlir |
| 35 | |
| 36 | #endif // MLIR_DIALECT_ARMSVE_TRANSFORMS_H |
| 37 | |