diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2023-07-28 09:39:08 -0400 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2023-07-28 09:41:38 -0400 |
commit | 1a53b5c367b5ebf7d7f34afaa653ea337982f1d6 (patch) | |
tree | ab1cdc76af3ead1292fc8587669700271952b431 /llvm/tools/llvm-profdata/llvm-profdata.cpp | |
parent | 7ca6b7693433955ab28cbc5225bcb16a19fd53f4 (diff) | |
download | llvm-1a53b5c367b5ebf7d7f34afaa653ea337982f1d6.zip llvm-1a53b5c367b5ebf7d7f34afaa653ea337982f1d6.tar.gz llvm-1a53b5c367b5ebf7d7f34afaa653ea337982f1d6.tar.bz2 |
Revert "[llvm-profdata] Refactoring Sample Profile Reader to increase FDO build speed using MD5 as key to Sample Profile map"
This reverts commit 66ba71d913df7f7cd75e92c0c4265932b7c93292.
Addressing issues found by:
https://lab.llvm.org/buildbot/#/builders/245/builds/11732
https://lab.llvm.org/buildbot/#/builders/187/builds/12251
https://lab.llvm.org/buildbot/#/builders/186/builds/11099
https://lab.llvm.org/buildbot/#/builders/182/builds/6976
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r-- | llvm/tools/llvm-profdata/llvm-profdata.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index a11fc57..da10ddc 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -594,7 +594,7 @@ adjustInstrProfile(std::unique_ptr<WriterContext> &WC, auto checkSampleProfileHasFUnique = [&Reader]() { for (const auto &PD : Reader->getProfiles()) { - auto &FContext = PD.second.getContext(); + auto &FContext = PD.first; if (FContext.toString().find(FunctionSamples::UniqSuffix) != std::string::npos) { return true; @@ -2833,8 +2833,7 @@ static int showSampleProfile(const std::string &Filename, bool ShowCounts, "be printed"); // TODO: parse context string to support filtering by contexts. - FunctionSamples *FS = Reader->getSamplesFor(StringRef(ShowFunction)); - Reader->dumpFunctionProfile(FS ? *FS : FunctionSamples(), OS); + Reader->dumpFunctionProfile(StringRef(ShowFunction), OS); } if (ShowProfileSymbolList) { |