[all-commits] [llvm/llvm-project] 30e688: [lld][MachO] Add option to suppress mismatch profi...

Ellis Hoag via All-commits all-commits at lists.llvm.org
Mon Sep 11 09:14:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 30e688e6d061bf0f2a6fcbe39d2d23560a363436
      https://github.com/llvm/llvm-project/commit/30e688e6d061bf0f2a6fcbe39d2d23560a363436
  Author: Ellis Hoag <ellis.sparky.hoag at gmail.com>
  Date:   2023-09-11 (Mon, 11 Sep 2023)

  Changed paths:
    M lld/MachO/Config.h
    M lld/MachO/Driver.cpp
    M lld/MachO/LTO.cpp
    M lld/MachO/Options.td
    A lld/test/MachO/pgo-warn-mismatch.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list