[flang-commits] [clang] [flang] [llvm] [flang][cmake][perf-training] Optimize flang with PGO and BOLT (PR #198863)
Madhur Amilkanthwar via flang-commits
flang-commits at lists.llvm.org
Thu Jun 25 23:18:03 PDT 2026
madhur13490 wrote:
Hi @pawosm-arm — heads up that this patch is intermittently breaking PGO bootstrap builds that enable flang.
With `FLANG_PGO_TRAINING_CLANG_COUPLING=ON` (the default), `generate-flang-profdata` and clang's `generate-profdata` both hang off clang-bootstrap-deps, so ninja runs them concurrently. Both clean/regenerate/merge `.profraw` in the same shared directories (<build>/profiles/ and clang/utils/perf-training/). When the flang pipeline clears/rewrites a `.profraw` that clang's `llvm-profdata` merge has mmap'd, the reader walks past the now-truncated file and dies with SIGBUS in `ValueProfData::getValueProfData`. It's timing-dependent, so it passes on some runs and fails on others.
I have a potential fix for this and will share soon. cc @ElvinaYakubova
https://github.com/llvm/llvm-project/pull/198863
More information about the flang-commits
mailing list