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

Yolanda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 02:51:10 PDT 2021


YolandaCY marked 4 inline comments as done.
YolandaCY added a comment.

Thanks Teresa and Fangrui for the comments. I have revised the tests as suggested!



================
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
+
----------------
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.


================
Comment at: lld/test/ELF/lto/thinlto-pgo-warn.ll:3
+
+; Basic ThinLTO tests.
+; RUN: opt -module-summary %s -o %t1.bc
----------------
MaskRay wrote:
> Newer lld/test/ELF tests use `;;` for non-RUN-non-CHECK comments.
Thanks and updated the comments for ELF test with "::".


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