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

Yolanda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 00:55:38 PDT 2021


YolandaCY 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
+
----------------
MaskRay wrote:
> 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:
Thank you @MaskRay  for the reference. It seems I cannot use a check prefix as a check pattern.

I did not use "--implicit-check-no warning" directly as it looks to me a more strict test that negates all warnings.
In this case, would it be better to simply use CHECK-NOT ?
I checked that if I run with flag /lto-pgo-warn-mismatch without the CHECK-WARNING prefix, FILECHECK will catch the failure.




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