[llvm] [IPO] NFC: avoid recalculating FunctionId hashes during ProfiledCallGraph construction (PR #109014)
William Junda Huang via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 14:05:21 PDT 2024
huangjd wrote:
FunctionID is already capable of representing a hash value, so it is redundant to add another hash field. I think a more optimal way to do it is to do lazy hashing, whenever we put a function ID into the main sample profile map (or other maps), we convert it to hash representation. Although there's one complication here, that we will frequently need to compare strings coming from Function's name to FunctionID, so the Function object itself should also cache its name's hash value.
https://github.com/llvm/llvm-project/pull/109014
More information about the llvm-commits
mailing list