[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
Loading
Please sign in to comment