public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/114851] New: Alternative to -Wmisexpect from LLVM in GCC
@ 2024-04-25  9:59 zamazan4ik at tut dot by
  2024-04-25 17:01 ` [Bug gcov-profile/114851] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zamazan4ik at tut dot by @ 2024-04-25  9:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114851

            Bug ID: 114851
           Summary: Alternative to -Wmisexpect from LLVM in GCC
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zamazan4ik at tut dot by
  Target Milestone: ---

LLVM infrastructure supports a diagnostic for checking mismatches between
user-provided __builtin_expect/[[likely]] hints and PGO profiles:
https://clang.llvm.org/docs/DiagnosticsReference.html#wmisexpect +
https://llvm.org/docs/MisExpect.html (and an example of its usage in Chromium:
https://issues.chromium.org/issues/40694104).

I was trying to find a similar diagnostic in GCC but found nothing. Is there
anything similar in GCC? If not, can we make the issue a Feature Request for
such a feature? Having such a diagnostic can be helpful in practice since it
allows for finding wrongfully placed user hints in sources.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gcov-profile/114851] Alternative to -Wmisexpect from LLVM in GCC
  2024-04-25  9:59 [Bug gcov-profile/114851] New: Alternative to -Wmisexpect from LLVM in GCC zamazan4ik at tut dot by
@ 2024-04-25 17:01 ` pinskia at gcc dot gnu.org
  2024-04-25 17:02 ` pinskia at gcc dot gnu.org
  2024-04-25 17:06 ` zamazan4ik at tut dot by
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-25 17:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114851

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |87403
           Severity|normal                      |enhancement

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I don't think GCC has a warning (yet).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87403
[Bug 87403] [Meta-bug] Issues that suggest a new warning

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gcov-profile/114851] Alternative to -Wmisexpect from LLVM in GCC
  2024-04-25  9:59 [Bug gcov-profile/114851] New: Alternative to -Wmisexpect from LLVM in GCC zamazan4ik at tut dot by
  2024-04-25 17:01 ` [Bug gcov-profile/114851] " pinskia at gcc dot gnu.org
@ 2024-04-25 17:02 ` pinskia at gcc dot gnu.org
  2024-04-25 17:06 ` zamazan4ik at tut dot by
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-04-25 17:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114851

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> I don't think GCC has a warning (yet).

Though I do wonder if the "hints" are used instead of the PGO here.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug gcov-profile/114851] Alternative to -Wmisexpect from LLVM in GCC
  2024-04-25  9:59 [Bug gcov-profile/114851] New: Alternative to -Wmisexpect from LLVM in GCC zamazan4ik at tut dot by
  2024-04-25 17:01 ` [Bug gcov-profile/114851] " pinskia at gcc dot gnu.org
  2024-04-25 17:02 ` pinskia at gcc dot gnu.org
@ 2024-04-25 17:06 ` zamazan4ik at tut dot by
  2 siblings, 0 replies; 4+ messages in thread
From: zamazan4ik at tut dot by @ 2024-04-25 17:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114851

--- Comment #3 from Alexander Zaitsev <zamazan4ik at tut dot by> ---
> Though I do wonder if the "hints" are used instead of the PGO here.

We already discussed this question a bit in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112806 . If I understand
correctly, no clear answer yet:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112806#c4 .

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-25 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-25  9:59 [Bug gcov-profile/114851] New: Alternative to -Wmisexpect from LLVM in GCC zamazan4ik at tut dot by
2024-04-25 17:01 ` [Bug gcov-profile/114851] " pinskia at gcc dot gnu.org
2024-04-25 17:02 ` pinskia at gcc dot gnu.org
2024-04-25 17:06 ` zamazan4ik at tut dot by

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).