[PATCH] D56243: [coroutines] Experimenting with __builtin_coro_frame_max_size

Brian Gesiak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 2 20:48:15 PST 2019


modocache created this revision.
modocache added reviewers: GorNishanov, lewissbaker, tks2103.
Herald added subscribers: cfe-commits, kristina, EricWF.

This commit implements a proposed addendum to the C++ Coroutines TS that
would allow users to query, at compile time, the maximum potential size
of a coroutine frame, from within the frontend.

The __builtin_coro_frame_max_size allows users to access this size, for
coroutine lambdas, by passing in the type of the coroutine lambda into
the function from which __builtin_coro_frame_max_size is called.
https://reviews.llvm.org/P8124 provides an example of such a program.


Repository:
  rC Clang

https://reviews.llvm.org/D56243

Files:
  include/clang/Basic/Builtins.def
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CGCoroutine.cpp
  lib/CodeGen/CodeGenFunction.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56243.179995.patch
Type: text/x-patch
Size: 9097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190103/bad30fff/attachment-0001.bin>


More information about the cfe-commits mailing list