Skip to content
Commit 1132c75b authored by Richard Smith's avatar Richard Smith
Browse files

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
parent edccc35e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment