[PATCH] D66324: clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM

Paul Kirth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 9 12:16:43 PDT 2019


paulkirth marked an inline comment as done.
paulkirth added inline comments.


================
Comment at: clang/test/Profile/misexpect-branch-cold.c:4
+// RUN: llvm-profdata merge %S/Inputs/misexpect-branch.proftext -o %t.profdata
+// RUN: %clang_cc1 %s -O2 -o - -disable-llvm-passes -emit-llvm -fprofile-instrument-use-path=%t.profdata -verify -Wmisexpect
+
----------------
lebedev.ri wrote:
> paulkirth wrote:
> > lebedev.ri wrote:
> > > Is there a test where `-Wmisexpect` isn't present, to verify that it is off-by-default?
> > We can add one, but is that necessary? Don't the tests for diagnostics cover those already?
> To clarify: i'm interested in the case where the PGO data is provided but `-Wmisexpect` is *not* specified.
Actually, this is moot. That test already exists in misexpect-branch.c: line 6.

Since that file actually has a mismatched use of __builtin_expect(), it's a better candidate anyway.

```// RUN: %clang_cc1 %s -O2 -o - -disable-llvm-passes -emit-llvm -fprofile-instrument-use-path=%t.profdata -verify=foo```


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

https://reviews.llvm.org/D66324





More information about the cfe-commits mailing list