~/talk

Dealing with aliasing using contracts

Talkat CppCon 2018 · 2018-09-23..09-28· [compilers-and-language-design, c-and-cpp]
links:none on file
slides:none on file

Shows that LLVM emits extra loads when parameters may alias and that C’s restrict enables vectorization, then proposes using contracts plus a new unique span type so the compiler can treat element accesses as non‑aliasing (e.g. an disjoint(a,b,num) precondition) and unlock optimizations otherwise missed. Demonstrates current mitigations like runtime checks, static analysis, optimization remarks and LLVM look‑versioning (loop versioning) already generate alternate fast paths, but the contracts+type approach is a prototype idea not yet standardized or fully implemented.

AI-written summary · about

  1. 0:00Introduction and talk overview
  2. 1:11Aliasing in function arguments
  3. 3:48Why aliasing matters for performance
  4. 5:36C’s restrict qualifier limitations
  5. 7:50Contracts for aliasing preconditions
  6. 12:15Extending contracts for disjoint arrays
  7. 14:05User-defined types and aliasing
  8. 17:24Unique span for non-aliasing views
  9. 20:46Benefits of separate types for guarantees
  10. 23:17Passing arguments by value vs reference
  11. 25:20Audience questions and discussion
  12. 35:44Q&A on aliasing optimizations
~/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.