llvm-project
0dd6ddf8 - Prepare SampleProfileReader tables for concurrent read-only sharing.

Commit
1 day ago
Prepare SampleProfileReader tables for concurrent read-only sharing. Sharing parsed ExtBinary AutoFDO profiles across parallel compiler threads requires immutable, reference-counted table storage and thread-safe lazy caches. Guard lazy set initialization in `SampleProfileNameTable` with `llvm::once_flag`, store `SampleProfileReader` table members as `std::shared_ptr<const ...>`, and extract `SampleProfileReader::finishCreate` and an allocator-parameterized `decompressSection` overload. Behavior for existing single-reader callers is unchanged.
Author
Committer
Parents
Loading