[PATCH] D104431: [LTO][lld] Add lto-pgo-warn-mismatch option

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 11 09:30:34 PDT 2021


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: lld/test/ELF/lto/thinlto-pgo-warn.ll:8
+;; Ensure lld generates warnings for profile cfg mismatch.
+; RUN: ld.lld --lto-cs-profile-file=%t2.profdata --lto-pgo-warn-mismatch --lto-O2 -shared %t1.bc -o /dev/null 2>&1 | FileCheck --check-prefix CHECK-WARNING %s
+
----------------
No need to use 1/2/3 suffixes for different stages of the same source file.


================
Comment at: lld/test/ELF/lto/thinlto-pgo-warn.ll:13
+
+; CHECK-WARNING: warning: {{.*}} function control flow change detected (hash mismatch) f Hash = 1895182923573755903
+; CHECK-NOT: warning: {{.*}} function control flow change detected (hash mismatch) f Hash = 1895182923573755903
----------------
The exact hash value isn't necessary. It will just add maintenance burden when this changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104431/new/

https://reviews.llvm.org/D104431



More information about the llvm-commits mailing list