summaryrefslogtreecommitdiff
path: root/lib/ProfileData/InstrProfReader.cpp
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2017-10-05 17:05:20 +0000
committerRong Xu <xur@google.com>2017-10-05 17:05:20 +0000
commit5b4e1784b6cfa06aa79b871d2a1d93cf1101f57e (patch)
tree009dbd6eb6b968fbf97ca301de35de554f648ae8 /lib/ProfileData/InstrProfReader.cpp
parent0292ee9cab39a74e097a9c853bac819dd87d3316 (diff)
[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
Diffstat (limited to 'lib/ProfileData/InstrProfReader.cpp')
-rw-r--r--lib/ProfileData/InstrProfReader.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp
index 1b39a0695aa..cdf50c2df0c 100644
--- a/lib/ProfileData/InstrProfReader.cpp
+++ b/lib/ProfileData/InstrProfReader.cpp
@@ -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);