[clang] [PGO] Add a clang option -fprofile-continuous that enables PGO continuous mode (PR #124353)
Wael Yehia via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 24 20:24:36 PST 2025
================
@@ -3033,6 +3033,14 @@ indexed format, regardeless whether it is produced by frontend or the IR pass.
overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported
by the target, or ``single`` otherwise.
+.. option:: -fprofile-continuous
----------------
w2yehia wrote:
For example:
```
$ clang++ -O2 -fprofile-generate -fprofile-continuous code.cc -o code
```
Running `./code` will collect the profile and write it to the `default_xxxx.profraw` file.
However, if `./code` abruptly terminates or does not call `exit()`, in continuous mode the profile collected up to the point of termination will be available in `default_xxxx.profraw` while in the non-continuous mode, no profile file is generated.
https://github.com/llvm/llvm-project/pull/124353
More information about the cfe-commits
mailing list