[all-commits] [llvm/llvm-project] 78c912: [llvm][utils] Add DenseMap data formatters
Dave Lee via All-commits
all-commits at lists.llvm.org
Wed Jul 19 13:22:19 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 78c9122ac9ad5562d65852eb38322f131cffbfd6
https://github.com/llvm/llvm-project/commit/78c9122ac9ad5562d65852eb38322f131cffbfd6
Author: Dave Lee <davelee.com at gmail.com>
Date: 2023-07-19 (Wed, 19 Jul 2023)
Changed paths:
M llvm/utils/lldbDataFormatters.py
Log Message:
-----------
[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
More information about the All-commits
mailing list