1 //===- ToLLVMPass.h - Conversion to LLVM pass ---*- 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_CONVERSION_CONVERTTOLLVM_TOLLVM_PASS_H 10 #define MLIR_CONVERSION_CONVERTTOLLVM_TOLLVM_PASS_H 11 12 #include <memory> 13 14 #include "mlir/Pass/Pass.h" 15 16 #define GEN_PASS_DECL_CONVERTTOLLVMPASS 17 #include "mlir/Conversion/Passes.h.inc" 18 19 namespace mlir { 20 21 /// Create a pass that performs dialect conversion to LLVM for all dialects 22 /// implementing `ConvertToLLVMPatternInterface`. 23 std::unique_ptr<Pass> createConvertToLLVMPass(); 24 25 /// Register the extension that will load dependent dialects for LLVM 26 /// conversion. This is useful to implement a pass similar to "convert-to-llvm". 27 void registerConvertToLLVMDependentDialectLoading(DialectRegistry ®istry); 28 29 } // namespace mlir 30 31 #endif // MLIR_CONVERSION_CONVERTTOLLVM_TOLLVM_PASS_H 32