================
@@ -70,16 +93,37 @@ class ParentMapContext::ParentMap {
push_back(Value);
}
bool contains(const DynTypedNode &Value) {
- return Seen.contains(Value);
+ assert(Value.getMemoizationData());
+ bool found = FragileLazySeenCache.contains(&Value);
+ while (!found && ItemsProcessed < Items.size()) {
+ found |= FragileLazySeenCache.insert(&Items[ItemsProcessed]).second;
----------------
higher-performance wrote:
This couples the correctness of `found` on this line to its presence in the
`while (!found && ...)` condition, which is why I felt it's better not to do
that. I can change it you'd really like me to though - do you find this hurts
readability?
https://github.com/llvm/llvm-project/pull/129934
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits