[llvm] [Sample Profile Loader] Fix potential invalidated reference (PR #73181)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 17:08:06 PST 2023
================
@@ -205,8 +208,9 @@ class ProfiledCallGraph {
}
ProfiledCallGraphNode Root;
- HashKeyMap<std::unordered_map, FunctionId, ProfiledCallGraphNode>
- ProfiledFunctions;
+ // backing buffer for ProfiledCallGraphNodes.
+ std::list<ProfiledCallGraphNode> ProfiledCallGraphNodeList;
+ llvm::DenseMap<FunctionId, ProfiledCallGraphNode*> ProfiledFunctions;
----------------
WenleiHe wrote:
Why moving away from `HashKeyMap`? Don't you still want the unification between MD5 and string name in this case?
https://github.com/llvm/llvm-project/pull/73181
More information about the llvm-commits
mailing list