[llvm] [MergeFunctions] Add support to run the pass over a set of function pointers (PR #111045)
Stephen Tozer via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 11:02:07 PST 2024
================
@@ -467,6 +484,47 @@ bool MergeFunctions::runOnModule(Module &M) {
return Changed;
}
+bool MergeFunctions::runOnFunctions(std::set<Function *> &F) {
----------------
SLTozer wrote:
It'd be good if this could be de-duplicated with `MergeFunctions::runOnModule` - the implementation looks to be identical, apart from iterating over a `std::set<Function *>` rather than a `Module`, and not having the `collectUsedGlobalVariables` step at the start (it's not immediately clear to me if this step would be meaningful in the `runOnFunctions` case.
https://github.com/llvm/llvm-project/pull/111045
More information about the llvm-commits
mailing list