[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 6 06:48:30 PST 2025
================
@@ -70,16 +94,38 @@ class ParentMapContext::ParentMap {
push_back(Value);
}
bool contains(const DynTypedNode &Value) {
- return Seen.contains(Value);
+ assert(Value.getMemoizationData());
+ bool found = FragileLazySeenCache.contains(&Value);
----------------
AaronBallman wrote:
```suggestion
bool Found = FragileLazySeenCache.contains(&Value);
```
https://github.com/llvm/llvm-project/pull/129934
More information about the cfe-commits
mailing list