HomePhabricator

[NFCI] Change the data structure of MaybeODRUseExprSet

Authored by erichkeane on Jun 15 2020, 8:10 AM.

Description

[NFCI] Change the data structure of MaybeODRUseExprSet

In 1eddce41, I fixed a non-deterministic result problem by switching a
SmallPtrSet to a SmallSetVector to ensure we iterated it
deterministically. Unfortunately, this seems to show a surprisingly
significant compiletime impact.

This patch does 2 things in an attempt to fix this:

First, it makes the 'small size' optimization 4 instead of 2. As these
are pointers, this only increases the size of Sema by 4
sizeof(pointer)s (2 for the set, 2 for the vector).

Second, instead of using SmallSetVector, which is a SmallVector +
SmallDenseSet, it uses a SetVector of SmallVector + SmallPtrSet. The
hope is that the pointer-specific optimizations of the SmallPtrSet will
minimize the impact on compile-time.

Details

Committed
erichkeaneJun 15 2020, 8:15 AM
Parents
rG8c61f13a0f7c: [DSE,MSSA] Delete instructions after printing it.
Branches
Unknown
Tags
Unknown