mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[ProfileData] Fix data racing in merging indexed profiles
There is data racing to the static variable RecordIndex in index profile reader when merging in multiple threads. Make it a member variable in IndexedInstrProfReader to fix this. Differential Revision: https://reviews.llvm.org/D38431 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -733,8 +733,6 @@ Error IndexedInstrProfReader::getFunctionCounts(StringRef FuncName,
|
||||
}
|
||||
|
||||
Error IndexedInstrProfReader::readNextRecord(NamedInstrProfRecord &Record) {
|
||||
static unsigned RecordIndex = 0;
|
||||
|
||||
ArrayRef<NamedInstrProfRecord> Data;
|
||||
|
||||
Error E = Index->getRecords(Data);
|
||||
|
||||
Reference in New Issue
Block a user