[flang-commits] [flang] [mlir] [MLIR][LLVM] Turn the inliner interface into a promised interface (PR #103927)
Tobias Gysi via flang-commits
flang-commits at lists.llvm.org
Wed Aug 14 06:34:25 PDT 2024
================
@@ -1,33 +1,28 @@
-//===- LLVMInlining.h - Registration of LLVMInlinerInterface ----*- C++ -*-===//
+//===- InlinerInterfaceImpl.h - Inlining for LLVM the dialect ---*- 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.
+// Allows registering the LLVM DialectInlinerInterface with the LLVM dialect.
//
//===----------------------------------------------------------------------===//
-#ifndef DIALECT_LLVMIR_IR_LLVMINLINING_H
-#define DIALECT_LLVMIR_IR_LLVMINLINING_H
+#ifndef MLIR_DIALECT_LLVMIR_TRANSFORMS_INLINERINTERFACEIMPL_H
+#define MLIR_DIALECT_LLVMIR_TRANSFORMS_INLINERINTERFACEIMPL_H
namespace mlir {
-namespace LLVM {
-
-class LLVMDialect;
+class DialectRegistry;
-namespace detail {
+namespace LLVM {
/// Register the `LLVMInlinerInterface` implementation of
/// `DialectInlinerInterface` with the LLVM dialect.
-void addLLVMInlinerInterface(LLVMDialect *dialect);
-
-} // namespace detail
+void registerLLVMInlinerInterface(DialectRegistry ®istry);
----------------
gysit wrote:
```suggestion
void registerInlinerInterface(DialectRegistry ®istry);
```
Nit: since it is in the LLVM namespace it may make sense to drop it in the function name?
https://github.com/llvm/llvm-project/pull/103927
More information about the flang-commits
mailing list