[tsan] Do not instrument accesses to the gcov counters array

There is a known intended race here. This is a follow-up to r264805,
which disabled tsan instrumentation for updates to instrprof counters.
For more background on this please see the discussion in D18164.

llvm-svn: 273202
This commit is contained in:
Vedant Kumar
2016-06-20 21:24:26 +00:00
parent 9ad8fb68f7
commit 0222adbcd2
2 changed files with 12 additions and 0 deletions

View File

@@ -271,6 +271,10 @@ static bool shouldInstrumentReadWriteFromAddress(Value *Addr) {
/*AddSegment=*/false)))
return false;
}
// Check if the global is in the GCOV counters array.
if (GV->getName() == "__llvm_gcov_ctr")
return false;
}
return true;
}