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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 19:53:34 PDT 2021


MaskRay added inline comments.


================
Comment at: lld/test/COFF/thinlto-pgo-warn.ll:11
+; Ensure lld will not generate warnings for profile cfg mismatch.
+; RUN: lld-link /out:%t3.dll /dll /noentry /export:f /lto-cs-profile-file:%t2.profdata /lto-pgo-warn-mismatch:no /opt:lldlto=2 %t1.obj 2>&1 | not FileCheck %s
+
----------------
YolandaCY wrote:
> tejohnson wrote:
> > I think it would be cleaner to do a FileCheck --implicit-check-not warning (possibly with an --allow-empty to get FileCheck to succeed). I don't think it is is typical to test for the absence of a pattern by checking for a FileCheck failure.
> > 
> > Ditto for ELF test.
> Thank you Teresa for the hint. I have updated the negative test as suggested.
https://llvm.org/docs/CommandGuide/FileCheck.html

--implicit-check-not warning:


================
Comment at: lld/test/ELF/lto/thinlto-pgo-warn.ll:11
+;; Ensure lld will not generate warnings for profile cfg mismatch.
+; RUN: ld.lld --lto-cs-profile-file=%t2.profdata --no-lto-pgo-warn-mismatch --lto-O2 -shared %t1.bc -o /dev/null 2>&1 | FileCheck --allow-empty --implicit-check-not CHECK-WARNING %s
+
----------------
ditto


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