[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
Loading
Please sign in to comment