1 //===- ConvertVectorToLLVM.h - Utils to convert from the vector 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 #ifndef MLIR_CONVERSION_VECTORTOLLVM_CONVERTVECTORTOLLVM_H_ 9 #define MLIR_CONVERSION_VECTORTOLLVM_CONVERTVECTORTOLLVM_H_ 10 11 #include "mlir/Transforms/DialectConversion.h" 12 13 namespace mlir { 14 class LLVMTypeConverter; 15 16 /// Collect a set of patterns to convert from Vector contractions to LLVM Matrix 17 /// Intrinsics. To lower to assembly, the LLVM flag -lower-matrix-intrinsics 18 /// will be needed when invoking LLVM. 19 void populateVectorToLLVMMatrixConversionPatterns( 20 const LLVMTypeConverter &converter, RewritePatternSet &patterns); 21 22 /// Collect a set of patterns to convert from the Vector dialect to LLVM. 23 void populateVectorToLLVMConversionPatterns( 24 const LLVMTypeConverter &converter, RewritePatternSet &patterns, 25 bool reassociateFPReductions = false, bool force32BitVectorIndices = false); 26 27 } // namespace mlir 28 29 #endif // MLIR_CONVERSION_VECTORTOLLVM_CONVERTVECTORTOLLVM_H_ 30