[profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode by w2yehia · Pull Request #124353 · llvm/llvm-project (original) (raw)
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Clang issues not falling into any other category
'clang' and 'clang++' user-facing binaries. Not 'clang-cl'
Language frontend issues, e.g. anything involving "Sema"
IR generation bugs: mangling, exceptions, etc.
labels
Wael Yehia added 2 commits
w2yehia changed the title
[PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode [PGO] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode
w2yehia changed the title
[PGO] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode [profile] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode
Icohedron pushed a commit to Icohedron/llvm-project that referenced this pull request
w2yehia added a commit that referenced this pull request
PR #124353 introduced the clang option -fprofile-continuous
to enable
continuous mode. Use this option in all compiler-rt tests, where applicable.
Changes can be summarized as follows:
- tests that use
-fprofile-instr-generate
(%clang_profgen
), which is an option that takes profile file name, are changed like so:
-// RUN: %clang_profgen_cont <SOME-OPTIONS> -o %t.exe %s
-// RUN: env LLVM_PROFILE_FILE="%c%t.profraw" %run %t.exe
+// RUN: %clang_profgen=%t.profraw -fprofile-continuous <SOME-OPTIONS> -o %t.exe %s
+// RUN: %run %t.exe
- tests that use
-fprofile-generate
(%clang_pgogen
), which is an option that takes a profile directory, are on case-by-case basis. Where the default name "default_%m.profraw" works, those tests were changed to use%clang_pgogen=<dir>
, and the rest (set-filename.c
andget-filename.c
) continued to use theLLVM_PROFILE_FILE
environment variable . set-file-object.c
uses different filename for different run of the same executable, so it continued to use theLLVM_PROFILE_FILE
environment variable.pid-substitution.c
add a clang_profgen variation.
Co-authored-by: Wael Yehia wyehia@ca.ibm.com