[PATCH] D78247: Remove vptr dispatch from FoldingSet.
Richard Smith - zygoloid via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 15:27:53 PDT 2020
rsmith created this revision.
rsmith added a reviewer: rnk.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya.
Herald added a project: LLVM.
rsmith updated this revision to Diff 257867.
rsmith marked an inline comment as done.
rsmith added a comment.
Remove unused changes to function_ref.
Instead of storing a vptr in each FoldingSet instance, form an
equivalent struct and pass it implicitly from FoldingSet into the
various FoldingSetBase methods.
This has three benefits:
- FoldingSet becomes one pointer smaller.
- Under LTO, the "virtual" functions are much easier to inline.
- The element type no longer needs to be complete when instantiating FoldingSet<T>, only when instantiating an insert / lookup member.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78247
Files:
llvm/include/llvm/ADT/FoldingSet.h
llvm/lib/Support/FoldingSet.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78247.257867.patch
Type: text/x-patch
Size: 16973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200415/ddad0fe9/attachment-0001.bin>
More information about the llvm-commits
mailing list