[llvm] [SampleProfile] Fix bug where remapper returns empty string and crashing Sample Profile loader (PR #71479)

William Junda Huang via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 14:21:29 PST 2023


================
@@ -1630,7 +1630,7 @@ void SampleProfileLoader::promoteMergeNotInlinedContextSamples(
         // separate map so that it does not rehash the original profile.
         if (!OutlineFS)
           OutlineFS = &OutlineFunctionSamples[
-              FunctionSamples::getCanonicalFnName(Callee->getName())];
+              FunctionId(FunctionSamples::getCanonicalFnName(Callee->getName()))];
----------------
huangjd wrote:

That will be addressed in MD5phase3 (pending), in that patch FunctionId no longer requires explicit constructor since the difference between MD5 and String FunctionId will be minimized 

https://github.com/llvm/llvm-project/pull/71479


More information about the llvm-commits mailing list