Files
clang-p2996/mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.h
Johannes de Fine Licht a7c574d0c1 [MLIR][LLVM] Move the LLVM inliner interface into a separate file.
A fully fledged LLVM inliner will require a lot of logic. Since
`LLVMDialect.cpp` is large enough as it is, preemptively outline the
inlining logic into a separate `.cpp` file. This will also allow us to
add a `DEBUG_TYPE` for debugging the inliner.

The name `LLVMInlining` was chosen over `LLVMInlinerInterface` to keep
the option open for exposing inlining functionality even when not
invoked through the `DialectInlinerInterface`.

Depends on D146616

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D146628
2023-03-23 14:22:25 +01:00

34 lines
989 B
C++

//===- LLVMInlining.h - Registration of LLVMInlinerInterface ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Allows registering the LLVM DialectInlinerInterface with the LLVM dialect
// during initialization.
//
//===----------------------------------------------------------------------===//
#ifndef DIALECT_LLVMIR_IR_LLVMINLINING_H
#define DIALECT_LLVMIR_IR_LLVMINLINING_H
namespace mlir {
namespace LLVM {
class LLVMDialect;
namespace detail {
/// Register the `LLVMInlinerInterface` implementation of
/// `DialectInlinerInterface` with the LLVM dialect.
void addLLVMInlinerInterface(LLVMDialect *dialect);
} // namespace detail
} // namespace LLVM
} // namespace mlir
#endif // DIALECT_LLVMIR_IR_LLVMINLINING_H