[Mlir-commits] [mlir] [mlir] Add pass to add comdat to all linkonce functions (PR #65270)

Mehdi Amini llvmlistbot at llvm.org
Wed Sep 6 15:30:00 PDT 2023


================
@@ -0,0 +1,29 @@
+//===- AddComdats.h - Prepare for translation to LLVM IR -*- 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef MLIR_DIALECT_LLVMIR_TRANSFORMS_ADDCOMDATS_H
+#define MLIR_DIALECT_LLVMIR_TRANSFORMS_ADDCOMDATS_H
+
+#include <memory>
+
+namespace mlir {
+
+class Pass;
+
+namespace LLVM {
+
+#define GEN_PASS_DECL_LLVMADDCOMDATS
+#include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"
+
+/// Creates a pass that adds Comdats to any functions with linkonce or
+/// linkonce_odr linkage
+std::unique_ptr<Pass> createAddComdatsPass();
----------------
joker-eph wrote:

Nit: this is auto-generated if you don't specify `let constructor = ` in TableGen

https://github.com/llvm/llvm-project/pull/65270


More information about the Mlir-commits mailing list