aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2022-09-22 15:11:01 -0700
committerTeresa Johnson <tejohnson@google.com>2022-09-22 16:08:03 -0700
commit794b7ea960ccc3222f2af582efadbc5e5c464292 (patch)
tree626705b77993edc76b3738a36d106290483d48ae /clang/lib/Frontend/CompilerInvocation.cpp
parentf7d674910d2dadae209f4a93373481c450f089f7 (diff)
downloadllvm-794b7ea960ccc3222f2af582efadbc5e5c464292.zip
llvm-794b7ea960ccc3222f2af582efadbc5e5c464292.tar.gz
llvm-794b7ea960ccc3222f2af582efadbc5e5c464292.tar.bz2
Revert "[MemProf] Memprof profile matching and annotation"
This reverts commit a212d8da94d08e229aa8d65283e4b116310bba10, and follow on fixes 0cd6763fa93159b84d70a5bb602c24996acaafaa, e9ff53d42feac7fc157718523275619a8106f2f3, and 37c6a25e9ab230e5e21fa34e246d9fec55275df0. After re-reading the documentation for hash_combine, I don't think this is the appropriate hash function to use for computing the hash to use as a stack id in the metadata, since it is not guaranteed to produce stable values across executions. I have not hit this problem, but plan to switch to using an MD5 hash. I am hitting an issue with one of the bots (https://lab.llvm.org/buildbot/#/builders/171/builds/20732) where the values produced are only the lower 32 bits of the expected hash values, however, which I assume is related to the implementation of hash_combine and hash_code. I believe I fixed all of the other bot failures with the follow on fixes, which I'll merge into the new version before reapplying.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 656e595..9f92410 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1306,10 +1306,7 @@ static void setPGOUseInstrumentor(CodeGenOptions &Opts,
}
std::unique_ptr<llvm::IndexedInstrProfReader> PGOReader =
std::move(ReaderOrErr.get());
- // Currently memprof profiles are only added at the IR level. Mark the profile
- // type as IR in that case as well and the subsequent matching needs to detect
- // which is available (might be one or both).
- if (PGOReader->isIRLevelProfile() || PGOReader->hasMemoryProfile()) {
+ if (PGOReader->isIRLevelProfile()) {
if (PGOReader->hasCSIRLevelProfile())
Opts.setProfileUse(CodeGenOptions::ProfileCSIRInstr);
else