================ @@ -420,101 +412,79 @@ static ParamLocsVecTy computeParamInfo( bool GlobalMergeFunc::merge(Module &M, const StableFunctionMap *FunctionMap) { bool Changed = false; - // Build a map from stable function name to function. - StringMap<Function *> StableNameToFuncMap; - for (auto &F : M) - StableNameToFuncMap[get_stable_name(F.getName())] = &F; - // Track merged functions - DenseSet<Function *> MergedFunctions; - - auto ModId = M.getModuleIdentifier(); - for (auto &[Hash, SFS] : FunctionMap->getFunctionMap()) { - // Parameter locations based on the unique hash sequences - // across the candidates. + // Collect stable functions related to the current module. + DenseMap<stable_hash, SmallVector<Function *>> HashToFuncs; ---------------- nocchijiang wrote:
```suggestion DenseMap<stable_hash, SmallVector<std::pair<Function *, FunctionHashInfo>>> HashToFuncs; ``` To save the cost of `FuncToFI`. Or maybe we could put `Function *` in `FunctionHashInfo`? https://github.com/llvm/llvm-project/pull/115750 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits