Skip to content
Unverified Commit 30e688e6 authored by Ellis Hoag's avatar Ellis Hoag Committed by GitHub
Browse files

[lld][MachO] Add option to suppress mismatch profile errors (#65551)

Both ELF and COFF support `--no-lto-pgo-warn-mismatch` in
https://reviews.llvm.org/D104431 to suppress warnings due to mismatching
profile hashes. As profiles go stale, it becomes likely that some
function's CFGs will change so that their profiles can no longer be
used. This commit adds the linker option `--no-pgo-warn-mismatch` to
suppress these warnings.

Note that we do have the LLVM backend flag `no-pgo-warn-mismatch`
https://github.com/llvm/llvm-project/blob/3df1a64ebad8f31231ba05cf6ff43a985fea9235/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp#L210

but that is set to true by default during LTO
https://github.com/llvm/llvm-project/blob/3df1a64ebad8f31231ba05cf6ff43a985fea9235/llvm/include/llvm/LTO/Config.h#L76-L77
parent 3125bd4b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment