[all-commits] [llvm/llvm-project] bef3b5: [InstrPGO] Avoid using global variable to fix pote...
Lei Wang via All-commits
all-commits at lists.llvm.org
Thu Oct 31 21:28:35 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bef3b54ea10a564a2de72f658f2efd64f537c079
https://github.com/llvm/llvm-project/commit/bef3b54ea10a564a2de72f658f2efd64f537c079
Author: Lei Wang <wlei at fb.com>
Date: 2024-10-31 (Thu, 31 Oct 2024)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/lib/Driver/ToolChain.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
A clang/test/CodeGen/pgo-cold-function-coverage.c
A clang/test/Driver/fprofile-generate-cold-function-coverage.c
M llvm/lib/Passes/PassBuilderPipelines.cpp
M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
A llvm/test/Transforms/PGOProfile/instr-gen-cold-function.ll
Log Message:
-----------
[InstrPGO] Avoid using global variable to fix potential data race (#114364)
In https://github.com/llvm/llvm-project/pull/109837, it sets a global
variable(`PGOInstrumentColdFunctionOnly`) in PassBuilderPipelines.cpp
which introduced a data race detected by TSan. To fix this, I decouple
the flag setting, the flags are now set
separately(`instrument-cold-function-only-path` is required to be used
with `--pgo-instrument-cold-function-only`).
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list