[all-commits] [llvm/llvm-project] 1132c7: Remove vptr dispatch from FoldingSet.
Richard Smith via All-commits
all-commits at lists.llvm.org
Wed Apr 15 17:39:55 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 1132c75bd77a4ae5e4634e22ac693128e3f39e5c
https://github.com/llvm/llvm-project/commit/1132c75bd77a4ae5e4634e22ac693128e3f39e5c
Author: Richard Smith <richard at metafoo.co.uk>
Date: 2020-04-15 (Wed, 15 Apr 2020)
Changed paths:
M llvm/include/llvm/ADT/FoldingSet.h
M llvm/lib/Support/FoldingSet.cpp
Log Message:
-----------
Remove vptr dispatch from FoldingSet.
Summary:
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.
Reviewers: rnk
Subscribers: hiraditya, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78247
More information about the All-commits
mailing list