Lack of ComputeHash inlining slows down slightly FoldingSetBase::FindNodeOrInsertPos calls.
Inlining makes it faster which matters in particular for FoldingSet users in ASTContext.
Extracted from: https://reviews.llvm.org/D118385
Paths
| Differential D118612
[NFC] Move FoldingSetNodeIDRef::ComputeHash and FoldingSetNodeID::ComputeHash definitions to header ClosedPublic Authored by yurai007 on Jan 31 2022, 7:49 AM.
Details Summary Lack of ComputeHash inlining slows down slightly FoldingSetBase::FindNodeOrInsertPos calls. Extracted from: https://reviews.llvm.org/D118385
Diff Detail
Event TimelineComment Actions Not a big fan of moving Hashing.h to the header, but performance >> compilation time, so I'm fine with that patch (backed by the benchmark @nikic ran https://reviews.llvm.org/D118385#3281620) This revision is now accepted and ready to land.Feb 2 2022, 5:26 AM Comment Actions if you want the most performance, shouldn't you be building with ThinLTO -DLLVM_ENABLE_LTO=Thin? or is this helping even with LTO? Comment Actions
We discussed LTO topic a bit here: https://reviews.llvm.org/D118385#3278901 On my local build I can use LTO but in general not all distros enable it for Clang/LLVM packages. I'm not sure whether change would give any gains on top of LTO build. This revision was landed with ongoing or failed builds.Feb 4 2022, 9:05 AM Closed by commit rG39ceea26c59a: [NFC] Move FoldingSetNodeIDRef::ComputeHash and FoldingSetNodeID::ComputeHash… (authored by yurai007). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 404531 llvm/include/llvm/ADT/FoldingSet.h
llvm/lib/Support/FoldingSet.cpp
|