================ @@ -1048,27 +1052,29 @@ class FunctionSamples { }; if (isDeclaration(SymbolMap.lookup(getFuncName()))) { // Add to the import list only when it's defined out of module. - S.insert(getGUID(getName())); + S.insert(getGUID()); } // Import hot CallTargets, which may not be available in IR because full // profile annotation cannot be done until backend compilation in ThinLTO. for (const auto &BS : BodySamples) for (const auto &TS : BS.second.getCallTargets()) - if (TS.getValue() > Threshold) { - const Function *Callee = SymbolMap.lookup(getFuncName(TS.getKey())); + if (TS.second > Threshold) { + const Function *Callee = SymbolMap.lookup(getFuncName(TS.first)); if (isDeclaration(Callee)) - S.insert(getGUID(TS.getKey())); + S.insert(TS.first.getHashCode()); } for (const auto &CS : CallsiteSamples) for (const auto &NameFS : CS.second) NameFS.second.findInlinedFunctions(S, SymbolMap, Threshold); } /// Set the name of the function. - void setName(StringRef FunctionName) { Context.setName(FunctionName); } + void setName(ProfileFuncRef FunctionName) { ---------------- WenleiHe wrote:
I think it's ProfileFuncRef that is misleading. It's really just a wrapper around name, not wrapper for function. It should be ProfileFuncName. So I think it makes sense to keep Name, instead of using Function. Same goes for other places. https://github.com/llvm/llvm-project/pull/66164 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits