summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/ProfileData/InstrProf.h2
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index 037c3fea8a2..d3305f78ada 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -185,7 +185,7 @@ int collectPGOFuncNameStrings(const std::vector<std::string> &NameStrs,
/// Produce \c Result string with the same format described above. The input
/// is vector of PGO function name variables that are referenced.
int collectPGOFuncNameStrings(const std::vector<GlobalVariable *> &NameVars,
- std::string &Result);
+ std::string &Result, bool doCompression = true);
class InstrProfSymtab;
/// \c NameStrings is a string composed of one of more sub-strings encoded in
/// the format described above. The substrings are seperated by 0 or more zero
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 00deec6f8e8..0ccc16252c2 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -216,12 +216,13 @@ StringRef getPGOFuncNameInitializer(GlobalVariable *NameVar) {
}
int collectPGOFuncNameStrings(const std::vector<GlobalVariable *> &NameVars,
- std::string &Result) {
+ std::string &Result, bool doCompression) {
std::vector<std::string> NameStrs;
for (auto *NameVar : NameVars) {
NameStrs.push_back(getPGOFuncNameInitializer(NameVar));
}
- return collectPGOFuncNameStrings(NameStrs, zlib::isAvailable(), Result);
+ return collectPGOFuncNameStrings(
+ NameStrs, zlib::isAvailable() && doCompression, Result);
}
int readPGOFuncNameStrings(StringRef NameStrings, InstrProfSymtab &Symtab) {
OpenPOWER on IntegriCloud