[llvm] [SampleFDO] Read call-graph matching recovered top-level function profile (PR #101053)

Lei Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 08:25:56 PDT 2024


================
@@ -1257,8 +1306,11 @@ SampleProfileReaderExtBinaryBase::readFuncMetadata(bool ProfileHasAttribute) {
     if (It != Profiles.end())
       FProfile = &It->second;
 
+    const uint8_t *Start = Data;
     if (std::error_code EC = readFuncMetadata(ProfileHasAttribute, FProfile))
       return EC;
+
+    FContextToMetaDataSecRange[FContext.getHashCode()] = {Start, Data};
----------------
wlei-llvm wrote:

It Is possible that the a function doesn't have attribute but do have FunctionHash, in this case, we still need to insert the index.

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


More information about the llvm-commits mailing list