jansvoboda11 added a comment.

In D115346#3181198 <https://reviews.llvm.org/D115346#3181198>, @dexonsmith 
wrote:

> This looks really nice.
>
> One problem is that it's subtle to confirm whether it's thread-safe. The 
> local cache access parts of CachedFileSystemEntry lock-free, but the 
> CachedFileSystemEntry might get changed later (i.e., filled in with minimized 
> content). Are accessed fields guaranteed by context not to be the ones that 
> mutate later?

I believe the latest revision is thread-safe (albeit with benign data-races on 
`needsMinimization`). Once a `CachedFileSystemEntry` has been created, only the 
`MinimizedContents` and `PPSkippedRangeMapping` members can be modified (at 
most once, under a lock). Access to those fields only happens in "minimizing" 
contexts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115346/new/

https://reviews.llvm.org/D115346

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to