[llvm] [MergeFunctions] Add support to run the pass over a set of function pointers (PR #111045)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 05:23:30 PST 2024
================
@@ -25,6 +27,10 @@ class Module;
class MergeFunctionsPass : public PassInfoMixin<MergeFunctionsPass> {
public:
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);
+
+ static bool runOnModule(Module &M);
+ static std::pair<bool, DenseMap<Function *, Function *>>
+ runOnFunctions(std::set<Function *> &F);
----------------
nikic wrote:
Generally, do not use `std::set`. In this case, you'll probably want to accept `ArrayRef` instead and construct it via `SetVector::getArrayRef()` in the caller. (Assuming you want something deduplicated but order-sensitive.)
https://github.com/llvm/llvm-project/pull/111045
More information about the llvm-commits
mailing list