[ProfileData] Remove unused and racy FunctionSamples::Format after D51643

The write may be racy if ThinLTO creates multiple `InProcessThinBackend` instances.
This commit is contained in:
Fangrui Song 2022-02-22 20:29:08 -08:00
parent f5153d9e72
commit 045f07b7dc
3 changed files with 0 additions and 4 deletions

View File

@ -1056,8 +1056,6 @@ public:
void setContext(const SampleContext &FContext) { Context = FContext; }
static SampleProfileFormat Format;
/// Whether the profile uses MD5 to represent string.
static bool UseMD5;

View File

@ -43,7 +43,6 @@ cl::opt<bool> GenerateMergedBaseProfiles(
namespace llvm {
namespace sampleprof {
SampleProfileFormat FunctionSamples::Format;
bool FunctionSamples::ProfileIsProbeBased = false;
bool FunctionSamples::ProfileIsCSFlat = false;
bool FunctionSamples::ProfileIsCSNested = false;

View File

@ -1882,7 +1882,6 @@ SampleProfileReader::create(std::unique_ptr<MemoryBuffer> &B, LLVMContext &C,
Reader->Remapper = std::move(ReaderOrErr.get());
}
FunctionSamples::Format = Reader->getFormat();
if (std::error_code EC = Reader->readHeader()) {
return EC;
}