diff --git a/mlir/include/mlir/LLVMIR/Transforms.h b/mlir/include/mlir/LLVMIR/Transforms.h new file mode 100644 index 000000000000..3c62f19449d7 --- /dev/null +++ b/mlir/include/mlir/LLVMIR/Transforms.h @@ -0,0 +1,29 @@ +//===- Transforms.h - Pass Entrypoints --------------------------*- C++ -*-===// +// +// Copyright 2019 The MLIR Authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ============================================================================= + +#ifndef MLIR_LLVMIR_TRANSFORMS_H_ +#define MLIR_LLVMIR_TRANSFORMS_H_ + +namespace mlir { +class ModulePassBase; + +/// Creates a pass to convert Standard dialects into the LLVMIR dialect. +ModulePassBase *createConvertToLLVMIRPass(); + +} // namespace mlir + +#endif // MLIR_LLVMIR_TRANSFORMS_H_ diff --git a/mlir/include/mlir/Transforms/Passes.h b/mlir/include/mlir/Transforms/Passes.h index d75eec743202..c40d1c833de9 100644 --- a/mlir/include/mlir/Transforms/Passes.h +++ b/mlir/include/mlir/Transforms/Passes.h @@ -108,10 +108,6 @@ FunctionPassBase *createMemRefDataFlowOptPass(); /// Creates a pass to strip debug information from a function. FunctionPassBase *createStripDebugInfoPass(); -/// Creates a pass to convert Standard and Builtin dialects into the LLVMIR -/// dialect. -ModulePassBase *createConvertToLLVMIRPass(); - } // end namespace mlir #endif // MLIR_TRANSFORMS_PASSES_H diff --git a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp index 9c407528c0de..048ac461db10 100644 --- a/mlir/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/mlir/lib/ExecutionEngine/ExecutionEngine.cpp @@ -22,6 +22,7 @@ #include "mlir/ExecutionEngine/ExecutionEngine.h" #include "mlir/IR/Function.h" #include "mlir/IR/Module.h" +#include "mlir/LLVMIR/Transforms.h" #include "mlir/Pass/Pass.h" #include "mlir/Pass/PassManager.h" #include "mlir/Target/LLVMIR.h" diff --git a/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp b/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp index 5e4df06270e5..f6d2f74194da 100644 --- a/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp +++ b/mlir/lib/LLVMIR/Transforms/ConvertToLLVMDialect.cpp @@ -25,6 +25,7 @@ #include "mlir/IR/Module.h" #include "mlir/IR/PatternMatch.h" #include "mlir/LLVMIR/LLVMDialect.h" +#include "mlir/LLVMIR/Transforms.h" #include "mlir/Pass/Pass.h" #include "mlir/StandardOps/Ops.h" #include "mlir/Support/Functional.h"