diff options
author | Dave Lee <davelee.com@gmail.com> | 2022-10-29 15:07:49 -0700 |
---|---|---|
committer | Dave Lee <davelee.com@gmail.com> | 2023-07-19 13:21:49 -0700 |
commit | 78c9122ac9ad5562d65852eb38322f131cffbfd6 (patch) | |
tree | 90c73ce7e469ecd856c08fd49e5a3bbfd767b6ed /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 7dfe62327db81cc5ee3e29a994818370d95dc9e3 (diff) | |
download | llvm-78c9122ac9ad5562d65852eb38322f131cffbfd6.zip llvm-78c9122ac9ad5562d65852eb38322f131cffbfd6.tar.gz llvm-78c9122ac9ad5562d65852eb38322f131cffbfd6.tar.bz2 |
[llvm][utils] Add DenseMap data formatters
Add summary and synthetic data formatters for `llvm::DenseMap`.
This implementation avoids expression evaluation by using a heuristic. However, as
heuristics go, there is a corner case: A single deleted entry (a single "tombstone"),
will result in a child value with an invalid key but a valid value.
Instead of calling `getEmptyKey()` and `getTombstoneKey()` to determine which buckets
are empty, and which contain real key-values, the heuristic scans all buckets to
identify keys that exist only once. These singleton keys are considered valid.
The empty key will always exist multiple times. However the tombstone key may exist
zero, one, or many times. The heuristic has no problems when there are zero or many
tombstones, but when there is exactly one deleted entry (one tombstone), then the
heuristic will incorrectly identify it as valid.
Differential Revision: https://reviews.llvm.org/D137028
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions