Move `createConvertToLLVMIRPass()` to its own header matching the target library clients need to link

PiperOrigin-RevId: 237723197
This commit is contained in:
Mehdi Amini 2019-03-10 18:43:55 -07:00 committed by jpienaar
parent 5e1f1d2cab
commit 732160eaa5
4 changed files with 31 additions and 4 deletions

View File

@ -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_

View File

@ -108,10 +108,6 @@ FunctionPassBase *createMemRefDataFlowOptPass();
/// Creates a pass to strip debug information from a function. /// Creates a pass to strip debug information from a function.
FunctionPassBase *createStripDebugInfoPass(); FunctionPassBase *createStripDebugInfoPass();
/// Creates a pass to convert Standard and Builtin dialects into the LLVMIR
/// dialect.
ModulePassBase *createConvertToLLVMIRPass();
} // end namespace mlir } // end namespace mlir
#endif // MLIR_TRANSFORMS_PASSES_H #endif // MLIR_TRANSFORMS_PASSES_H

View File

@ -22,6 +22,7 @@
#include "mlir/ExecutionEngine/ExecutionEngine.h" #include "mlir/ExecutionEngine/ExecutionEngine.h"
#include "mlir/IR/Function.h" #include "mlir/IR/Function.h"
#include "mlir/IR/Module.h" #include "mlir/IR/Module.h"
#include "mlir/LLVMIR/Transforms.h"
#include "mlir/Pass/Pass.h" #include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h" #include "mlir/Pass/PassManager.h"
#include "mlir/Target/LLVMIR.h" #include "mlir/Target/LLVMIR.h"

View File

@ -25,6 +25,7 @@
#include "mlir/IR/Module.h" #include "mlir/IR/Module.h"
#include "mlir/IR/PatternMatch.h" #include "mlir/IR/PatternMatch.h"
#include "mlir/LLVMIR/LLVMDialect.h" #include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/LLVMIR/Transforms.h"
#include "mlir/Pass/Pass.h" #include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/Ops.h" #include "mlir/StandardOps/Ops.h"
#include "mlir/Support/Functional.h" #include "mlir/Support/Functional.h"