[llvm] Port Swift's merge function pass to llvm: merging functions that differ in constants (PR #68235)
Manman Ren via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 10:04:43 PDT 2023
================
@@ -0,0 +1,1430 @@
+//===--- MergeFunctionsIgnoringConst.cpp - Merge functions ----------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This pass looks for similar functions that are mergeable and folds them.
+// The implementation is similar to LLVM's MergeFunctions pass. Instead of
+// merging identical functions, it merges functions which only differ by a few
+// constants in certain instructions.
+// This is copied from Swift's implementation.
+// TODO: We should generalize this pass and share it with Swift's
+// implementation.
----------------
manman-ren wrote:
Removed the TODO.
https://github.com/llvm/llvm-project/pull/68235
More information about the llvm-commits
mailing list