~/talk

clang-misexpect - Managing your __builtin_expect(ations)

Talkat CppCon 2019 · 2019-09-15..09-20· [compilers-and-language-design]
links:none on file
slides:none on file

Adds clang/LLVM diagnostics that compare __builtin_expect annotations against PGO-collected basic-block counters and warn when the annotation contradicts observed runtime frequencies. Uses the PGO pipeline and emits -Wmiss-expect warnings or -Rpass=miss-expect optimization remarks; a standalone clang-tidy–style tool consumes compile_commands.json plus the PGO profile and scans a whole repo. Available in tip-of-tree/patch review, it finds mispredictions reliably but requires a representative profile or diagnostics will be misleading.

AI-written summary · about

  1. 0:00Introduction
  2. 0:27Builtinexpect
  3. 0:54Annotation
  4. 1:17Performance
  5. 2:02PG
  6. 2:36Diagnostics
  7. 3:07Limitations
  8. 3:33Usage
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.