diff options
author | ronryvchin <94285266+ronryvchin@users.noreply.github.com> | 2024-12-04 08:56:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-04 07:56:46 +0100 |
commit | ff281f7d37ead15bdbdbfccb4b82ea93013b1a00 (patch) | |
tree | 6e2845fbe9fd9ae58443e17a3376ae922268f730 /llvm/tools/llvm-profdata/llvm-profdata.cpp | |
parent | 92ed7e292443de1d89754a59a533ded160d544eb (diff) | |
download | llvm-ff281f7d37ead15bdbdbfccb4b82ea93013b1a00.zip llvm-ff281f7d37ead15bdbdbfccb4b82ea93013b1a00.tar.gz llvm-ff281f7d37ead15bdbdbfccb4b82ea93013b1a00.tar.bz2 |
[PGO] Add option to always instrumenting loop entries (#116789)
This patch extends the PGO infrastructure with an option to prefer the
instrumentation of loop entry blocks.
This option is a generalization of
https://github.com/llvm/llvm-project/commit/19fb5b467bb97f95eace1f3637d2d1041cebd3ce,
and helps to cover cases where the loop exit is never executed.
An example where this can occur are event handling loops.
Note that change does NOT change the default behavior.
Diffstat (limited to 'llvm/tools/llvm-profdata/llvm-profdata.cpp')
-rw-r--r-- | llvm/tools/llvm-profdata/llvm-profdata.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp index 2acf1cc..1d9d7bcf 100644 --- a/llvm/tools/llvm-profdata/llvm-profdata.cpp +++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp @@ -2967,8 +2967,10 @@ static int showInstrProfile(ShowFormat SFormat, raw_fd_ostream &OS) { std::unique_ptr<ProfileSummary> PS(Builder.getSummary()); bool IsIR = Reader->isIRLevelProfile(); OS << "Instrumentation level: " << (IsIR ? "IR" : "Front-end"); - if (IsIR) + if (IsIR) { OS << " entry_first = " << Reader->instrEntryBBEnabled(); + OS << " instrument_loop_entries = " << Reader->instrLoopEntriesEnabled(); + } OS << "\n"; if (ShowAllFunctions || !FuncNameFilter.empty()) OS << "Functions shown: " << ShownFunctions << "\n"; |