~/talk

C++ Coroutines: Under the covers

Talkat CppCon 2016 · 2016-09-18..09-23· [compilers-and-language-design]
slides:none on file

Shows how Clang lowers C++ coroutines to LLVM coroutine intrinsics and then, inside LLVM, splits a function into resume/destroy/initial pieces (a split into resume/destroy/initial transformation), uses inlining, SSA/SROA and devirtualization to elide heap allocations and inline away state, and demonstrates with a C generator and a take_until pipeline that O2 can make a coroutine disappear to a constant. Proposes a zero-overhead task/future design that keeps the promise in-frame, starts suspended, resumes callers at final suspend and avoids atomics and mutexes via heap elision.

AI-written summary · about

  1. 0:00Title
  2. 0:30Magic act
  3. 2:27TakeUntil
  4. 5:17Debug
  5. 7:01Disassembly
  6. 9:39Compiler
  7. 11:48Superclasses
  8. 12:47C Coroutine
  9. 17:11Michelangelo
  10. 20:40Cleanup
  11. 24:15Inlining
  12. 24:37SRA
  13. 28:23Rocket joke
  14. 29:42Frontend optimizer
  15. 29:55optimizer
  16. 30:53coldgraph
  17. 31:40inliner
  18. 36:03heap allocation
  19. 37:11state of coroutines
  20. 39:27thanks
  21. 39:43future
  22. 40:27overhead
  23. 44:51result
  24. 45:54heap illusion
  25. 52:05more questions
  26. 52:40make optimization reliable
  27. 54:20is future implementation available online
~/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.